Commit Graph

10 Commits

Author SHA1 Message Date
Maverick2797 852e2f4219 LuaATC add trainparts(train_id)
Returns a copy of the trainparts table to allow tracking individual wagon ids
Also fixed a couple of file permissions from previous commits
2024-09-02 22:25:05 +02:00
Maverick2797 55108ae38e LuaATC set_fc(): add argument to reset fc index to 1 2024-09-02 22:22:38 +02:00
Maverick2797 3a6b1ca850 Add get_fc() and set_fc() commands
get_fc: returns a table of each wagon's FC codes
set_fc: set a table to overwrite the FC codes of a train's wagons
2023-03-17 20:03:12 +01:00
Maverick2797 82987b1a4f 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
2023-03-17 19:57:43 +01:00
Maverick2797 23d524df71 Luaautomation: add section_occupancy()
Returns a table of train ids for the specified section.
Returns nil if the section id is not provided..
Returns false if the section id is invalid.
Returns an empty table if the section id is valid but empty of trains.
2021-12-29 21:16:32 +01:00
Maverick2797 43c85ab8cf readme atc_set_ars_disable typo 2021-11-09 21:45:33 +01:00
Maverick2797 4cf9e5283b split_at_index where index=1
Splitting at index=1 results in multiple empty trains being created.
Can be prevented by an atc_speed > 0 check by the user, but easier just to return false and do nothing.
2021-11-08 22:58:23 +01:00
orwell96 6135f8a23b LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166) 2021-03-02 19:51:56 +01:00
orwell96 04c78373f1 LuaATC: add interrupt_safe() and clear_interrupts(), fix queue mainloop 2021-02-17 19:45:52 +01:00
orwell96 d13a610c2e Clean up structure of atlatc README.md after rebase 2021-02-17 18:16:22 +01:00