From ae152bf5bba370c1ace3763054176e5a7d083ae9 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 2 Nov 2021 23:15:16 +0100 Subject: LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller) --- advtrains_luaautomation/active_common.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'advtrains_luaautomation/active_common.lua') diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index 9bf8377..0eb687c 100644 --- a/advtrains_luaautomation/active_common.lua +++ b/advtrains_luaautomation/active_common.lua @@ -97,7 +97,7 @@ function ac.on_receive_fields(pos, formname, fields, player) end end -function ac.run_in_env(pos, evtdata, customfct_p) +function ac.run_in_env(pos, evtdata, customfct_p, ignore_no_code) local ph=minetest.pos_to_string(pos) local nodetbl = ac.nodes[ph] if not nodetbl then @@ -116,7 +116,9 @@ function ac.run_in_env(pos, evtdata, customfct_p) end local env = atlatc.envs[nodetbl.env] if not nodetbl.code or nodetbl.code=="" then - env:log("warning", "LuaAutomation component at",ph,": No code to run! (insert -- to suppress warning)") + if not ignore_no_code then + env:log("warning", "LuaAutomation component at",ph,": No code to run! (insert -- to suppress warning)") + end return false end -- cgit v1.2.3