aboutsummaryrefslogtreecommitdiff
path: root/advtrains/trainlogic.lua
Commit message (Collapse)AuthorAge
* Occupation system: store multiple indices for the same train, introduce ↵orwell962023-06-24
| | | | reverse_lookup_sel() to select appropriate index out of multiple based on a heuristic
* Report coordinates of wagons with unregistered prototypesY. Wang2023-04-12
| | | | Related issue: https://forum.minetest.net/viewtopic.php?p=414307#p414307
* On_Joinplayer: fix train ID check for attachment updateorwell962022-06-13
| | | | Previously, statement was always false because train_id is no longer in the luaentity
* Fix speed sign allowing v>max_speedY. Wang2021-12-16
|
* Trivial fixup for train decoupling regressionrelease-2.4.1ywang2021-11-20
|
* Support different types of speed restrictions; add documentationywang2021-11-07
|
* On-Track Collision system: Fix train teleportation when using ↵orwell962021-11-04
| | | | | | split_at_index() from LuaATC Issue was that train thought it would collide with the newly added back portion although it was already long past this train. Added additional check that current train index is not further than the collision point.
* Train Coupling: Change behavior so that train direction of initiating train ↵orwell962021-10-25
| | | | is kept, add ATC Cpl command
* Disable position-based collision and coupling system for very short trains ↵orwell962021-07-07
| | | | (such as single minecarts) to solve #155
* Rework train same-track collision system and deterministic couplingorwell962021-07-07
| | | | | | | - 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
* Make the collision mode configurableGabriel Pérez-Cerezo2021-06-30
| | | | | | | | If the advtrains_forgiving_collision setting is set to true, then the train only collides with nodes that do not have normal drawtype. Otherwise the old behavior is restored. This change is being made because there were users and mods relying on the old behavior, such as the railroad_paraphernalia mod's track blocker.
* Train-World collisions: Collide only with 'normal'-drawtype nodes.orwell962021-06-29
| | | | | | | As per discussion on the forum (https://forum.minetest.net/viewtopic.php?p=396745#p396745), changes the train-world collision logic to make trains only collide with nodes that are solid cubes. This allows for more creative freedom, but shifts the responsibility of building realistic railways to the players. In the future, a more sophisticated environment collision system might be invented, but this is low-priority and should be optional to save CPU.
* Entity Damage: Correct sign entity nameorwell962021-06-29
| | | | Reported by VanessaE
* Trains splitting: retain important properties (door state, line, texts etc)orwell962021-05-22
|
* Deregister player from train on death in all cases (fixes #119)release-2.3.0orwell962021-04-25
|
* Prevent splitting trains when they're off track (fixes #178)orwell962021-04-25
|
* Fix undeclared globals warnings (#176)orwell962021-04-25
| | | | Reported by Vanessa Dannenberg
* LZB: Look ahead before movement, not afterorwell962021-02-12
|
* Fix hud and trainlogic to work togetherorwell962021-02-10
|
* Replace deprecated object:getxxx()/setxxx() by get_xxx()/set_xxx()orwell962021-02-10
|
* Remove debug facilitiesorwell962021-02-10
|
* Rewrite movement logic againorwell962021-02-10
|
* Add debug prints, modify LZB to fix problems with look_aheadorwell962021-02-10
|
* Start using path_invalidate_ahead()orwell962021-02-10
|
* More debug info to hopefully gain more info on the bugorwell962021-02-10
|
* Fix things, rework signal aspect select dialog, transform old aspects on-the-flyorwell962021-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
|
* Discard get_node_or_nil() for area-loaded check and use either a ↵orwell962021-02-03
| | | | | | distance-based approach or minetest.is_block_active() if available See also https://github.com/minetest/minetest/pull/10897
* add maximum length parameter to split_at_fc and split_off_locomotiveGabriel Pérez-Cerezo2020-08-21
|
* Add command to split off locomotiveGabriel Pérez-Cerezo2020-07-28
|
* 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.
* Add workaround to unload wagons that are too far away from playersorwell962020-07-12
|
* 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
|
* Fix trains flipping when autocouplingGabriel Pérez-Cerezo2020-06-08
|
* Simplify and optimize path_get_index_by_offset (cherrypicked)orwell962019-12-09
|
* Tentative fix for #31Gabriel Pérez-Cerezo2019-12-03
| | | | | This might fix #31 by clearing the HUD entry for the player when joining
* Don't spawn couple entities when not loadedorwell962019-11-26
|
* remove obsolete code/commentsorwell962019-11-26
|
* Shunting mode now couples trains on collision.Gabriel Pérez-Cerezo2019-08-11
| | | | Trains now get coupled when one of them is in coupling mode.
* Add decoupling to luaatcGabriel Pérez-Cerezo2019-08-11
|
* Change API to return the id of a newly created train when discouplingGabriel Pérez-Cerezo2019-08-09
|
* Run entity overrun checking only in loaded areasorwell962019-06-05
|
* Move LZB system to core and unify approach callback mechanismorwell962019-04-16
|
* Add setting for death behavior and implement damage checks betterorwell962019-03-09
|
* Prioritize LZB callback (possible bugfix for H#100)orwell962019-02-19
|