diff --git a/exec_actions_action_inv_changed.lua b/exec_actions_action_inv_changed.lua index d16f056..b692067 100644 --- a/exec_actions_action_inv_changed.lua +++ b/exec_actions_action_inv_changed.lua @@ -21,12 +21,12 @@ yl_speak_up.action_inv_changed = function(inv, listname, index, stack, player, h local data = yl_speak_up.speak_to[pname][ "tmp_action" ] if(not(data) or (data.what ~= 4 and data.what ~= 5)) then -- we are editing an action - if(data) then + if(data and data.what ~= 10) then return end -- it might be a precondition data = yl_speak_up.speak_to[pname][ "tmp_prereq" ] - if(not(data) or (data.what ~= 8)) then + if(not(data) or (data.what ~= 10)) then return end target_fs = "edit_preconditions" diff --git a/fs/fs_add_trade_simple_in_edit_mode.lua b/fs/fs_add_trade_simple_in_edit_mode.lua index 1e22d0d..f28f85d 100644 --- a/fs/fs_add_trade_simple_in_edit_mode.lua +++ b/fs/fs_add_trade_simple_in_edit_mode.lua @@ -7,6 +7,7 @@ yl_speak_up.input_add_trade_simple = function(player, formname, fields, input_to return 0 end local pname = player:get_player_name() + local n_id = yl_speak_up.speak_to[pname].n_id input_to = "add_trade_simple" -- are we editing an action of the type trade?