From 2a7ee141ebe26c7a7afe08e6ef3db67467ec9cd9 Mon Sep 17 00:00:00 2001 From: Zefram Date: Fri, 1 Aug 2014 17:30:21 +0100 Subject: [PATCH] Fix behaviour on decabling a forcefield emitter --- technic/machines/HV/forcefield.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua index f84cdb4..0e530e0 100644 --- a/technic/machines/HV/forcefield.lua +++ b/technic/machines/HV/forcefield.lua @@ -181,7 +181,11 @@ minetest.register_node("technic:forcefield_emitter_on", { end, mesecons = mesecons, technic_run = run, - technic_disabled_machine_name = "technic:forcefield_emitter", + technic_on_disable = function (pos, node) + local meta = minetest.get_meta(pos) + update_forcefield(pos, meta:get_int("range"), false) + technic.swap_node(pos, "technic:forcefield_emitter_off") + end, }) minetest.register_node("technic:forcefield", { -- 2.30.2