improved tooltips in manage quest steps

This commit is contained in:
Sokomine 2023-09-21 20:07:22 +02:00
parent 9313ef3bef
commit eabafafe17

View File

@ -304,29 +304,39 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
if( (step_data[selected].one_step_required and #step_data[selected].one_step_required > 0)
or(step_data[selected].all_steps_required and #step_data[selected].all_steps_required > 0)) then
table.insert(formspec, "button[5.6,1.7;0.6,7.0;show_prev_step;<]")
table.insert(formspec, "button[5.6,1.7;0.6,7.0;show_prev_step;<]"..
"tooltip[show_prev_step;Show the previous step according to "..
em("your quest logic")..".\n"..
"The other "..em("< Prev").." button shows the previous step "..
"in\n"..em("alphabetical order")..".]")
end
-- add buttons for inserting steps between this and the prev/next one
if(not(step_data[selected].one_step_required) or #step_data[selected].one_step_required <= 1) then
table.insert(formspec,
"button[5.6,8.7;0.6,2.6;insert_after_prev_step;+]"..
"tooltip[insert_after_prev_step;"..
"Insert a new quest step between the *previous* step (shown\n"..
"to the left) and the *current* step (shown in the middle).\n"..
"Insert a new quest step between the "..em("previous step")..
" (shown\n"..
"to the left) and the "..em("current step")..
" (shown in the middle).\n"..
"Note: This only makes sense if there's just one or no\n"..
" previous step.]")
end
if(required_for and #required_for > 0) then
table.insert(formspec, "button[23.8,1.7;0.6,7.0;show_next_step;>]")
table.insert(formspec, "button[23.8,1.7;0.6,7.0;show_next_step;>]"..
"tooltip[show_next_step;Show the next step according to "..
em("your quest logic")..".\n"..
"The other "..em("Next >").." button shows the next step "..
"in\n"..em("alphabetical order")..".]")
end
if(#required_for <= 1) then
table.insert(formspec,
"button[23.8,8.7;0.6,2.6;insert_before_next_step;+]"..
"tooltip[insert_before_next_step;"..
"Insert a new quest step between this, the *currently*\n"..
"displayed step (in the middle), and the *next one*\n"..
"shown to the right.\n"..
"Note: This only makes sense if there's just one\n"..
"Insert a new quest step between "..em("current step")..
" (shown\nin the middle) "..
"and the "..em("next step").." (shown to the right).\n"..
"Note: This only makes sense if there's just one or no\n"..
" next step.]")
end