Commit Graph

797 Commits (35d5106a2141a3de83a8add3996ecc2dfbd141e7)

Author SHA1 Message Date
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
orwell96 a6e8b8b435 mod.conf: Add more information about the mod, not just the name 2021-03-13 11:16:05 +01:00
orwell96 682ff59906 Replace deprecated depends.txt's by mod.conf and organize dependencies consistently, add modpack.conf 2021-03-13 11:13:13 +01:00
orwell96 b2d7bbb2c5 Signal influence points: Make sure to clear on removal of signal, clear orphaned when digging rail 2021-03-12 17:56:07 +01:00
orwell96 2dcf60dec6 Track can-dig check: also notify user when digging is not allowed 2021-03-12 17:30:50 +01:00
orwell96 0c7beca20e Split out all train mods as basic_trains and remove them from main repo
Note: I'm not rewriting the history of this repository, too dangerous. basic_trains has been split out with git-filter-repo.
2021-03-12 11:00:38 +01:00
Maverick2797 e38f215faa Added alternative recipes, falling back on the default: items as they seem to be in the rest of the mod.
May need rebalancing though.
2021-03-06 21:00:35 +01:00
orwell96 6135f8a23b LuaATC: add sending atc command to train by ID, and getters for in/out text (solves #124 and #166) 2021-03-02 19:51:56 +01:00
orwell96 db9e4429d7 Fix protection of TSR rail 2021-02-19 22:46:21 +01:00
orwell96 30076f5ce3 Add some missing craft recipes
- LuaATC remains non-craftable for now (elevated privs necessary anyway)
- Some crafts altered from dario's proposal

Co-authored-by: W3RQ01 <dario23@linux-forks.de>
2021-02-19 18:46:03 +01:00
orwell96 04c78373f1 LuaATC: add interrupt_safe() and clear_interrupts(), fix queue mainloop 2021-02-17 19:45:52 +01:00