forked from Sokomine/yl_speak_up
added exception for npc_was_changed in functions.lua
This commit is contained in:
parent
1cc4f2e742
commit
04b67da670
@ -2,10 +2,6 @@
|
||||
-- Init
|
||||
--###
|
||||
|
||||
-- changes applied in edit_mode are applied immediately - but not immediately stored to disk
|
||||
-- (this gives the players a chance to back off in case of unwanted changes)
|
||||
-- TODO yl_speak_up.npc_was_changed = {}
|
||||
|
||||
-- self (the npc as such) is rarely passed on to any functions; in order to be able to check if
|
||||
-- the player really owns the npc, we need to have that data available;
|
||||
-- format: yl_speak_up.npc_owner[ npc_id ] = owner_name
|
||||
@ -274,7 +270,9 @@ yl_speak_up.add_new_option = function(dialog, pname, next_id, d_id, option_text,
|
||||
dialog.n_dialogs[d_id].d_options[future_o_id].o_sort = s
|
||||
-- log only in edit mode
|
||||
local n_id = yl_speak_up.speak_to[pname].n_id
|
||||
if(yl_speak_up.npc_was_changed[ n_id ]) then
|
||||
-- would be too difficult to add an exception for edit_mode here; thus, we do it directly here:
|
||||
if(yl_speak_up.npc_was_changed
|
||||
and yl_speak_up.npc_was_changed[n_id]) then
|
||||
table.insert(yl_speak_up.npc_was_changed[ n_id ],
|
||||
"Dialog "..d_id..": Added new option/answer "..future_o_id..".")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user