small security fixes in advtrains_luaautomation/

- fixed file permissions of advtrains_luaautomation/README.md (755->644)
 - fixed file permissions of advtrains_luaautomation/environment.lua (755->644)
 - prevented LuaATC section_occupancy() from having direct access to the interlocking section id occupancy table
 - simplify section_occupancy() logic
This commit is contained in:
Maverick2797 2022-11-25 18:38:10 +08:00 committed by orwell96
parent cad4809b99
commit 82987b1a4f
2 changed files with 2 additions and 5 deletions

0
advtrains_luaautomation/README.md Executable file → Normal file
View File

7
advtrains_luaautomation/environment.lua Executable file → Normal file
View File

@ -229,11 +229,8 @@ if advtrains.interlocking then
if not ts_id then return nil end
ts_id = tostring(ts_id)
local response = advtrains.interlocking.db.get_ts(ts_id)
if response == nil then
return false
else
return response.trains
end
if not response then return false end
return table.copy(response.trains)
end
end