From e935136d58dc863541a6a53c6f5e9f9d218e6661 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 4 Feb 2021 12:35:24 +0100 Subject: Make is_node_loaded() checks also for mesecon interactions and digiline_send(), move on_updated_from_nodedb to advtrains table --- advtrains_luaautomation/active_common.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'advtrains_luaautomation') diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index 2146c93..7db3eaf 100644 --- a/advtrains_luaautomation/active_common.lua +++ b/advtrains_luaautomation/active_common.lua @@ -125,7 +125,9 @@ function ac.run_in_env(pos, evtdata, customfct_p) if minetest.global_exists("digiline") then customfct.digiline_send=function(channel, msg) assertt(channel, "string") - digiline:receptor_send(pos, digiline.rules.default, channel, msg) + if advtrains.is_node_loaded(pos) then + digiline:receptor_send(pos, digiline.rules.default, channel, msg) + end end end -- add lines scheduler if enabled -- cgit v1.2.3