bugfix: clear tmp_data_cache properly

This commit is contained in:
Sokomine 2022-01-04 01:24:42 +01:00
parent c774c542ea
commit 6f127bd3b4

View File

@ -782,6 +782,17 @@ yl_speak_up.input_fs_edit_option_related = function(player, formname, fields,
return
end
-- clear editing cache tmp_data_cache for all other types
if(id_prefix ~= "p_") then
yl_speak_up.speak_to[pname][ "tmp_prereq" ] = nil
end
if(id_prefix ~= "a_") then
yl_speak_up.speak_to[pname][ "tmp_action" ] = nil
end
if(id_prefix ~= "r_") then
yl_speak_up.speak_to[pname][ "tmp_effect" ] = nil
end
-- delete precondition, action or effect
if(fields.delete_element) then
yl_speak_up.delete_element_p_or_a_or_e( player, pname, n_id, d_id, o_id, x_id, id_prefix,