Commit Graph

36 Commits (master)

Author SHA1 Message Date
orwell96 112e3ff255 Fix undeclared globals warnings (#176)
Reported by Vanessa Dannenberg
2021-04-25 21:54:51 +02: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 080b8fb273 Add IGNORE_WORLD mode to test using only the advtrains save data 2021-02-10 16:39:45 +01:00
Gabriel Pérez-Cerezo 0df208af53 fix mis-patched 90+60r crossing conns
Thanks, Maverick2797
2021-01-10 15:42:47 +01:00
Blockhead 48787fc1b2 Fix 60/90 degree crossing connection 2020-12-03 08:34:42 +01:00
Gabriel Pérez-Cerezo dcf5b8670e Remove last files with CR-LF line endings. 2020-10-11 12:36:06 +02:00
Blockhead 2ecd474ed7 Fix 3-way conns table so traverser doesn't complain
The remaining patch to make advtrains master stable: we can't have any conns
entries without a 'c' member, so make all ["3"] entries into just ["c"] entries.
2020-10-11 12:28:41 +02:00
orwell96 3256c2778d Forbid track modification when train, IP or TCB is on it, better handle removing of TCBs (H#149) 2020-10-07 17:20:47 +02:00
Gabriel Pérez-Cerezo 1a743c2dd6 Fix manual switching on regular track switches. 2020-09-14 16:51:43 +02:00
Blockhead 61009bf00d Fix issues introduced by changes to switching
The code I wrote worked only for my y-turnout and 3-way variants because
it assumed the variant name == the switching state, which is obviously
wrong for the default sw(l|r)(st|cr) variants. I have added a
'switchprefix' property to address this.
2020-09-14 19:59:15 +10:00
Blockhead 487ca4e38c Enable three-way turnouts with proper conns support on all sides
I chose to make three-way turnouts have 5 conns (last one is not used) so
that they can be distinguished from crossings easily without refactoring the
code. Three-ways should have their last entry with {["3"]=0} instead as a sort
of internal mark.
2020-09-11 17:19:23 +10:00
Blockhead 1d224d6b4c Add 3-way turnouts and y-turnouts (both diverging) 2020-09-11 04:25:38 +10:00
Blockhead b707f20ba2 Add two new sets of diamond crossing types
Add two new sets of diamond crossings in addition to the current set
of perpendicular crossings. Also cleans up the inside edges on the
perpendicular set models. All of these varieties have their mirror
images, which was previously a problem with the 45/90 crossing.

The naming convention for all of these rail types is this: when facing
east and param2=0, the angle and direction of the two crossing rails is
indicated. So 30l45r means 30 degrees left and 45 degrees right. The
mirror image of that would be 30r45l.

There is a recipe for each set of crossing types and the trackworker can
change geometry within types with left cick, and rotate between two 90
degree rotations with right-click. When left-clicking, the angles move
in an intuitive fashion like rotating rails.

* The perpendicular set (already existing) has rails that cross at 90
degrees.
* The 90+x set has 90 degree (straight, node aligned) rails plus a rail
intersecting that at 30, 45 or 60 degrees.
* The diagonal set has both rails not axis-aligned, for example 30r-45l,
60l60r. The latter is quite useful for scissors crossovers.
2020-08-21 16:02:02 +02:00
Blockhead 96236c04dc Add perpendicular and 45/90 degree crossing rails
Add a set of new models for crossings to make some new track
arrangements possible. This commit adds perpendicular crossigns that can
be rotated at any angle: 30/45/60/90 and 45/90 degree crossings in two
rotations. In future, further crossing types can be added to the blender
file.

Add the blender file in rail_crossings.blend that is the source of these
files and which refers to the texture inside advtrains_train_track.

Add a set of prototypes for rail crossings to advtrains/tracks.lua and
register the new crossings in advtrains_train_track.
2020-07-06 17:32:22 +02:00
Gabriel Pérez-Cerezo 7977776b4a Changes for linetrack
Allows defining a suitable substrate for tracks, and liquid pointable tracks
2019-10-21 16:36:35 +02:00
orwell96 392adc838d Fix slope placer protection 2019-02-05 14:23:00 +01:00
orwell96 05cb6090ac Move passive API to the advtrains core
to remove dependency of interlocking on luaautomation
2018-08-16 19:18:03 +02:00
orwell96 c34794e8a1 Implement routesetting
Missing things: signal aspect updating, waiting routes handling, management /info tool
2018-07-21 16:31:00 +02:00
orwell96 3d7924c751 Fix bugs found while testing 2018-06-14 17:39:42 +02:00
orwell96 24b0639c5f Mainly make collisions and coupling work
Missing: ATC stuff, yaw problems
2018-06-14 17:39:42 +02:00
orwell96 8b576357ef Rework the privilege system completely
See privilege_guide.txt for information
2018-03-14 20:57:07 +01:00
Gabriel Pérez-Cerezo 481f6218a8 Log certain events in a logfile in the world directory
(also fix the output of /at_sync_ndb)
2018-02-21 20:03:34 +01:00
orwell96 46c4447da0 Rewrite rail connection system...
...to support an arbitrary number of connections for rails, which leads to these new features:
- switches now get recognized by the trackworker correctly
- ability to add real rail crosses
During this, I also rewrote the rail registering system and the conway function (important part of path prediction)
Note, developers: the track preset format changed, you might need to rewrite them according to the presets in tracks.lua if you wrote your own
(possibly breaks advcarts)
2017-12-18 23:09:23 +01:00
orwell96 5fc6cc7f5b Fix multiple track types not working simultaneously
Bug was caused by the drives_on table of every train and advtrains.all_tracktypes
sharing the same reference, which caused advtrains.all_tracktypes to become the
intersection of all train drives_on's in the world.
However, this did become empty, causing nothing to work anymore.
2017-11-22 23:13:42 +01:00
orwell96 409e2125c9 Make trackplacer align rails by any tracks, not just by tracks with the same nnpref
This finally fixes the need to rotate atc rails and bumpers.
Also prefers rotation that is closer to the player's look dir (placed bumpers will face the player)
2017-11-22 20:46:36 +01:00
orwell96 9294e770ca Change name of the node database group in order to clone node database code into a library mod
advtrains will keep its own node database code for reasons of crash recovery, with the handicap that improvements to nplib need to be manually backported.
2017-10-31 13:52:32 +01:00
orwell96 f1a8b4f505 Implement multi-occupation in detector.on_node table to finally fix collisions 2017-10-25 11:49:34 +02:00
Gabriel Pérez-Cerezo f228e2d30e Moved default train track to separate mod, for integration with advcarts. 2017-10-25 09:52:10 +02:00
rubenwardy d65c4916ce Remove zip release files, move mod to root, exclude assets from Makefile (#92) 2017-09-20 18:05:04 +02:00
orwell96 2d0b51b897 Restructure mod directory 2017-01-04 19:10:03 +01:00
orwell96 853a9e690e Add Automatic Train Control system 2017-01-04 12:02:00 +01:00
orwell96 cc6cf09ac8 make detector code clear entries of trains that do not exist 2017-01-02 18:54:24 +01:00
orwell96 8784ee41dd Do not duplicate definitions of 'print' in every file 2017-01-02 13:49:20 +01:00
orwell96 d08e202346 remove train type concept and calculate train's capabilities based on used wagons 2016-12-22 18:55:10 +01:00
orwell96 f806ed9eee Turning mod into a modpack and separating the trains from the core mod 2016-12-20 14:17:39 +01:00