Commit Graph

481 Commits (master)

Author SHA1 Message Date
orwell96 a8ae0a5332 Simplify and optimize path_get_index_by_offset (cherrypicked) 2019-12-09 11:00:21 +01:00
orwell96 8d794525b3 Fix repeated log file opening/closing (H#136) 2019-12-04 10:09:19 +01:00
orwell96 e0662b2971 use group:wood in bumper recipe (H#120) 2019-12-04 10:09:19 +01:00
Gabriel Pérez-Cerezo 3db3f24857 Tentative fix for #31
This might fix #31 by clearing the HUD entry for the player when
joining
2019-12-03 21:35:42 +01:00
Gabriel Pérez-Cerezo 25a335203f Allow painting coupled wagons 2019-12-01 12:25:06 +01:00
Gabriel Pérez-Cerezo 0518fbbf3a Merge branch 'master' of https://git.bananach.space/advtrains 2019-12-01 12:09:04 +01:00
Gabriel Pérez-Cerezo b71c72b4ab Add experimental liveries feature
Please do not use this in your train mods yet, this may be subject to
changes!
2019-12-01 12:08:28 +01:00
ywang 2157a7ef36 Simplify formula for brake distance calculation 2019-11-27 10:37:25 +01:00
orwell96 7082038f75 Don't spawn couple entities when not loaded 2019-11-26 16:43:47 +01:00
orwell96 cf2179dea5 remove obsolete code/comments 2019-11-26 16:01:51 +01:00
orwell96 4ff8e05755 Fix trains not stopping when colliding with environment H#122 2019-11-26 15:49:36 +01:00
Gabriel Pérez-Cerezo ca4d65050c Add wagon_width attribute
This allows for wider vehicles than trains, such as boats to discharge
the passengers onto the platforms.
2019-11-22 20:29:57 +01: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
Gabriel Pérez-Cerezo 2d8c13885a Shunting mode now couples trains on collision.
Trains now get coupled when one of them is in coupling mode.
2019-08-11 20:16:11 +02:00
Gabriel Pérez-Cerezo 1f6038c75a Add decoupling to luaatc 2019-08-11 17:42:30 +02:00
Gabriel Pérez-Cerezo d074d3223a Change API to return the id of a newly created train when discoupling 2019-08-09 19:11:26 +02:00
Gabriel Pérez-Cerezo 95fb122eca New version 3 save system.
This new save system exists to split up the save file into several
smaller ones, to bypass lua limitations.
2019-07-23 20:15:37 +02:00
Gabriel Pérez-Cerezo 91bb555bc2 No longer require server priv for /at_sync_ndb
The check for server priv was hidden where no one would have expected
it.
2019-07-17 14:44:36 +02:00
Gabriel Pérez-Cerezo daba00b6a2 Various small fixes
- Also do atomic operations on nodedb
- no longer require Worldedit for at_sync_ndb
- "overrun LZB 0 restriction" should now show where it happened.
2019-07-16 17:26:53 +02:00
Gabriel Pérez-Cerezo 7a6740eb8c Keep a backup file where stuff is written to when saving
This should prevent yet another train service disaster.
2019-07-16 17:17:18 +02:00
orwell96 24e56dbfc2 Railway Time: Basic time counter and utility functions 2019-06-19 09:56:30 +02:00
orwell96 d6cfa7dbf6 Run entity overrun checking only in loaded areas 2019-06-05 15:49:53 +02:00
orwell96 ff94129761 Fix occurences of old lzb_invalidate 2019-04-23 22:30:33 +02:00
orwell96 b56cda8695 Fix remote routesetting 2019-04-16 12:59:17 +02:00
orwell96 ea33ad9de0 Move LZB system to core and unify approach callback mechanism 2019-04-16 09:16:44 +02:00
Pedro Gimeno c50224e05c Set wagon pitch on slopes 2019-04-06 13:38:00 +02:00
orwell96 1227456d46 Ugly workaround for green signals bug 2019-03-15 17:39:31 +01:00
orwell96 7149137990 Add setting for death behavior and implement damage checks better 2019-03-09 11:29:22 +01:00
orwell96 bc31f205cd Configurable interval for get_off setpos and door pos fix for japanese train 2019-03-09 11:17:14 +01:00
orwell96 56a105dd2e Restore old door status display behavior 2019-03-09 09:58:17 +01:00
orwell96 391a57f90c Prioritize LZB callback (possible bugfix for H#100) 2019-02-19 15:49:01 +01:00
orwell96 84f1c3d8a5 Fix stop rails sometimes not sending stop command 2019-02-16 21:51:14 +01:00
orwell96 2d2cd9605b No crash when train does not exist on check_collision() 2019-02-06 23:22:48 +01:00
orwell96 392adc838d Fix slope placer protection 2019-02-05 14:23:00 +01:00
orwell96 e7dcee1127 Force LZB Halt setting 2019-02-05 11:23:17 +01:00
orwell96 8b8c5a2c1f Fix sending empty ATC commands 2019-02-05 10:51:55 +01:00
orwell96 9da148347d Basic functions of "stop rail", missing ARS rules and signal.
For signal, need to think of a callback system for signals and moving atlatc queue to core?
2019-01-24 17:50:26 +01:00
orwell96 2976bae452 Point speed restriction rails 2019-01-24 13:43:22 +01:00
orwell96 1c3ea96041 Possible fix for braking problems + debug outputs 2019-01-23 15:37:18 +01:00
orwell96 f6f922c90c Fix last commit (and another warn2log) 2019-01-22 23:40:53 +01:00
orwell96 f2a62c2d77 Fix atc command evaluation BB command 2019-01-22 23:26:20 +01:00
orwell96 9bdddb619b output step distance in train (debugging purposes) 2019-01-22 21:42:07 +01:00
orwell96 7c60b8ffd1 Fix small bug in routeui and make another message log-only 2019-01-22 21:06:26 +01:00
orwell96 6c18d5b89a Make "Can't restore train" a log message instead of atwarn() 2019-01-22 17:14:32 +01:00
orwell96 97a2ff7db0 Fix dropping of items on wagon destroy 2019-01-22 12:31:18 +01:00
orwell96 240e7dd091 Warn when something clears the path winthin train step 2019-01-22 12:26:31 +01:00
orwell96 e2ae763dba Revert "Correct last commit"
This reverts commit 5f290819cd.
2019-01-22 12:11:35 +01:00
orwell96 dac65af983 Revert "Debugging code to trace down path_invalidate within callbacks error"
This reverts commit 1965e846b6.
2019-01-22 12:11:14 +01:00
orwell96 48e52f0546 Revert "Index NaN check (tracking obscure error detected on LW migration)"
This reverts commit e915b61da6.
2019-01-22 12:09:59 +01:00
orwell96 adc8db22fb Fix for path invalidation within update callbacks (issue was caused by detector rails) 2019-01-22 00:18:24 +01:00
orwell96 5f290819cd Correct last commit 2019-01-22 00:13:11 +01:00
orwell96 1965e846b6 Debugging code to trace down path_invalidate within callbacks error 2019-01-22 00:06:59 +01:00
orwell96 85f1600f53 Workaround 2019-01-21 23:57:19 +01:00
orwell96 f705feb4ee Do not run train steps when path has been deleted 2019-01-21 23:40:09 +01:00
orwell96 f162ebf63f Avoid division through zero in get_acceleration 2019-01-21 22:41:57 +01:00
orwell96 e915b61da6 Index NaN check (tracking obscure error detected on LW migration) 2019-01-21 22:26:11 +01:00
orwell96 97145e0f06 Additional info print for path_print() 2019-01-21 22:16:00 +01:00
orwell96 12f8e26cb4 Do not clear tarvelocity when setting new, potential no-op command 2019-01-15 15:38:17 +01:00
orwell96 c3c96274be Add "routingcode" property
Used for ARS and stop points
2019-01-09 16:10:56 +01:00
orwell96 b332a31d48 Make track protection radius configurable 2018-12-18 11:56:48 +01:00
orwell96 36357bd444 Fix player_to_train_mapping (H#74)
Entries were not inserted, thus neither damage protection nor teleport-to-train did work
2018-12-16 20:39:55 +01:00
orwell96 fb10420c38 Fix 144e1fc4e0 (there's no self in one of the instructions) 2018-12-10 23:07:27 +01:00
orwell96 c8788e6ca7 Fix crashes:
1. when train hit a route, nil access to already cancelled route caused crash
2. fix crash when trying to ensure_init a train that doesn't exist
2018-12-10 22:57:16 +01:00
orwell96 144e1fc4e0 Change get_inventory_formspec API - add invname parameter 2018-12-10 22:54:23 +01:00
orwell96 c3c5431412 Shunt signals (not exactly Ks), along with fixes in other components that those rely on 2018-12-08 17:12:57 +01:00
orwell96 e37f4f9188 Apply speed restriction 0.5 indexes later, do not cap tarvelocity by speed_restriction 2018-12-04 19:27:44 +01:00
orwell96 ec68eaa229 Added on_train_approach callback, non-permanent external LZB brakepoints and basis for "stop rails"
Stop rails ATM use the aforementioned things to add a pointwise "2" speed restriction. Seems to work.
2018-11-29 17:52:56 +01:00
orwell96 01ffee4d58 Implement new position encoding function and benchmark it
This shall replace all "pos_to_string" hashes in the long term. Performs a bit better than pos_to_string (but still worse than the "nested tables" layout the nodedb uses
(an unmatched open parenthesis leaves a tension that will stay all day... 2 do even more
2018-11-29 17:00:57 +01:00
orwell96 0f295ec4a9 Fix discouple positioning when wagon was just loaded 2018-11-20 12:37:34 +01:00
orwell96 df29faccc0 Remove superfluous "tarvelocity" assignments 2018-11-20 12:03:34 +01:00
orwell96 37166b5c14 Make "Line" property accessible from OBC and gettable via LATC, change subway wagon texture handling 2018-11-20 11:57:46 +01:00
orwell96 8b80742fa5 Remove debug print 2018-11-20 00:24:39 +01:00
orwell96 5874a6d3f4 Fix protection regarding tracks (track_builder and railway_operator) and documentation on privileges 2018-11-12 22:24:56 +01:00
orwell96 07fa21f992 Increase savefile version to 2
(Master downgrade protection)
2018-11-10 22:53:12 +01:00
orwell96 b872bdae82 Remove "couple locks" and apply protection to the actual coupling process, and fix permissions on that 2018-11-10 12:12:52 +01:00
orwell96 06216b0ca1 No static_save for discouple entities 2018-10-30 15:42:30 +01:00
orwell96 fbed4e29d1 Document fix 0a982b6356
Add comment that explains why fix was necessary
2018-10-29 23:51:41 +01:00
orwell96 0a982b6356 Actually set last_connid to 1, to prevent warning 2018-10-29 23:42:47 +01:00
orwell96 93726db4e3 Handle the case that a train is not initialized (train_ensure_init returns nil/false)
Fixes H#72
2018-10-29 21:19:49 +01:00
orwell96 60b7254992 atdump() to treat certain values special 2018-10-29 19:32:43 +01:00
orwell96 9f6ae55e37 Small fixes which do not have any effect 2018-10-29 16:04:36 +01:00
orwell96 e194732596 Complete Ks Main signals 2018-10-26 18:41:24 +02:00
orwell96 fe4b4a695a Fix node database ATC rail bug
After successfully registering newly-placed ATC rails in the nodedb, the rail's after_place_node() callback
(local apn_func()) immediately cleared it again by passing a "node" object that was actually a player object
and thus had no "name" or "param2" to ndb.update(), which it handled how it should not in this situation.
Since those ndb.update calls were unnecessary anyways, I removed them completely.
2018-10-17 21:05:06 +02:00
orwell96 267ce6fe6d Prevent any user control except "Brake" when an ATC override is present
Solves the problem of accidentally breaking atc-driven trains
2018-10-17 19:10:37 +02:00
orwell96 b4534c6f12 Improve ATC-LZB-User control interaction, smoothen LZB control operations
(prevent flickering view when atc battles against lzb)
2018-10-17 18:58:57 +02:00
orwell96 cd38b17eab Address H#60, H#17, M#18 and M#7
duplicate "message" to "msg"
make operation panel "cracky"
remove inexistent dtime_s parameter
add bones:bones to the list of not_blocking_trains nodes
2018-10-17 18:11:11 +02:00
orwell96 c6bef1c358 Fix H#69
Cause was a cascaded crash, original cause was something different
2018-10-17 17:45:51 +02:00
orwell96 87621caf1f Fix H#66 (Hemiptera 66) crash on missing double_conn match 2018-10-17 17:42:32 +02:00
orwell96 e04d84cb4c Actually allow what manual promises (setting IP on non-assigned signals) 2018-10-17 17:37:03 +02:00
orwell96 11fe530e18 Properly handle speed restrictions 2018-10-10 23:31:12 +02:00
orwell96 9db52bcd32 Remote Routesetting from Onboard Computer
+ Fix lzb oncoming item deletion/speed restriction
2018-10-10 23:17:31 +02:00
orwell96 842a85606e Properly implement invalidate_all_paths, recheck lzb on aspect change 2018-10-10 22:41:59 +02:00
orwell96 33c839b40d Add signal safety control override, restructure control system 2018-10-10 21:49:52 +02:00
orwell96 8f8f009425 Make signal influence point (~halt point) specifiable
Also extend signal api necessarily
2018-10-09 12:07:23 +02:00
orwell96 8df7bcf6b6 Improve route programming:
- Formspec for TCBs instead of unhandy chatcommands
- Ability to advance route over the next secction without punching end
- Better visualization
- Ability to route into dead-end sections
2018-10-07 22:21:49 +02:00
orwell96 2596866b74 Add interlocking guide/manual, silence debug outputs 2018-09-14 21:36:59 +02: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 5fad61e9c9 Fix various bugs found while testing 2018-08-13 11:27:38 +02:00
orwell96 3dc5b28774 Teleport player to their train every 2 seconds instead of just on_joinplayer
Solves problem of wagon being unloaded while player sitting inside it because of network lag
2018-08-12 18:01:50 +02:00
orwell96 b80ba056d9 Fix some incompatibility crash for old worlds 2018-08-12 17:56:02 +02:00
h-v-smacker 6d7d9d0181 onboard computer fix 2018-08-12 17:53:03 +02:00
Gabriel Pérez-Cerezo ffc3cf9d10 Remove redundant digtron.lua file 2018-08-12 17:51:09 +02:00
Gabriel Pérez-Cerezo a7bb207007 Make digtron able to build tracks. 2018-08-12 17:50:37 +02:00
orwell96 0ec89364c0 Fix ATC rail reversing 2018-08-12 16:36:20 +02:00
orwell96 cb56b8b49a Signal aspect handling, make default signals compatible, fix signal digging 2018-08-12 14:25:38 +02:00
orwell96 6cdb47edd2 Add routesetting callbacks.
Now, only the signal aspect setting is still missing
2018-08-12 13:23:36 +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 031aab4633 Signal assignment and route programming procedure 2018-07-04 17:48:33 +02:00
orwell96 9586a4d709 Add off-track train flag, fixes wagon object property reset on reversing 2018-07-04 14:04:41 +02:00
orwell96 820503ba81 Implement trains blocking sections 2018-06-29 16:16:55 +02:00
orwell96 1a64e96ae9 Complete Track Section handling, incl. removing tcb's and marker entities 2018-06-26 10:46:40 +02:00
orwell96 e1ebbff23c Add track section concept and rework TCB design, implement new linking behavior 2018-06-21 20:34:20 +02:00
orwell96 5992618ee8 Add Track Circuit Breaks (TCBs), Database and Track Circuit Setup
Does not get saved yet.
2018-06-20 20:13:12 +02:00
orwell96 08ac0f9c05 Check for inventory existence before serializing, and do not create it again if it already exists. 2018-06-19 19:49:24 +02:00
orwell96 b59c89f35a Fix Boardcom and Wagon properties not being shown 2018-06-18 18:54:00 +02:00
orwell96 a961e7f672 Fix box wagon inventory serialization and make box wagons protected. 2018-06-14 22:25:54 +02:00
orwell96 a758426835 Correct some documentation 2018-06-14 21:31:35 +02:00
imcasper 105aacccf9 Update nodedb.lua
correct read/write file binary data
2018-06-14 17:39:42 +02:00
orwell96 3d7924c751 Fix bugs found while testing 2018-06-14 17:39:42 +02:00
orwell96 521112aced add option to show train and wagon id 2018-06-14 17:39:42 +02:00
orwell96 2a76d4a960 Fix final bugs and to-do's (u.a.save/load system) 2018-06-14 17:39:42 +02:00
orwell96 254c32e304 Fix yaw calculations, track placement orientation and speed up direction lookup functions 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 5dca155333 Implement collisions. (does not work yet, still code errors) 2018-06-14 17:39:42 +02:00
orwell96 b420a71939 Implement a reverse path lookup for trains instead of an occupations window system 2018-06-14 17:39:42 +02:00
orwell96 caf2bda7bc Fix path_dir to actually be an angle, path item deletion and orientation of wagons
The occupation system as it is now will change. For each position, I will save the index in the train's path,
and implement a callback system. I need this because the occupation window system will not be enough to cover all use cases
(e.g. to make a train stop with it's center or back at a certain position, I need 3 different brake distances, which doesn't fit into the scheme)
2018-06-14 17:39:42 +02:00
orwell96 139a26fccc Bugfixes part 1
There's something wrong with the new paths, next time build a path validity checker to trace the issue
2018-06-14 17:39:42 +02:00
orwell96 30e98520e7 Occupation System, new train steps, still incomplete 2018-06-14 17:39:42 +02:00
orwell96 064a454117 Adapt wagons to new path system
Still outstanding: trains
2018-06-14 17:39:42 +02:00
orwell96 3420a1a912 Restructure path system
The changes to the path system have not yet been integrated...
2018-06-14 17:39:42 +02:00
Gabriel Pérez-Cerezo da0e7ac756
make platform creation possible from other mods 2018-06-10 17:40:37 +02:00
Gabriel Pérez-Cerezo 38d10acca2
Merge branch 'master' of https://github.com/orwell96/advtrains 2018-06-10 17:30:50 +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 e22e8ad0b9
fixed unmerged stuff 2018-02-22 11:06:22 +01:00
Gabriel Pérez-Cerezo 8ca7325d7c
Merge https://github.com/orwell96/advtrains into log 2018-02-22 11:03:53 +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 4c512f1dc5
Allow wagon owners to drive their trains #2
The check was missing at check_seat_group_access
2018-02-20 16:39:31 +01:00
orwell96 e9322075a3
Allow wagon owners to control their own trains
...even without the train_operator privilege
This still doesn't allow them to control switches, but whatever...
2018-02-20 16:22:31 +01:00
Gabriel Pérez-Cerezo 81d637dc76
added separate logging for railway networks 2018-02-18 22:52:57 +01:00
orwell96 06cdb14f3d
Do not crash when player gets on a train while it`s turning 2018-02-07 22:29:08 +01:00
orwell96 c93a5bf390 Simplify /at_reroute
It is not necessary to reload the save files, because there already is a function to invalidate train routes e.g. when turnouts are switched
2018-01-23 13:14:40 +01:00
orwell96 418c026038 Correct discouple position
Discouple entity was falsely placed at the position of the wagon
instead of at its end
2018-01-22 22:44:55 +01:00
orwell96 8ef6e9a529
Fix crash
IDK why this happens, but it's not important.
2018-01-17 20:15:06 +01:00
orwell96 fa7f05fd0c
Actually use the static_save property
My PR on this was merged months ago, but i've just noticed that i'm not using it yet
2018-01-15 22:17:56 +01:00
orwell96 e9946d98ac Relayout Wagon Properties form
The button wasn't visible on the screen anymore
2018-01-15 14:45:51 +01:00
orwell96 11da67f426
Add "seat_access" to saved fields
Fixes seat access properties not being saved
Reported by Och_Noe in Linuxworks Server
2018-01-15 13:35:50 +01:00
orwell96 27afd89d1b
Use directory delimter constant
Reported by @kostett, probably the cause of buggy nodedb saving
2018-01-15 13:33:43 +01:00
orwell96 7507dbba3a Add train_operator privilege check on discouple 2018-01-09 22:04:25 +01:00
orwell96 79da249c3d Add bord computer to trains
Features:
- couple/decouple trains from a driver stand
- new couple lock system (owner based, overridable by 'train_remove' privilege)
- all train operators can now change the inside/outside text, allows for multilines
Accessible via right-click menu or by pressing Sneak+Jump keys
2018-01-09 21:30:56 +01:00
orwell96 33a8f0f570 Move driving_ctrl_access property to seat group
there's now a more strict check for the train_operator privilege
Also added custom reasons on getting on a train.
2018-01-09 18:30:29 +01:00
orwell96 ae88f29481 Don't use looped sounds on subway
(causes engine bugs with dangling sound handles)
2018-01-07 20:52:15 +01:00
orwell96 1f26781b6a Change controls for trains (again) 2018-01-07 20:41:48 +01:00
orwell96 07442cfe8f Decrease the amount of garbage saved in save files 2018-01-07 19:00:43 +01:00
orwell96 e3b7046968 Remove path invalidation statement.
Caused problems on multiple detector rails in a row, because paths got cleared in-between a train step
Also optimize some code
2017-12-18 23:44:01 +01:00
orwell96 8a51a10a61 Fix detector lookup in ATC rails 2017-12-18 23:26:01 +01:00
orwell96 09838252fe Do not spam the server chat with messages from /at_sync_ndb and trains going off_track
The off-track warning has moved into the info text of wagons
2017-12-18 23:20:29 +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 faa60e2bd4 Use preferred rail orientation algorithm also for double connections 2017-12-18 12:39:38 +01:00
orwell96 cd0aaa53a0 Move train_load() function into advtrains_train_track 2017-12-18 12:21:54 +01:00
orwell96 e9c51dfab4
Make sure an old_velocity is always passed
Fixes crash on placing a new subway wagon
2017-12-06 21:27:04 +01:00
orwell96 dc67ff7226 Implement sound api and some sounds
- Level crossing bell
- Horns
- Subway train driving and door sounds
...to be continued...
2017-12-06 13:23:55 +01:00
orwell96 83df46d786 Change name of update_animation function
I will use this for sounds, and so it needs to be changed to a more general name
2017-11-29 17:20:46 +01:00
orwell96 7681de96c9
remove superfluous parameter
... from update_trainpart_properties call
Prohibits flipping of all wagons when extent_h wasn't set
2017-11-27 17:46:01 +01:00
orwell96 a3d3520fdb Do not modify rails that should not be modified
... when placing tracks, such as slopes
Fixes slopes being replaced by curves.
Also, check the node below for connection (does not check rely, but that would be uneccessary)
2017-11-24 12:31:46 +01:00
orwell96 ef076d6435 Merge branch 'master' of https://github.com/orwell96/advtrains 2017-11-24 12:07:23 +01:00
orwell96 3d29635a8f Correct yaw to preferred rail direction calculation 2017-11-24 12:06:46 +01:00
orwell96 7ea41df5d9
Preserve the player's looking direction
Contributed by @gpcf
2017-11-23 19:59:21 +01:00
orwell96 d78d07589d Add modifiable wagon extents
This will be required for advcarts
2017-11-23 17:00:39 +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 2d4833b5a8 do not register wagons in the advtrains namespace automatically
One step towards advcarts compatibility
2017-11-22 22:16:08 +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 ce73643b10
Do not punch signs
For some reason, a sign text gets removed by a train when it drives by.
This should fix it.
2017-11-14 23:16:08 +01:00
orwell96 17ee62dc64
Fix occasional crash in discouple on_punch
I think the issue is caused by the new animal damage code...
2017-11-14 22:08:56 +01:00
orwell96 480011c781
Fix entity damage
Animals from mobs weren't damaged because they have the immortal group set.
Instead, we check for the existence of "fleshy".
2017-11-02 18:00:38 +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 cac7753158 Punch non-player objects when they get overridden by a train. 2017-10-25 14:04:20 +02:00
orwell96 3659fa9e63 Fix subway train placer 2017-10-25 13:31:01 +02:00
orwell96 c5256fb3aa Some workaround fixes for Linuxworks server
Trains no longer get deleted when there's no rail
Fast item to create subway train
2017-10-25 12:34:49 +02:00
orwell96 f1a8b4f505 Implement multi-occupation in detector.on_node table to finally fix collisions 2017-10-25 11:49:34 +02:00
orwell96 1f9a9062e0 Replace many math.floor(x+0.5) calls (or math.floor calls that should be those) by custom atround() function 2017-10-25 10:51:19 +02:00
orwell96 c67770833b Fix coupling and collisions in certain cases
If a train moved towards another train, and the other train's step was executed after the first one's, the trains did eventually not collide.
Fix by moving the enter_node and collision check to step_b
Also change some couple behavior
2017-10-25 10:33:41 +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
orwell96 291da56aa2 Fix last commit 2017-10-23 14:02:40 +02:00
orwell96 850d8ac570 Fix continous object_property modification
This problem caused flickering of door animations on subways.
2017-10-23 13:56:59 +02:00
Gabriel Pérez-Cerezo 11d6a12ce7 Set wagon line number 2017-10-23 13:40:20 +02:00
orwell96 be771d9413 Prefer saved nodedb node before node loaded from map
Possibly fixes bug on linuxworks server.
2017-10-11 12:45:37 +02:00
orwell96 6ade65b6d6 Merge remote-tracking branch 'lemon-melon-repo/master' 2017-10-11 12:32:23 +02:00
orwell96 0dfb0fce22 Do not crash when train_pos is nil while checking wagon entity loading 2017-10-11 11:53:14 +02:00
orwell96 b6a5620cd3 Fix error cascade due to inexistent drb_dump when debugging is disabled 2017-10-11 11:22:35 +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
MBB b75c83ea43 Merge PR from mbb - Improve models and textures 2017-08-24 19:26:40 +02:00
Gabriel Pérez-Cerezo 9826161a14 Added command to reroute trains 2017-08-15 14:35:42 +02:00
Gabriel Pérez-Cerezo c894dee7ef Fixed #86 2017-08-15 14:35:41 +02:00
lemon-melon c184c00f26 Add speed as number in km/h to train hud 2017-07-15 16:04:08 +01:00
lemon-melon efc319f877 Add m/s to km/h helper function 2017-07-15 16:01:15 +01:00
orwell96 a34ff7664a Add command to throw all players out of trains, fixes #78 2017-06-12 21:13:53 +02:00
orwell96 05704ac016 Fix broken door animations caused by continuous set_object_properties() messages sent to client
... which each time caused the animation to be reset
2017-06-08 14:20:40 +02:00
orwell96 af46d180f8 lower capacity of freight cars 2017-06-08 11:13:53 +02:00
orwell96 3abd0f0e34 Change log level of save_all message to atprint() 2017-06-08 11:07:45 +02:00
orwell96 e1fce28fac Do not clear the F table when running the init code fails 2017-06-08 11:05:24 +02:00