diff options
author | Singularis <singularis@volny.cz> | 2024-11-13 07:34:56 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-05-27 20:22:01 +0200 |
commit | 6f3f1da1aa11a940dac614d9f2c9326d3a97caea (patch) | |
tree | 7843f5795296030b2a11ee0a5f517a6b887c874a | |
parent | 30cead3d1d27037596d077a23547020d7af47f11 (diff) | |
download | advtrains-6f3f1da1aa11a940dac614d9f2c9326d3a97caea.tar.gz advtrains-6f3f1da1aa11a940dac614d9f2c9326d3a97caea.tar.bz2 advtrains-6f3f1da1aa11a940dac614d9f2c9326d3a97caea.zip |
[ch_core/shapes_db] vráceny skleněné desky 8/16
-rw-r--r-- | advtrains/init.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 8228371..bc82962 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -22,6 +22,9 @@ Copyright (C) 2016-2020 Moritz Blei (orwell96) and contributors local lot = os.clock() minetest.log("action", "[advtrains] Loading...") +local has_itrainmap = minetest.get_modpath("advtrains_itrainmap") +local has_luaautomation = minetest.get_modpath("advtrains_luaautomation") + -- 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") @@ -422,7 +425,7 @@ function advtrains.load_version_4() end --== load luaatc == - if minetest.get_modpath("advtrains_luaautomation") and atlatc then + if has_luaautomation and atlatc then local la_save = serialize_lib.load_atomic(advtrains.fpath.."_atlatc.ls") if la_save then atlatc.load(la_save) @@ -526,7 +529,7 @@ advtrains.avt_save = function(remove_players_from_wagons) -- save of luaatc local la_save - if minetest.get_modpath("advtrains_luaautomation") and atlatc then + if has_luaautomation and atlatc then la_save = atlatc.save() end @@ -611,10 +614,10 @@ minetest.register_globalstep(function(dtime_mt) end advtrains.mainloop_trainlogic(dtime,advtrains.mainloop_runcnt) - if advtrains_itm_mainloop then + if has_itrainmap and advtrains_itm_mainloop then advtrains_itm_mainloop(dtime) end - if minetest.get_modpath("advtrains_luaautomation") and atlatc then + if has_luaautomation and atlatc then --atlatc.mainloop_stepcode(dtime) atlatc.interrupt.mainloop(dtime) end @@ -646,7 +649,7 @@ function advtrains.load() --if minetest.get_modpath("advtrains_luaautomation") and atlatc then -- atlatc.load() --includes interrupts --end == No longer loading here. Now part of avt_save() legacy loading. - if advtrains_itm_init then + if has_itrainmap and advtrains_itm_init then advtrains_itm_init() end init_load=true @@ -677,7 +680,7 @@ function advtrains.save(remove_players_from_wagons) local t1 = os.clock() advtrains.avt_save(remove_players_from_wagons) --saving advtrains. includes ndb at advtrains.ndb.save_data() - if minetest.get_modpath("advtrains_luaautomation") and atlatc then + if has_luaautomation and atlatc then atlatc.save() end atlog("Saved advtrains save files, took",math.floor((os.clock()-t1) * 1000),"ms") |