mirror of
https://github.com/mt-mods/signs_lib.git
synced 2024-12-26 01:00:17 +01:00
don't try to run the glow code if the sign's being punched by a machine
that doesn't use a fake player object e.g. basic_machines
This commit is contained in:
parent
8b6f5e23a6
commit
02c19e89d9
2
api.lua
2
api.lua
@ -942,7 +942,9 @@ function signs_lib.register_fence_with_sign()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local use_glow = function(pos, node, puncher, pointed_thing)
|
local use_glow = function(pos, node, puncher, pointed_thing)
|
||||||
|
if puncher then -- if e.g. a machine tries to punch; only a real person should change the lighting
|
||||||
signs_lib.glow(pos, node, puncher)
|
signs_lib.glow(pos, node, puncher)
|
||||||
|
end
|
||||||
return signs_lib.update_sign(pos)
|
return signs_lib.update_sign(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user