aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r--advtrains/init.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index 4a0b928..3918ab3 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -22,12 +22,18 @@ Copyright (C) 2016-2020 Moritz Blei (orwell96) and contributors
local lot = os.clock()
minetest.log("action", "[advtrains] Loading...")
+-- There is no need to support 0.4.x anymore given that the compatitability with it is already broken by 1bb1d825f46af3562554c12fba35a31b9f7973ff
+attrans = minetest.get_translator ("advtrains")
+function attrans_formspec(...)
+ return minetest.formspec_escape(attrans(...))
+end
+
--advtrains
advtrains = {trains={}, player_to_train_mapping={}}
-- =======================Development/debugging settings=====================
-- DO NOT USE FOR NORMAL OPERATION
-local DUMP_DEBUG_SAVE = false
+local DUMP_DEBUG_SAVE = true
-- dump the save files in human-readable format into advtrains_DUMP
local GENERATE_ATRICIFIAL_LAG = false
@@ -203,6 +209,7 @@ advtrains.poconvert.from_flat("advtrains")
attrans = minetest.get_translator("advtrains")
advtrains.speed = dofile(advtrains.modpath.."/speed.lua")
+advtrains.formspec = dofile(advtrains.modpath.."/formspec.lua")
advtrains.texture = dofile(advtrains.modpath.."/texture.lua")
dofile(advtrains.modpath.."/path.lua")
@@ -212,6 +219,7 @@ dofile(advtrains.modpath.."/trackplacer.lua")
dofile(advtrains.modpath.."/copytool.lua")
dofile(advtrains.modpath.."/wagonprop_tool.lua")
dofile(advtrains.modpath.."/tracks.lua")
+dofile(advtrains.modpath.."/track_reg_helper.lua")
dofile(advtrains.modpath.."/occupation.lua")
dofile(advtrains.modpath.."/atc.lua")
dofile(advtrains.modpath.."/wagons.lua")
@@ -235,6 +243,10 @@ end
dofile(advtrains.modpath.."/lzb.lua")
+if minetest.settings:get_bool("advtrains_register_debugitems") then
+ dofile(advtrains.modpath.."/debugitems.lua")
+end
+
--load/save
-- backup variables, used if someone should accidentally delete a sub-mod
@@ -475,7 +487,7 @@ advtrains.avt_save = function(remove_players_from_wagons)
"atc_brake_target", "atc_wait_finish", "atc_command", "atc_delay", "door_open",
"text_outside", "text_inside", "line", "routingcode",
"il_sections", "speed_restriction", "speed_restrictions_t", "is_shunt",
- "points_split", "autocouple", "atc_wait_autocouple", "ars_disable",
+ "path_ori_cp", "autocouple", "atc_wait_autocouple", "ars_disable",
"staticdata",
})
--then save it