From 02c19e89d978cf5a6f183cacca5afb91dc83b764 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Sat, 29 May 2021 07:58:01 -0400 Subject: [PATCH] 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 --- api.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 103c0d4..8a60208 100644 --- a/api.lua +++ b/api.lua @@ -942,7 +942,9 @@ function signs_lib.register_fence_with_sign() end local use_glow = function(pos, node, puncher, pointed_thing) - signs_lib.glow(pos, node, puncher) + 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) + end return signs_lib.update_sign(pos) end