| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it turns out, not fully testing new features is not necessarily a
good idea ...
This patch follows up 1F616EMO's patch by
* Making get_wagon_prototype return the resolved alias,
* Handling recursive wagon alises (in particular, loops), and
* Adding (partial) unittest for the wagon aliasing system. [v2]: The
testcases are complemented a bit more to cover situations where the
alias resolution system should return nil.
[v2]: This patch should hopefully also warn about not spawning wagons.
Note that this only warns about the missing wagon entity and does _not_
actually fix the issue.
How to test:
* In a world with both advtrains_train_subway and advtrains_train_japan
enabled, place a subway wagon, a Japanese engine, and a regular
Japanese wagon.
* Add the test mod to the world; do NOT remove advtrains_train_japan.
* Restart the world. Notice that the Japanese wagons still appear as
Japanese wagons despite being aliased to subway wagons.
* Restart the world without the advtrains_train_japan mod. Notice that
the engine appears as the subway wagon while the regular Japanese
wagon appears as the wagon placeholder. [v2]: Also note that the
warning message about the missing wagon prototype still mentions the
regular Japanese wagon.
* Restart the world again with the advtrains_train_japan mod. Notice
that both type of Japanese wagons reappear as Japanese wagons.
* Observe that unittests work.
Test mod:
advtrains.register_wagon_alias("advtrains:engine_japan", "advtrains:subway_wagon")
advtrains.register_wagon_alias("advtrains:wagon_japan", "advtrains:wagon_japan")
|
|
|
|
| |
Press sneak to force default behavior.
|
| |
|
| |
|
| |
|
|
|
|
| |
remains transparent and the player can copy the Train ID.
|
|
|
|
| |
Also added the Wagon ID to the Wagon Properties formspec
|
| |
|
|
|
|
| |
without LuaATC
|
| |
|
|
|
|
|
| |
Can be used to determine which wagon is at a certain world position
Testing: use debugitems.lua
|
|
|
|
| |
leftover train.debug
|
|
|
|
|
|
| |
wagons
Adds field "wheel_positions" in wagon definition
|
|
|
|
|
|
|
|
|
| |
Based on the advtrains wiki groups:
Type Group Classifier
- Locomotives: group:at_loco is_locomotive = true
- Controllable: group:at_control seat_groups.dstand
- Passengers: group:at_pax seat_groups.pass
- Freight: group:at_freight has_inventory = true
|
|
|
|
|
|
|
| |
- Adds a separate collision system for trains sharing a path
- Moved some coupling-related code to couple.lua and refactor it
- Handle coupling in a way that the initiating train always keeps its ID
- As a side effect, engine has its direction reversed after coupling
|
|
|
|
| |
Reported by Vanessa Dannenberg
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
distance-based approach or minetest.is_block_active() if available
See also https://github.com/minetest/minetest/pull/10897
|
|
|
|
|
|
|
| |
This command kicks out all passengers when the train is stopped and
its doors are open. In addtion, a wagon:is_driver_stand(seat) function
was added to allow finding out easily if a seat is the driver stand of
the wagon.
|
|
|
|
| |
Needed for linetrack boat sound bug
|
|
|
|
|
| |
Work around the entity flood bug caused by improper engine handling of
static_save=false
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previously, players were able to open the wagon properties of any wagon at all
through the wagon properties button on the inventory formspec and through the
wagon buttons on the onboard computer. Add a check for ownership before
allowing players to open wagon properties.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A road number is used to allow users to set their own wagon numbers
other than the internal IDs assigned by advtrains. A railway company
would typically keep a roster of what rollingstock it has in road
numbers.
The road number can be set on the wagon properties formspec. It is
displayed above the wagon's inventory icon in the onboard computer as a
button, which will then open the wagon properties on that wagon.
Road numbers might be displayable as additional text entities on the
wagon like signs.
Currently opening the wagon properties (and sometimes onboard computer)
formspecs can be quite unreliable (at least on windows), so I hope that
closing the wagon 'main menu' before opening other formspecs helps that
reliability. It seems to be an upstream bug.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This new formspec also allows access to the wagon properties. Once
whitelisted in the wagon properties, other players can access its
inventory.
Note on 'useless use' of OO: I tried passing just the wagon ID and
avoiding using the `self` object in order to bypass the need to look up
the lua entitie out of the list, but it ended up retrieving nil data.
The best way to solve this overhead might be to wait for some kind of
better way upstream in minetest's lua API to get entities, or to keep a
central record of entities. Either way, the solution is outside the
scope of this commit.
|
|/ |
|
| |
|
| |
|
|\ |
|