summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2018-10-16 17:52:27 -0500
committercheapie <no-email-for-you@example.com>2018-10-16 17:52:27 -0500
commitd0e6e6ef5937a71c0706d6ed57d097dda68e5aab (patch)
treec327673b00892872245561036b240a2dce20eea7
parent9681340cc287aae926570df617dd891808350548 (diff)
downloadfirealarm-d0e6e6ef5937a71c0706d6ed57d097dda68e5aab.tar
firealarm-d0e6e6ef5937a71c0706d6ed57d097dda68e5aab.tar.gz
firealarm-d0e6e6ef5937a71c0706d6ed57d097dda68e5aab.tar.bz2
firealarm-d0e6e6ef5937a71c0706d6ed57d097dda68e5aab.tar.xz
firealarm-d0e6e6ef5937a71c0706d6ed57d097dda68e5aab.zip
Log when a pull station is pulled
-rw-r--r--firealarm_pullstation/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/firealarm_pullstation/init.lua b/firealarm_pullstation/init.lua
index d91f730..1d0756b 100644
--- a/firealarm_pullstation/init.lua
+++ b/firealarm_pullstation/init.lua
@@ -22,7 +22,7 @@ minetest.register_node(":firealarm:pullstation_off",{
local name = player:get_player_name()
minetest.chat_send_player(name,string.format("Position: %d,%d,%d",pos.x,pos.y,pos.z))
end,
- on_rightclick = function(pos,node)
+ on_rightclick = function(pos,node,clicker)
local devInfo = firealarm.getDevInfo("signaling",pos)
if devInfo then
devInfo.active = true
@@ -33,6 +33,8 @@ minetest.register_node(":firealarm:pullstation_off",{
local panelPos = minetest.get_position_from_hash(devInfo.associated)
if panelPos then firealarm.loadNode(panelPos) end
if type(firealarm.panelABM) == "function" then firealarm.panelABM(pos) end
+ local name = clicker:get_player_name()
+ minetest.log("action",string.format("%s pulled a fire alarm at (%d,%d,%d)",name,pos.x,pos.y,pos.z))
end
end
end,