DML/modules/sixthSense.lua
Christian Franz 78ff9a10e0 Version 1.1.2
More persistence
2022-08-11 12:33:28 +02:00

19 lines
510 B
Lua

sixthSense = {}
sixthSense.version = "1.0.0"
-- sniff out dead events and log them
function sixthSense:onEvent(event)
if event.id == 8 then -- S_EVENT_DEAD
if event.initiator then
local theObject = event.initiator
trigger.action.outText("DEAD event: " .. theObject:getName(), 30)
else
trigger.action.outText("DEAD event, no initiator", 30)
end
end
end
-- add event handler
world.addEventHandler(sixthSense)
trigger.action.outText("sixthSense v" .. sixthSense.version .. " loaded.", 30)