log changes of properties

This commit is contained in:
Sokomine 2023-04-27 22:51:02 +02:00
parent 47277d555b
commit 5dd6ebe8e7

View File

@ -1,5 +1,4 @@
-- Properties for NPC
--
-- Properties for NPC --
-- This is used when an NPC doesn't have a specific dialog but still wants to
-- make use of a (or some) generic dialog(es)
@ -98,6 +97,9 @@ yl_speak_up.set_npc_property = function(pname, property_name, property_value, re
-- store it
if(property_data.entity) then
property_data.entity.yl_speak_up.properties[property_name] = property_value
local n_id = yl_speak_up.speak_to[pname].n_id
yl_speak_up.log_change(pname, n_id, "Property \""..tostring(property_name)..
"\" set to \""..tostring(property_value).."\".")
end
-- TODO: handle non-npc (blocks etc)
return "OK"