aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/active_common.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-02-04 12:35:24 +0100
committerorwell96 <orwell@bleipb.de>2021-02-04 12:35:24 +0100
commite935136d58dc863541a6a53c6f5e9f9d218e6661 (patch)
tree50d1dea4941799bd095e920fb1e89c493d7d283b /advtrains_luaautomation/active_common.lua
parent8ae405f00f7073bca8cb621612ab11bc730228a3 (diff)
downloadadvtrains-e935136d58dc863541a6a53c6f5e9f9d218e6661.tar.gz
advtrains-e935136d58dc863541a6a53c6f5e9f9d218e6661.tar.bz2
advtrains-e935136d58dc863541a6a53c6f5e9f9d218e6661.zip
Make is_node_loaded() checks also for mesecon interactions and digiline_send(), move on_updated_from_nodedb to advtrains table
Diffstat (limited to 'advtrains_luaautomation/active_common.lua')
-rw-r--r--advtrains_luaautomation/active_common.lua4
1 files changed, 3 insertions, 1 deletions
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