aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
Commit message (Collapse)AuthorAge
* Add get_fc() and set_fc() commandsMaverick27972023-03-17
| | | | | 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
* small security fixes in advtrains_luaautomation/Maverick27972023-03-17
| | | | | | | - 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
* Add punchers name to ops panel punch eventrelease-2.4.2Maverick27972023-03-12
| | | | event={type="punch", punch=true, name="foo"}
* atc_reset(): Removed unused string parameter and also clear ATC autocouple ↵orwell962021-12-31
| | | | | | flag (Cpl) Fixes H#189 and H#190
* Luaautomation: add section_occupancy()Maverick27972021-12-29
| | | | | | | 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.
* readme atc_set_ars_disable typoMaverick27972021-11-09
|
* split_at_index where index=1Maverick27972021-11-08
| | | | | 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.
* LuaATC: remove accidental mesecons hard-dependencyorwell962021-11-04
|
* LuaATC: Fix position of error label, use consistent name "LuaATC" instead of ↵orwell962021-11-02
| | | | "LuaAutomation"
* LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller)orwell962021-11-02
|
* LuaATC PCNaming: Allow naming active components using the toolorwell962021-11-02
|
* Hopefully fix #177orwell962021-04-25
|
* Fix undeclared globals warnings (#176)orwell962021-04-25
| | | | Reported by Vanessa Dannenberg
* Increase size of LuaATC code input forms to 15x12 unitsorwell962021-03-22
| | | | | The current size of the code form is rather limiting as it fills only a small part of the screen. Also adds global constant in init.lua so this can easily adapted in the future
* Remove "Last punched" from LuaATC init code fshlqkj2021-03-22
| | | | | Also removed the now-dead last punch pos helper code. Resized buttons accordinghly.
* Rework active_common formspec layouthlqkj2021-03-22
| | | | | | - Aligned stuff - Added style to use monospaced font in the code editor textarea - Added label to the environment dropdown
* Rework envsetup formspec layouthlqkj2021-03-22
| | | | | - Aligned stuff - Added style to use monospaced font in the code editor textarea
* Replace deprecated depends.txt's by mod.conf and organize dependencies ↵orwell962021-03-13
| | | | consistently, add modpack.conf
* LuaATC: add sending atc command to train by ID, and getters for in/out text ↵orwell962021-03-02
| | | | } local function safe_print(param) print(dump(param)) end local function safe_date() return(os.date("*t",os.time())) end -- string.rep(str, n) with a high value for n can be used to DoS -- the server. Therefore, limit max. length of generated string. local function safe_string_rep(str, n) if #str * n > mesecon.setting("luacontroller_string_rep_max", 64000) then debug.sethook() -- Clear hook error("string.rep: string length overflow", 2) end return string.rep(str, n) end -- string.find with a pattern can be used to DoS the server. -- Therefore, limit string.find to patternless matching. local function safe_string_find(...) if (select(4, ...)) ~= true then debug.sethook() -- Clear hook error("string.find: 'plain' (fourth parameter) must always be true in a LuaController"
* luaatc: don't fail train event when train has already passed the rail at ↵orwell962021-02-10
| | | | event time
* Add debug prints, modify LZB to fix problems with look_aheadorwell962021-02-10
|
* Fix things, rework signal aspect select dialog, transform old aspects on-the-flyorwell962021-02-10
|
* Add function to step through freight codesGabriel Pérez-Cerezo2020-07-26
|
* add split_train_at_fc luaatc commandGabriel Pérez-Cerezo2020-07-26
| | | | | | This command splits the train at the second non-empty FC it encounters, taking with it the first few freight cars that all go to the same destination.
* Make using the default tracks optional, even in submodsBlockhead2020-07-10
| | | | | | | | | | If advtrains_train_track is disabled, don't register any tracks that use its model like the LuaATC automation rail, point speed restriction rail, station/stop rail. For LuaATC, the definition for firing an event when a train runs over the rail needs to be moved into the common defs so that other mods like linetrack can use that as an interface.
* Add "Fallback state" for freed routes, move p_mesecon_iface.lua to coreorwell962020-07-07
|
* fix typo in luaautomationGabriel Pérez-Cerezo2020-07-02
|
* Add autocouple modeGabriel Pérez-Cerezo2020-06-29
| | | | | | | The shunting mode no longer makes trains couple, since it was meant for other purposes. For autocoupling, the new autocoupling mode is used. If trains are in autocouple mode, they couple when they collide with another train.
* document shunting mode, add unset_shunt to luaatcGabriel Pérez-Cerezo2020-06-08
|
* Apply minetest.formspec_escape() to prevent formspec injection (H#143)MT0.4Blockhead2020-01-04
|
* Fix RWT initialization when creating new world (H#142)orwell962019-12-18
|
* Fix scheduler crash (H#133)orwell962019-11-21
| | | | for loops don't work with manipulating i