use container for fs_add_quest_steps

This commit is contained in:
Sokomine 2023-09-29 16:08:20 +02:00
parent 3f9da138e0
commit ba81ac2f63

View File

@ -412,26 +412,27 @@ yl_speak_up.get_fs_add_quest_steps = function(player, param)
table.sort(available_steps)
yl_speak_up.speak_to[pname].available_quest_steps = available_steps
table.insert(formspec, "label[0.2,")
table.insert(formspec, "container[0,")
table.insert(formspec, tostring(y_pos))
table.insert(formspec, ";or select an existing quest step from the list below")
table.insert(formspec, ";30,20]")
table.insert(formspec, "label[0.2,0;or select an existing quest step from the list below")
if(mode and mode == "embedded_select") then
table.insert(formspec, minetest.colorize("#9999FF", " to display the step")..":]")
else
table.insert(formspec, ":]")
end
yl_speak_up.quest_step_list_show_table(formspec,
"0.2,"..tostring(y_pos + 0.2)..";"..tostring(12+x_add)..",6.0;add_from_available;",
"0.2,0.2;"..tostring(12+x_add)..",6.0;add_from_available;",
available_steps,
step_data, required_for_steps)
table.insert(formspec, "label[0.2,")
table.insert(formspec, tostring(y_pos + 6.5))
table.insert(formspec, ";Legend: The numbers show the amount of quest steps...\n"..
table.insert(formspec, "label[0.2,6.5;Legend: The numbers show the amount of quest steps...\n"..
"\t(O) from which (o)ne needs to be achieved for this quest step\n"..
"\t(A) that (a)ll need to be achieved for this quest step\n"..
"\t(U) that require/(u)se this quest step in some form\n"..
"\t(L) Number of locations (npc/places) that "..
minetest.colorize("#9999FF", "set").." this quest step]")
table.insert(formspec, "container_end[]")
return table.concat(formspec, "")
end