Commit Graph

841 Commits

Author SHA1 Message Date
orwell96 9d12c72499 serialize_lib: Allow empty strings in key 2021-01-12 13:27:27 +01:00
orwell96 02d845e83d Serialize_lib: finish up and add atomic api 2021-01-12 13:27:00 +01:00
orwell96 ce4631dbee Backport ndb format from cellworld to also store the cids in the ndb file; integrate ndb in serialize_lib atomic system 2021-01-12 13:27:00 +01:00
orwell96 544f8babb5 Implement basic serialization and file opening 2021-01-12 13:27:00 +01:00
orwell96 e42fbf9dcc Make advtrains use serialize_lib (save version 4)
Old save format will be gracefully migrated
2021-01-12 13:27:00 +01:00
orwell96 d0bd4ac30e Serialize_lib: finish up and add atomic api 2021-01-12 13:27:00 +01:00
orwell96 e6b656e937 Implement basic serialization and file opening 2021-01-12 13:27:00 +01:00
orwell96 bdc49b919d DUMP_DEBUG_SAVE also dumps interlocking data 2021-01-12 13:27:00 +01:00
Gabriel Pérez-Cerezo 0df208af53 fix mis-patched 90+60r crossing conns
Thanks, Maverick2797
2021-01-10 15:42:47 +01:00
Gabriel Pérez-Cerezo eccfe8d195 Add K command to station rail
Move the UI of station rails to use checkboxes rather then dropdowns
for the reverse command.
2021-01-08 17:32:57 +01:00
Gabriel Pérez-Cerezo e9c76100a1 Add ATC "K" command
This command kicks out all passengers when the train is stopped and
its doors are open. In addtion, a wagon:is_driver_stand(seat) function
was added to allow finding out easily if a seat is the driver stand of
the wagon.
2021-01-07 23:58:05 +01:00
ywang 8655eebc5f Change color of max speed indication 2021-01-07 21:05:05 +01:00
ywang 6575b3dac7 Remove advtrains_hud_blank.png 2021-01-05 15:10:58 +01:00
ywang 741ed7b4a7 Revert to black background; use "blocks" for the (physical) maximum speed 2021-01-05 00:03:16 +01:00
ywang 501911f94c HUD improvements 2021-01-04 23:48:12 +01:00
ywang f4d193c6d1 Minor optimizations 2020-12-30 02:13:57 +01:00
ywang 846e688200 Add demo 2020-12-27 15:24:52 +01:00
ywang b74fc92f81 Minor improvements for speed indicator 2020-12-23 21:20:31 +01:00
ywang 5a0a6fa96d Minor improvements 2020-12-23 11:29:07 +01:00
ywang f4e2277f32 Improve speed indication 2020-12-23 11:14:18 +01:00
ywang 749edd62d1 Improved HUD textures 2020-12-23 10:35:16 +01:00
ywang 0395e81b79 HUD improvements 2020-12-22 23:15:04 +01:00
ywang 4405bbc57a Improved background for speed indicator 2020-12-19 20:38:01 +01:00
ywang 5659134c8c Improved speed indication
The speed indicator is now shown on 4 lines:
Line 1: ATC target speed (blue arrow pointing down)
Line 2: Train velocity (black line)
Line 3: Speed limit (if any) (red line)
Line 4: Next speed limit (red arrow pointing up)
2020-12-19 19:40:13 +01:00
ywang d6acadf018 Use PNG textures for the indication of reverser, lever, control mode, shunt mode, and doors 2020-12-19 18:15:02 +01:00
ywang a88e5aad64 Redesign train HUD
Some train HUD elements _might_ be replaced in the future.
2020-12-19 13:32:38 +01:00
Blockhead 48787fc1b2 Fix 60/90 degree crossing connection 2020-12-03 08:34:42 +01:00
orwell96 0d530ca49f Fix mesecon switch override group
Fixes issues with using mesecon switches as route locks
2020-11-23 23:02:55 +01:00
Blockhead 8d58bd51cd Workaround to destroy looping sounds
Needed for linetrack boat sound bug
2020-11-02 12:12:41 +01:00
Blockhead b616ae4425 Add missing recipe: 45_low platforms 2020-10-19 16:13:02 +02:00
Gabriel Pérez-Cerezo 964b0a7ab6 Remove couple entities when out of range from players
Work around the entity flood bug caused by improper engine handling of
static_save=false
2020-10-12 15:41:27 +02: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
orwell96 a73236d7eb Don't allow wagons with non-empty inventories to be destroyed (H#164) 2020-10-07 15:19:55 +02:00
orwell96 d89b8b1c89 Fix schedule_in() crash when RWT is not in number format (H#159) 2020-10-07 14:54:04 +02:00
orwell96 b892d793ac Add windows compatibility in nodedb saving (H#153)
Note: it does not simply add os.delete()  but reverts to the "old" behavior of directly overwriting the file, because this did work before.
2020-10-07 14:41:57 +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 7879a0a215 Make the models for Y and three-way turnouts 2020-09-11 04:24:36 +10:00
Gabriel Pérez-Cerezo 606fc83465 localize split function to prevent conflicts with the builtin one 2020-09-04 20:25:12 +02:00
orwell96 0aa83e4932 Escape fields in wagon properties (H#158) 2020-09-04 16:15:27 +02:00
Linus Jahn 00be2b5b5f tcb: Fix crash when player is nil 2020-09-01 15:20:15 +02:00
Relatio e4ccf8ffce Fix seating_from_key_helper: use pname instead of player:get_player_name() 2020-08-27 19:18:52 +02:00
Blockhead 595f26b450 Deprecate old 4590 crossings
This is done with a task that runs once when the nodedb is loaded. A new
field of advtrains_ndb will keep a version integer to indicate migration
versions. This introduces verson 1, no version being equivalent to 0.
An LBM is also registered to replace the tracks in the world.
2020-08-21 16:02:02 +02: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 b75752a3e0 Add models for all diamond crossing varieties to .blend
This was actually 34 individual commits over the course of a month but
is best to leave as one commit. It is also now a compressed .blend file
(an option available inside blender).
2020-08-21 16:02:02 +02:00
Gabriel Pérez-Cerezo b23d346ace add maximum length parameter to split_at_fc and split_off_locomotive 2020-08-21 15:58:12 +02:00