From 322128acfcf90195629bb4fb5d0c509ef208551c Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Mon, 10 Dec 2018 21:17:11 +0100 Subject: [PATCH] move node_timer function below run() --- mesecons_luacontroller/init.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index ef10c78..83ce324 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -421,16 +421,6 @@ local function get_digiline_send(pos, itbl, send_warning) end end -local function node_timer(pos) - local iid = minetest.get_meta(pos):get_string("iid") - if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then - return false - end - run(pos, {type="interrupt", iid = iid}) - return false -end - - local safe_globals = { -- Don't add pcall/xpcall unless willing to deal with the consequences (unless very careful, incredibly likely to allow killing server indirectly) "assert", "error", "ipairs", "next", "pairs", "select", @@ -666,6 +656,15 @@ local function reset(pos) set_port_states(pos, {a=false, b=false, c=false, d=false}) end +local function node_timer(pos) + local iid = minetest.get_meta(pos):get_string("iid") + if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then + return false + end + run(pos, {type="interrupt", iid = iid}) + return false +end + ----------------------- -- A.Queue callbacks -- -----------------------