From f7e7b4ba492c2bc3ee4b1714b76dbaeab5999411 Mon Sep 17 00:00:00 2001 From: Zenon Seth Date: Sun, 17 Mar 2024 14:47:38 +0000 Subject: [PATCH] Fix minor bug that caused machines to assume wrong power state at times --- util/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/common.lua b/util/common.lua index 120fa13..aa32e81 100644 --- a/util/common.lua +++ b/util/common.lua @@ -97,8 +97,8 @@ function logistica.toggle_machine_on_off(pos) local newState = (meta:get_int(META_ON_OFF_KEY) + 1) % 2 local def = minetest.registered_nodes[node.name] if def and def.logistica and def.logistica.on_power then - def.logistica.on_power(pos, newState > 0) meta:set_int(META_ON_OFF_KEY, newState) + def.logistica.on_power(pos, newState > 0) return newState > 0 end return nil