log execution of effects

This commit is contained in:
Sokomine 2022-10-09 00:44:42 +02:00
parent dbc7f4a12c
commit ca0a699a3e

View File

@ -81,7 +81,22 @@ yl_speak_up.execute_all_relevant_effects = function(player, effects, o_id, actio
if(not(res)) then
yl_speak_up.debug_msg(player, n_id, o_id, tostring(r.r_id)..
" -> Effect failed to execute.")
if(r.r_type ~= "dialog") then
local d_id = yl_speak_up.speak_to[pname].d_id
yl_speak_up.log_change(pname, n_id,
"Failed to execute effect "..tostring(r.r_id)..
" "..tostring(o_id).." "..tostring(d_id)..": "..
yl_speak_up.show_effect(r, pname))
end
alternate_text = r.alternate_text
else
if(r.r_type ~= "dialog") then
local d_id = yl_speak_up.speak_to[pname].d_id
yl_speak_up.log_change(pname, n_id,
"Executed effect "..tostring(r.r_id)..
" "..tostring(o_id).." "..tostring(d_id)..": "..
yl_speak_up.show_effect(r, pname))
end
end
if(r and r.r_type and r.r_type == "deal_with_offered_item") then
refuse_items = true