From: Zefram Date: Fri, 1 Aug 2014 16:30:21 +0000 (+0100) Subject: Fix behaviour on decabling a forcefield emitter X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2a7ee141ebe26c7a7afe08e6ef3db67467ec9cd9;p=zefram%2Fminetest%2Ftechnic.git Fix behaviour on decabling a forcefield emitter --- 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", {