diff options
author | orwell96 <orwell@bleipb.de> | 2021-11-02 23:15:16 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2021-11-02 23:15:16 +0100 |
commit | ae152bf5bba370c1ace3763054176e5a7d083ae9 (patch) | |
tree | d85ed0b1af38ea6d2545fe922196427cd8de1dd0 /advtrains_luaautomation/active_common.lua | |
parent | 35d5106a2141a3de83a8add3996ecc2dfbd141e7 (diff) | |
download | advtrains-ae152bf5bba370c1ace3763054176e5a7d083ae9.tar.gz advtrains-ae152bf5bba370c1ace3763054176e5a7d083ae9.tar.bz2 advtrains-ae152bf5bba370c1ace3763054176e5a7d083ae9.zip |
LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller)
Diffstat (limited to 'advtrains_luaautomation/active_common.lua')
-rw-r--r-- | advtrains_luaautomation/active_common.lua | 6 |
1 files changed, 4 insertions, 2 deletions
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 |