aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-19 22:57:29 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2020-07-19 22:57:29 +0200
commit7de2a9142f0b27f2b03235a6a47d9e2f02245852 (patch)
treed921fa94887d8fac215b929c912940a92f7dbf8e /advtrains/init.lua
parent3040c53413a5ddb7e0e84f02f85de7868510c889 (diff)
parent19509acf56aef4b6e5f45023ee5603e95822fe69 (diff)
downloadadvtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.tar.gz
advtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.tar.bz2
advtrains-7de2a9142f0b27f2b03235a6a47d9e2f02245852.zip
Merge branch 'master' of bananach.space:advtrains
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r--advtrains/init.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index 28e104e..84cfa38 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -39,6 +39,12 @@ AT_CMAX = 16
advtrains = {trains={}, player_to_train_mapping={}}
+-- get wagon loading range
+advtrains.wagon_load_range = tonumber(minetest.settings:get("advtrains_wagon_load_range"))
+if not advtrains.wagon_load_range then
+ advtrains.wagon_load_range = tonumber(minetest.settings:get("active_block_range"))*16
+end
+
--pcall
local no_action=false