diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-02-03 20:40:30 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-02-03 20:40:30 +0100 |
commit | 328d5054a105869c7e12df1941ceedb308ef1faa (patch) | |
tree | 736df563aa116e08e8ae4284b38a90852b25bd1e /advtrains/advtrains_luaautomation/init.lua | |
parent | a72dda17be2175d5df8f1b7dd28e5ddeabe1494d (diff) | |
download | advtrains-328d5054a105869c7e12df1941ceedb308ef1faa.tar.gz advtrains-328d5054a105869c7e12df1941ceedb308ef1faa.tar.bz2 advtrains-328d5054a105869c7e12df1941ceedb308ef1faa.zip |
Revert change to node pos hashes, and rewrite trackdb to use individual coordinates
The precision of integers was not sufficient for saving pos node hashes in most cases, leading to strange bugs.
This fixes broken ATC rails, broken LuaAutomation stuff and trackdb on Windows.
Probably also fixes trains randomly stopping.
Diffstat (limited to 'advtrains/advtrains_luaautomation/init.lua')
-rw-r--r-- | advtrains/advtrains_luaautomation/init.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/advtrains/advtrains_luaautomation/init.lua b/advtrains/advtrains_luaautomation/init.lua index 37e5714..d88944f 100644 --- a/advtrains/advtrains_luaautomation/init.lua +++ b/advtrains/advtrains_luaautomation/init.lua @@ -25,7 +25,9 @@ dofile(mp.."/interrupt.lua") dofile(mp.."/active_common.lua") dofile(mp.."/atc_rail.lua") dofile(mp.."/operation_panel.lua") -dofile(mp.."/p_mesecon_iface.lua") +if mesecon then + dofile(mp.."/p_mesecon_iface.lua") +end dofile(mp.."/chatcmds.lua") @@ -34,8 +36,10 @@ local file, err = io.open(filename, "r") if not file then minetest.log("error", " Failed to read advtrains_luaautomation save data from file "..filename..": "..(err or "Unknown Error")) else + atprint("luaautomation reading file:",filename) local tbl = minetest.deserialize(file:read("*a")) if type(tbl) == "table" then + atprint(tbl) if tbl.version==1 then for envname, data in pairs(tbl.envs) do atlatc.envs[envname]=atlatc.env_load(envname, data) @@ -97,4 +101,3 @@ minetest.register_globalstep(function(dtime) atlatc.save() end end) -minetest.register_on_shutdown(atlatc.save) |