| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Also added the Wagon ID to the Wagon Properties formspec
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
| |
|
| |
|
| |
|
|
|
|
| |
is kept, add ATC Cpl command
|
|
|
|
| |
advtrains's main step
|
| |
|
| |
|
|
|
|
| |
server priv not limited, timetaking for restore_all
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
integrate ndb in serialize_lib atomic system
|
|
|
|
| |
Old save format will be gracefully migrated
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
This new save system exists to split up the save file into several
smaller ones, to bypass lua limitations.
|
|
|
|
| |
This should prevent yet another train service disaster.
|
| |
|
| |
|
| |
|
|
|
|
| |
For signal, need to think of a callback system for signals and moving atlatc queue to core?
|
| |
|
|
|
|
| |
Used for ARS and stop points
|
|
|
|
| |
those rely on
|
|
|
|
|
|
| |
basis for "stop rails"
Stop rails ATM use the aforementioned things to add a pointwise "2" speed restriction. Seems to work.
|
|
|
|
| |
documentation on privileges
|
|
|
|
| |
(Master downgrade protection)
|
|
|
|
| |
and fix permissions on that
|