adding and deleting quest step assignments to poptions is now logged
This commit is contained in:
parent
696a36a145
commit
58976ec35b
@ -326,6 +326,13 @@ yl_speak_up.input_fs_add_quest_steps = function(player, formname, fields)
|
|||||||
end
|
end
|
||||||
-- show the newly created or selected step
|
-- show the newly created or selected step
|
||||||
yl_speak_up.speak_to[pname].quest_step = work_step
|
yl_speak_up.speak_to[pname].quest_step = work_step
|
||||||
|
-- log the change
|
||||||
|
yl_speak_up.log_change(pname, n_id,
|
||||||
|
"Dialog "..tostring(d_id)..": Option "..tostring(o_id)..
|
||||||
|
" will now set quest step \""..
|
||||||
|
tostring(dialog.n_dialogs[d_id].d_options[o_id].quest_step)..
|
||||||
|
"\" of quest \""..
|
||||||
|
tostring(dialog.n_dialogs[d_id].d_options[o_id].quest_id).."\".")
|
||||||
return yl_speak_up.show_fs(player, "manage_quest_steps", work_step)
|
return yl_speak_up.show_fs(player, "manage_quest_steps", work_step)
|
||||||
elseif(not(current_step) or not(step_data[current_step])) then
|
elseif(not(current_step) or not(step_data[current_step])) then
|
||||||
return yl_speak_up.show_fs(player, "manage_quests")
|
return yl_speak_up.show_fs(player, "manage_quests")
|
||||||
|
@ -134,6 +134,13 @@ yl_speak_up.input_fs_assign_quest_step = function(player, formname, fields)
|
|||||||
if(not(n_id)) then
|
if(not(n_id)) then
|
||||||
return show_error_fs(player, "NPC or location not found.")
|
return show_error_fs(player, "NPC or location not found.")
|
||||||
end
|
end
|
||||||
|
-- log the change
|
||||||
|
yl_speak_up.log_change(pname, n_id,
|
||||||
|
"Dialog "..tostring(d_id)..": Option "..tostring(o_id)..
|
||||||
|
" no longer sets quest step \""..
|
||||||
|
tostring(dialog.n_dialogs[d_id].d_options[o_id].quest_step)..
|
||||||
|
"\" of quest \""..
|
||||||
|
tostring(dialog.n_dialogs[d_id].d_options[o_id].quest_id).."\".")
|
||||||
-- we have updated the quest step data - we need to update the NPC as well
|
-- we have updated the quest step data - we need to update the NPC as well
|
||||||
local dialog = yl_speak_up.load_dialog(n_id, false)
|
local dialog = yl_speak_up.load_dialog(n_id, false)
|
||||||
if(yl_speak_up.check_if_dialog_has_option(dialog, d_id, o_id)) then
|
if(yl_speak_up.check_if_dialog_has_option(dialog, d_id, o_id)) then
|
||||||
@ -153,16 +160,6 @@ yl_speak_up.input_fs_assign_quest_step = function(player, formname, fields)
|
|||||||
yl_speak_up.show_fs(player, "edit_option_dialog",
|
yl_speak_up.show_fs(player, "edit_option_dialog",
|
||||||
{n_id = n_id, d_id = d_id, o_id = o_id})
|
{n_id = n_id, d_id = d_id, o_id = o_id})
|
||||||
return
|
return
|
||||||
-- TODO: log the change
|
|
||||||
-- if(not(yl_speak_up.npc_was_changed[ n_id ])) then
|
|
||||||
-- yl_speak_up.npc_was_changed[ n_id ] = {}
|
|
||||||
-- end
|
|
||||||
-- table.insert(yl_speak_up.npc_was_changed[ n_id ],
|
|
||||||
-- "Dialog "..d_id..": Option "..tostring(o_id)..
|
|
||||||
-- " no longer provides quest step \""..
|
|
||||||
-- tostring(fields.quest_step).."\" for quest \""..tostring(fields.quest_id).."\".")
|
|
||||||
-- yl_speak_up.show_fs(player, "edit_option_dialog",
|
|
||||||
-- {n_id = n_id, d_id = d_id, o_id = o_id})
|
|
||||||
elseif(not(fields) or not(fields.save)) then
|
elseif(not(fields) or not(fields.save)) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user