Commit Graph

831 Commits (master)

Author SHA1 Message Date
orwell96 2b21817b4f On_Joinplayer: fix train ID check for attachment update
Previously, statement was always false because train_id is no longer in the luaentity
2022-06-13 14:17:24 +02:00
Antonia 744aee2cdd Minor change to README
45 degree platform design is not a sound
2022-03-03 00:12:43 +01:00
orwell96 8beacdc508 Fix new wagon positioning when wheel positions are asymmetric, and remove leftover train.debug 2022-02-24 22:04:39 +01:00
orwell96 3cb21a80dc Wagons: Add two-pos wheel positioning logic for more realistic look of long wagons
Adds field "wheel_positions" in wagon definition
2022-02-09 23:06:02 +01:00
orwell96 ef8391a60d atc_reset(): Removed unused string parameter and also clear ATC autocouple flag (Cpl)
Fixes H#189 and H#190
2021-12-31 16:04:04 +01:00
Maverick2797 78e0c650e3 Load/Unload Track FC Integration
- Set a freight code in the track to whitelist only wagons with that FC as the current one

 - Set as # to disable the track

 - Set as a blank field (default) to allow all wagons to activate, irrespective of their FC
2021-12-29 21:21:37 +01:00
Maverick2797 7db61e9890 Automatically group wagons and locomotives based on definition values
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
2021-12-29 21:17:34 +01:00
Maverick2797 23d524df71 Luaautomation: add section_occupancy()
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.
2021-12-29 21:16:32 +01:00
Y. Wang 5912f778e1 Fix speed sign allowing v>max_speed 2021-12-16 22:24:05 +01:00
Emojigit 0b9441c289 Add C&C Servers into the testing server list, since we are using the latest commit 2021-11-26 12:33:28 +01:00
ywang f27640ee27 Trivial fixup for train decoupling regression 2021-11-20 01:59:26 +01:00
orwell96 358bff47b2 Interlocking: Correct duplicate influence points semi-automatically
Searches and deletes duplicate influence points for the same signal when "Influence Point" formspec is opened.
2021-11-14 17:32:20 +01:00
Gabriel Pérez-Cerezo 546ae49167 rewrite readme in markdown, add more information 2021-11-10 16:35:42 +01:00
Gabriel Pérez-Cerezo 02687c11ee Remove non-deterministic test 2021-11-10 11:48:27 +01:00
Gabriel Pérez-Cerezo 890369090e Activate serialize_lib unit tests 2021-11-10 11:39:54 +01:00
Gabriel Pérez-Cerezo 3561a7bfa2 Add more unit tests, fix broken unit test 2021-11-09 21:56:41 +01:00
Gabriel Pérez-Cerezo 9ec9db0ca9 configure build.yml to run the unit tests 2021-11-09 21:51:33 +01:00
Maverick2797 43c85ab8cf readme atc_set_ars_disable typo 2021-11-09 21:45:33 +01:00
Gabriel Pérez-Cerezo 00d12120b9 add sourcehut build file 2021-11-09 17:41:21 +01:00
Maverick2797 4cf9e5283b split_at_index where index=1
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.
2021-11-08 22:58:23 +01:00
orwell96 45e18326e3 New-Ks: minor additions/corrections to ywang's work:
- Add sign for line speed 20 (else no way to return to max line speed once set)
- When no distant signal info available (default), Ks displays green light (2 sections free)
- Normal and wall signals again signal maximum speed (persistent restriction can be given via line speed nouw)
2021-11-08 22:52:28 +01:00
ywang 3f6cef7308 Add documentation on signal aspects 2021-11-07 19:01:45 +01:00
ywang 3c92fa597c Make train HUD check for existing speed restrictions 2021-11-07 14:06:50 +01:00
ywang d46f4b9f67 Rework textures and models; add new signal signs 2021-11-07 13:49:01 +01:00
ywang be2f37a067 Support different types of speed restrictions; add documentation 2021-11-07 13:49:01 +01:00
ywang 2299470523 round speed limit if needed 2021-11-05 20:28:38 +01:00
ywang 8793c8bd48 make distant signal aspect dropdown labels consistent with the ones for the main aspect 2021-11-05 20:28:38 +01:00
ywang fb632f170a Do not allow adjusting Ks signals with trackworkers 2021-11-05 20:28:38 +01:00
ywang 44119ecbf5 Re-add Zs 3(v) indicators; swap green and yellow lights for realism 2021-11-05 20:28:38 +01:00
ywang e683401450 Use realistic Ra 10 signal sign 2021-11-05 20:28:38 +01:00
orwell96 8a9f1389a5 On-Track Collision system: Fix train teleportation when using 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.
2021-11-04 20:14:20 +01:00
orwell96 f046cfc2d3 LuaATC: remove accidental mesecons hard-dependency 2021-11-04 20:10:55 +01:00
orwell96 5e27bbdcfe LuaATC: Fix position of error label, use consistent name "LuaATC" instead of "LuaAutomation" 2021-11-02 23:22:30 +01:00
orwell96 ae152bf5bb LuaATC: Add Mesecons LuaATC Controller (similar to Mesecons Luacontroller) 2021-11-02 23:15:16 +01:00
orwell96 35d5106a21 LuaATC PCNaming: Allow naming active components using the tool 2021-11-02 23:14:28 +01:00
orwell96 75025b13ca Route Formspec: When cancelling route, disable ARS only temporarily, not permanently 2021-10-26 20:23:19 +02:00
orwell96 4e80866ca6 Coupler types: Better output when there are no couplers on a wagon 2021-10-25 21:19:01 +02:00
orwell96 5f5d28af1b Coupling: Add concept of coupler types, allow coupling only when coupler types match 2021-10-25 21:08:42 +02:00
orwell96 e7d0a5fac2 Train Coupling: Change behavior so that train direction of initiating train is kept, add ATC Cpl command 2021-10-25 21:04:45 +02:00
orwell96 4989da3663 Disable position-based collision and coupling system for very short trains (such as single minecarts) to solve #155 2021-07-07 22:58:10 +02:00
orwell96 1f3a4c3bfc Rework train same-track collision system and deterministic coupling
- 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
2021-07-07 22:42:14 +02:00
orwell96 c623a33860 Shutdown callback: don't save advtrains save files when MT crashed within advtrains's main step 2021-07-07 22:42:14 +02:00
Gabriel Pérez-Cerezo 30f4e342fd Make the collision mode configurable
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.
2021-06-30 23:46:00 +02:00
orwell96 9b0ec771d7 Train-World collisions: Collide only with 'normal'-drawtype nodes.
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.
2021-06-29 16:12:29 +02:00
orwell96 0efe7ef1f3 Entity Damage: Correct sign entity name
Reported by VanessaE
2021-06-29 16:01:10 +02:00
orwell96 e5b053c0d8 Trains splitting: retain important properties (door state, line, texts etc) 2021-05-22 19:42:15 +02:00
orwell96 e506086011 Serialization: strip trailing \r also in nodedb callback 2021-05-07 10:19:49 +02:00
orwell96 81cd305aa0 Merge commit 'd4593491efbcab47efd918d7918b97b4621828b3' 2021-05-03 22:06:02 +02:00
orwell96 d4593491ef Strip trailing \r's also for first and last line 2021-05-03 22:05:30 +02:00
orwell96 28bc9ef07f Make strict loading the default 2021-05-03 21:58:50 +02:00