show in add_quest_steps how many locations *set* a quest step
This commit is contained in:
parent
10b3ac6aff
commit
58fe04cd49
@ -250,10 +250,11 @@ yl_speak_up.quest_step_list_show_table = function(formspec, table_specs, liste,
|
||||
"color;text,align=right;".. -- #d.one_step_required
|
||||
"color;text,align=right;".. -- #d.all_steps_required
|
||||
"color;text,align=right;".. -- #required_for_steps (quest steps that need this one)
|
||||
"color;text,align=right;".. -- #where (locations/NPC that *set* this quest step)
|
||||
"color;text,align=left".. -- name of quest step
|
||||
"]table[")
|
||||
table.insert(formspec, table_specs)
|
||||
table.insert(formspec,"#FFFFFF,(O),#FFFFFF,(A),#FFFFFF,(U),#FFFFFF,Name of step:,")
|
||||
table.insert(formspec,"#FFFFFF,(O),#FFFFFF,(A),#FFFFFF,(U),#FFFFFF,(L),#FFFFFF,Name of step:,")
|
||||
local tmp = {}
|
||||
for i, s in ipairs(liste or {}) do
|
||||
local d = data[s]
|
||||
@ -269,6 +270,16 @@ yl_speak_up.quest_step_list_show_table = function(formspec, table_specs, liste,
|
||||
required_for_steps[s] = {}
|
||||
end
|
||||
grey_if_zero(tmp, #required_for_steps[s])
|
||||
|
||||
if(not(d.where) or type(d.where) ~= "table") then
|
||||
d.where = {}
|
||||
end
|
||||
local anz_where = 0
|
||||
for k, v in pairs(d.where) do
|
||||
anz_where = anz_where + 1
|
||||
end
|
||||
grey_if_zero(tmp, anz_where)
|
||||
|
||||
table.insert(tmp, "#AAFFAA")
|
||||
table.insert(tmp, minetest.formspec_escape(s))
|
||||
end
|
||||
@ -424,7 +435,9 @@ yl_speak_up.get_fs_add_quest_steps = function(player, param)
|
||||
table.insert(formspec, ";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]")
|
||||
"\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]")
|
||||
|
||||
return table.concat(formspec, "")
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user