forked from Sokomine/yl_speak_up
show names of npc in quest overview
This commit is contained in:
parent
9e3b98d09e
commit
7a9ab3867d
@ -195,9 +195,15 @@ yl_speak_up.get_fs_manage_quests = function(player, param)
|
||||
-- to be used for this quest eventually.
|
||||
table.insert(formspec, "style[edit_npcs,edit_locations,edit_items;bgcolor=blue;textcolor=yellow]")
|
||||
-- quest.npcs = {}
|
||||
-- list of NPC that *may* contribute to this quest
|
||||
-- list of NPC that *may* contribute to this quest (only IDs without leading n_)
|
||||
-- turn that list into a more readable list of names
|
||||
local npc_names = {}
|
||||
for i, id in ipairs(quest.npcs or {}) do
|
||||
local d = yl_speak_up.npc_list[id] or {}
|
||||
table.insert(npc_names, "n_"..tostring(id).." "..(d.name or "- unknown -"))
|
||||
end
|
||||
yl_speak_up.get_fs_show_list_in_box(formspec,
|
||||
"NPC that (may) participate:", "select_from_npcs", quest.npcs or {},
|
||||
"NPC that (may) participate:", "select_from_npcs", npc_names,
|
||||
"24", "1.0", "5.6", "3.5", 0, nil, "#AAAAFF",
|
||||
"This is a list of NPC that may be relevant for this quest.\n"..
|
||||
"Add an NPC to this list and then edit the NPC.\n"..
|
||||
|
||||
Loading…
Reference in New Issue
Block a user