diff options
author | orwell <orwell@bleipb.de> | 2025-01-09 09:09:08 +0100 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2025-01-09 09:09:08 +0100 |
commit | 3d3752f50aff5889c699e6ba7c27ee1899f890e9 (patch) | |
tree | 40de47631d0f5cc48337a6f5fa012fc07eb7453d | |
parent | 021332c4aaaf8cfd18b3f08e5f069b203097f01d (diff) | |
download | advtrains-3d3752f50aff5889c699e6ba7c27ee1899f890e9.tar.gz advtrains-3d3752f50aff5889c699e6ba7c27ee1899f890e9.tar.bz2 advtrains-3d3752f50aff5889c699e6ba7c27ee1899f890e9.zip |
Convert old PTS format on freeing route locks (route_post is not migrated)
-rw-r--r-- | advtrains_interlocking/routesetting.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua index 0668e62..6544a92 100644 --- a/advtrains_interlocking/routesetting.lua +++ b/advtrains_interlocking/routesetting.lua @@ -265,6 +265,11 @@ function ilrs.free_route_locks(ts, lcks, nocallbacks) end function ilrs.free_route_locks_indiv(pts, ts, nocallbacks) + -- legacy: if starts with bracket then pts is still in old pos_to_string format (may happen because ts.route_post is not migrated) + if string.match(pts, "^%(") then + atdebug("free_route_locks_indiv: converting position",pts) + pts = advtrains.encode_pos(minetest.string_to_pos(pts)) + end local e = ilrs.rte_locks[pts] if not e then return nil elseif #e==0 then |