forked from your-land-mirror/yl_speak_up
show npcs, locations and items in manage_quests
This commit is contained in:
parent
234a18efff
commit
b621fe7b12
@ -137,11 +137,6 @@ yl_speak_up.get_fs_manage_quests = function(player, param)
|
|||||||
-- -> determined from quests.npcs and quests.locations
|
-- -> determined from quests.npcs and quests.locations
|
||||||
quest.is_subquest_of = {} -- list of quest_ids this quest contributes to
|
quest.is_subquest_of = {} -- list of quest_ids this quest contributes to
|
||||||
-- -> determined from quests.npcs and quests.locations
|
-- -> determined from quests.npcs and quests.locations
|
||||||
quest.npcs = {} -- list of NPC that contribute to this quest
|
|
||||||
-- -> derived from quest.var_name
|
|
||||||
quest.locations = {} -- list of locations that contribute to this quest
|
|
||||||
-- -> derived from quest.var_name
|
|
||||||
quest.items = {} -- data of quest items created and accepted
|
|
||||||
quest.rewards = {} -- list of rewards (item stacks) for this ques
|
quest.rewards = {} -- list of rewards (item stacks) for this ques
|
||||||
quest.testers = {} -- list of player names that can test the quest
|
quest.testers = {} -- list of player names that can test the quest
|
||||||
-- -> during the created/testing phase: any player for which
|
-- -> during the created/testing phase: any player for which
|
||||||
@ -170,12 +165,46 @@ yl_speak_up.get_fs_manage_quests = function(player, param)
|
|||||||
nil)
|
nil)
|
||||||
yl_speak_up.get_fs_show_list_in_box(formspec,
|
yl_speak_up.get_fs_show_list_in_box(formspec,
|
||||||
"Quest ends with steps:", "select_from_end_steps", lists.end_steps,
|
"Quest ends with steps:", "select_from_end_steps", lists.end_steps,
|
||||||
"0.1", "8.0", "5.6", "3.5", "0.1", nil, "#AAFFAA",
|
"0.1", "8.0", "5.6", "3.5", 0, nil, "#AAFFAA",
|
||||||
"This quest ends with these steps. They are not required\n"..
|
"This quest ends with these steps. They are not required\n"..
|
||||||
"by any other steps and have no successor.\n"..
|
"by any other steps and have no successor.\n"..
|
||||||
"Your quest needs at least one end step.",
|
"Your quest needs at least one end step.",
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
|
-- right side:
|
||||||
|
-- All these values could in theory either be derived from quest.var_name
|
||||||
|
-- and/or from quest.step_data.where.
|
||||||
|
-- These lists here are needed regardless of that because they may be used
|
||||||
|
-- to add NPC/locations/quest items that are *not yet* used but are planned
|
||||||
|
-- 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
|
||||||
|
yl_speak_up.get_fs_show_list_in_box(formspec,
|
||||||
|
"NPC that (may) participate:", "select_from_npcs", quest.npcs or {},
|
||||||
|
"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"..
|
||||||
|
"Now you can set quest steps from this quest in the NPC's options.",
|
||||||
|
"button[4.6,0.0;0.94,0.7;edit_npcs;Edit]")
|
||||||
|
-- quest.locations = {}
|
||||||
|
-- list of locations that *may* contribute to this quest
|
||||||
|
yl_speak_up.get_fs_show_list_in_box(formspec,
|
||||||
|
"Locations:", "select_from_locations", quest.locations or {},
|
||||||
|
"24", "4.5", "5.6", "3.5", 0, nil, "#AAAAFF",
|
||||||
|
"This is a list of locations that may be relevant for this quest.\n"..
|
||||||
|
"It works the same way as for the NPC above.",
|
||||||
|
"button[4.6,0.0;0.94,0.7;edit_locations;Edit]")
|
||||||
|
-- quest.items = {}
|
||||||
|
-- data of quest items that *may* be created and/or accepted in this quest
|
||||||
|
yl_speak_up.get_fs_show_list_in_box(formspec,
|
||||||
|
"Quest items:", "select_from_quest_items", quest.items or {},
|
||||||
|
"24", "8.0", "5.6", "3.5", 0, nil, "#FFFFFF",
|
||||||
|
"This is a list of quest items.\n"..
|
||||||
|
"Add quest items here in order to use them more easily in your NPC.",
|
||||||
|
"button[4.6,0.0;0.94,0.7;edit_items;Edit]")
|
||||||
|
|
||||||
|
|
||||||
-- store the quest ID so that we know what we're working at
|
-- store the quest ID so that we know what we're working at
|
||||||
yl_speak_up.speak_to[pname].q_id = quest.id
|
yl_speak_up.speak_to[pname].q_id = quest.id
|
||||||
return table.concat(formspec, "")
|
return table.concat(formspec, "")
|
||||||
|
Loading…
Reference in New Issue
Block a user