Commit Graph

807 Commits

Author SHA1 Message Date
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
orwell96 07f4e83ded Strip trailing \r from lines (possibly fixes windows migration) 2021-05-03 21:47:53 +02:00
orwell96 5aa700c3ab Deregister player from train on death in all cases (fixes #119) 2021-04-25 22:13:24 +02:00
orwell96 571a5cd19b Prevent splitting trains when they're off track (fixes #178) 2021-04-25 22:07:44 +02:00
orwell96 09bba2c57f Hopefully fix #177 2021-04-25 21:59:02 +02:00
orwell96 112e3ff255 Fix undeclared globals warnings (#176)
Reported by Vanessa Dannenberg
2021-04-25 21:54:51 +02:00
Gabriel Pérez-Cerezo e04c21be78 Add check for box inventory
this fixes a crash when the new technic train battery wagon passes
over a loading / unloading track.
2021-04-11 12:45:17 +02:00
Gabriel Pérez-Cerezo 9dd0313b71 Add /at_whereis command to check the position of a train. 2021-04-10 12:26:47 +02:00
orwell96 5ee8c0e39b Update serialize_lib 2021-04-04 19:58:25 +02:00
orwell96 edcc0d0917 Open files in binary mode; also serialize carriage return
Bumps serialization version as CR escape would not be read correctly in older version
2021-04-04 19:55:21 +02:00
orwell96 3dc6426e86 Remove sounds = default.sound_stone_defaults() as default is no longer a dependency 2021-04-04 19:48:35 +02:00
Blockhead 99e619a2e5 Make mesecons_switch a proper optional dependency (H#175) 2021-03-31 09:31:33 +02:00
orwell96 f5689e9e91 Add documentation and license 2021-03-22 13:28:21 +01:00
orwell96 2e281b134b Fix init.lua functions to do what is documented on error 2021-03-22 12:40:54 +01:00
orwell96 5d372b1cf1 Increase size of LuaATC code input forms to 15x12 units
The current size of the code form is rather limiting as it fills only a small part of the screen.
Also adds global constant in init.lua so this can easily adapted in the future
2021-03-22 11:23:42 +01:00
hlqkj 4fcc552770 Remove "Last punched" from LuaATC init code fs
Also removed the now-dead last punch pos helper code.
Resized buttons accordinghly.
2021-03-22 11:06:34 +01:00
hlqkj ace8ca0fda Rework route ui formspec layout
- Aligned stuff
- Added style to use monospaced font in the ars rules editor textarea
2021-03-22 11:06:29 +01:00
hlqkj b9c824db00 Rework active_common formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
- Added label to the environment dropdown
2021-03-22 11:06:26 +01:00
hlqkj 75474ec07e Rework envsetup formspec layout
- Aligned stuff
- Added style to use monospaced font in the code editor textarea
2021-03-22 11:06:22 +01:00
hlqkj 5f2e40a08f Use mono font to ATC rail command fields 2021-03-22 11:06:18 +01:00
hlqkj 07b1231f75 Rework stoprail formspec layout and add mono style
- Rework formspec layout, fixed tab order
- Added style to use monospaced font for the stn and ars fields
2021-03-22 11:06:03 +01:00
Blockhead 5b4f5491d2 Do not return early after setting station info on stop rail
Solves Hemiptera#171
2021-03-22 11:02:10 +01:00
Blockhead 7e94650b8d Do not crash when operating signals without interlocking
The default set of signals were crashing when operated by right-clicking or
mesecons when advtrains_interlocking was not enabled.
2021-03-22 10:51:03 +01:00
orwell96 a224027b16 Add 'serialize_lib/' from commit 'a6e8b8b4353863ad563a4d5187f40fea702ea2de'
git-subtree-dir: serialize_lib
git-subtree-mainline: b82e10051d
git-subtree-split: a6e8b8b435
2021-03-13 11:29:44 +01:00
orwell96 b82e10051d Remove serialize_lib in order to re-add it as subtree 2021-03-13 11:29:17 +01:00