aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
Commit message (Collapse)AuthorAge
* Merge branch 'master' into route_prog_reworkorwell4 days
|\
| * Implement staticdata for trainsY. Wang6 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch exposes train.staticdata that can be used by other modders to save data in trains across restarts. It additionally exposes two new APIs for modders where this is relevant: * advtrains.te_register_on_couple(function(init_train, stat_train)): registers a callback for train coupling, where stat_train is couple into init_train and is subsequently removed. This callback is run before the actual coupling takes place; in particular, it is run before stat_train is removed. * advtrains.te_register_on_decouple(function(train, newtrain, index)): registers a callback for train decoupling, where newtrain is created by splitting the train at the given index (the wagon at the index is part of the new train). This callback is run after decoupling takes place. advtrains.te_register_on_decouple(function
| * Autogenerate .tr files from .po filesY. Wang11 days
| |
| * Rework translation system to use PO filesywang11 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The French translations are provided by Tanavit. Unfortunately I was not able to keep this addition as a separate commit as the translation file was originally added as a .tr file that I then converted to .po file in the meantime. Also note that this commit is created from squashing 20+ commits from the l10n branch that preceded the transition to PO files. In addition to changes to the locale files (which were all included in the single commit for transitioning to PO files), these commits also included code that has now become obsolete for l10n work. In particular, it included a GUI program written in Tcl to edit .tr files; this program can now be found in the following repo: https://codeberg.org/y5nw/mt_tr_editor Co-authored-by: Tanavit <tanavit@posto.ovh>
| * Add Wagon Properties ToolMaverick27972024-08-09
| | | | | | | | Also added the Wagon ID to the Wagon Properties formspec
| * Fix boardcom train id display, add command to teleport to train by idgpcf2024-08-08
| |
| * Rework graphical train HUD codeY. Wang2024-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A basic texture manipulation API is added; currently this is only a (selected) subset of texture modifiers provided by MT; the goal is to avoid writing (potentially incorrect) texture strings by hand; - The graphical HUD code is cleaned up; in particular, most code used for generating texture patterns are moved to texture.lua so that the code can be used outside of the HUD; - Inactive elements are given the darkslategray background. A basic unittest is added; however, it needs to be expanded for better coverage. Reported-by: Lars Müller <appgurulars@gmx.de>
| * Add chatcommand and luaatc function to get global_slowdownorwell2024-02-06
| |
| * Set maximum train length and prevent coupling if it would exceedorwell2023-12-20
| |
* | SmartRoute: Implement auto route search and first prototypeorwell2024-06-22
| |
* | Merge branch 'new-ks-orwell' into route_prog_reworkorwell2024-04-08
|\ \
| * | Implement basic route signaling with Japanese signals for demoY. Wang2023-03-23
| |/
* | Re-implement point origin handling (replace old points_split hack by proper ↵orwell2023-10-15
| | | | | | | | solution)
* | Forget it, and use the old preset tables for track registration. Just adapt ↵orwell2023-10-15
| | | | | | | | it to the new definition.
* | Add TrackIterator interface as a common framework for walking along tracks ↵orwell962023-05-27
|/ | | | | | (also for third-party libs) This will replace the interlocking traverser and will be used in the new itrainmap implementation
* Support different types of speed restrictions; add documentationywang2021-11-07
|
* Train Coupling: Change behavior so that train direction of initiating train ↵orwell962021-10-25
| | | | is kept, add ATC Cpl command
* Shutdown callback: don't save advtrains save files when MT crashed within ↵orwell962021-07-07
| | | | advtrains's main step
* Add /at_whereis command to check the position of a train.Gabriel Pérez-Cerezo2021-04-10
|
* Make DTIME_LIMIT and SAVE_INTERVAL globally accessibleorwell962021-02-15
|
* Add save interval setting, fix accidental global variable, at_sync_ndb on ↵orwell962021-02-10
| | | | server priv not limited, timetaking for restore_all
* Log how long saving takesorwell962021-02-10
|
* Make dtime limiting a settingorwell962021-02-10
|
* Remove debug facilitiesorwell962021-02-10
|
* Add global slowdown factor instead of hard dtime limitingorwell962021-02-10
|
* Add debug prints, modify LZB to fix problems with look_aheadorwell962021-02-10
|
* Add IGNORE_WORLD mode to test using only the advtrains save dataorwell962021-02-10
|
* Always do zero-barrier check and prevent LZB 0 overruns in movement logicorwell962021-02-10
|
* Fix lots of things around new LZBorwell962021-02-10
|
* Remove pcall wrappers completely, add command to disable advtrains mainlooporwell962021-02-10
|
* Implement a LZB speed lookup table for the path and rewrite velocity controlsorwell962021-02-10
|
* Disable ARS train flag and surrounding usesorwell962021-02-10
|
* Some more serializer fixes (backported from new_lzb):orwell962021-01-12
| | | | | | - Move DUMP_DEBUG_SAVE block before the actual saving so it can be used to trace serializer errors - Don't crash on functions in data, ignore them silently - Increase the save interval
* Backport ndb format from cellworld to also store the cids in the ndb file; ↵orwell962021-01-12
| | | | integrate ndb in serialize_lib atomic system
* Make advtrains use serialize_lib (save version 4)orwell962021-01-12
| | | | Old save format will be gracefully migrated
* DUMP_DEBUG_SAVE also dumps interlocking dataorwell962021-01-12
|
* [BREAKING] Use client-side translations instead of intllib; add zh_CN ↵ywang2020-07-19
| | | | | | | | translations * Client-side translations is used instead of intllib. [Breaks MT4 compat] * Existing locale files have been moved to advtrains/locale and named with the format advtrains.[lang].tr * Add zh_CN locale. (requires a font that supports CJK text)
* Add workaround to unload wagons that are too far away from playersorwell962020-07-12
|
* Add "Fallback state" for freed routes, move p_mesecon_iface.lua to coreorwell962020-07-07
|
* 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.
* Workaround to handle split points (dt. aufgefahrene Weichen), fixing H#77orwell962020-06-10
|
* Draft copy toolBlockhead2020-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | The copy tool copies a train to a global clipboard. It copies the Line number, Routing code, inside text and outside text. It copies the kinds of wagons in the train and whether they are flipped around. Pasting with the copy tool will conditionally flip the train such that 'your front' of the train, rather than the absolute front of the train, is what is output. The new train is oriented to travel forward with the placing player's view. Conditons are: - Multi-unit/push-pull train (= has locomotives on both ends): Never flipped - Locomotive-hauled train (= has one end with a locomotive): Flipped so that the locomotive is always at the front. If the locomotive points long hood forward, it will still point long hood forward. - Rake of wagons (= has no locomotives on ends): Flipped according to which end of the train the player copies from. If the player is towards the back (wagon out of train divded by total wagons > 0.5), then the back becomes the new front. If the player is towards the front, no change.
* Relicense under AGPLv3 and update information in readme.txtorwell962020-02-15
|
* Use minetest.safe_file_write() to atomically save state [Breaks MT4 compat]orwell962020-01-10
|
* New version 3 save system.Gabriel Pérez-Cerezo2019-07-23
| | | | | This new save system exists to split up the save file into several smaller ones, to bypass lua limitations.
* Keep a backup file where stuff is written to when savingGabriel Pérez-Cerezo2019-07-16
| | | | This should prevent yet another train service disaster.
* Railway Time: Basic time counter and utility functionsorwell962019-06-19
|
* Move LZB system to core and unify approach callback mechanismorwell962019-04-16
|
* Ugly workaround for green signals bugorwell962019-03-15
|
* Basic functions of "stop rail", missing ARS rules and signal.orwell962019-01-24
| | | | For signal, need to think of a callback system for signals and moving atlatc queue to core?