Commit Graph

644 Commits (master)

Author SHA1 Message Date
Humr Druhý 736d4eab22 Merge branch 'h137' into 'h137'
Fix

See merge request tunnelers-abyss/advtrains!7
2022-03-22 18:40:04 +00:00
Milan Pašek 41d149a760 Fix 2022-03-22 16:44:00 +00:00
ywang 75a948792e Recalculate when the tnc_call_approach_callback is called; remove dtime limit
TODO: Fix incorrect behavior with non-zero speed limits
2020-04-30 16:55:06 +02:00
yw05 d824198b94 Fix problems related to pdist; bring back dtime limit (just for now) 2020-04-29 19:53:41 +02:00
ywang 0065e234f1 Stage changes 2020-04-12 16:13:31 +02:00
ywang e06198f7c3 Stage changes 2020-04-12 16:12:07 +02:00
ywang 7bfccc78a0 hostfix for trains ignoring ATC tracks 2020-04-12 16:11:15 +02:00
ywang b6c58022b6 Clean up assets
- HTML output files should be generated when needed; this is a code 
repository.
- Update gitignore to ignore hidden .directory and HTML output.
2020-04-12 16:09:38 +02:00
ywang d4d2649c8e explicitly pass train_id to atc.send_command 2020-04-12 16:07:59 +02:00
ywang d34e054c6d Fix problem related to long distance between train and LZB point 2020-04-12 16:07:59 +02:00
ywang 8ac48f6169 Fix bug with Point Speed Restriction Rail 2020-04-12 16:07:59 +02:00
ywang fdfb3dba5f Image optimizations 2020-04-12 16:07:59 +02:00
ywang ba91ba8109 Fix failure to recognize braking 2020-04-12 16:07:56 +02:00
ywang 314ed9aa0b HUD improvments 2020-04-12 16:07:16 +02:00
ywang e043a78c9d Consider speed limit; minor improvments 2020-04-12 16:07:16 +02:00
ywang caf53fbafb Remove dtime limiting 2020-04-12 16:07:16 +02:00
ywang 797544564e Stable code 2020-04-12 16:07:16 +02:00
ywang ad0713547c Improved quadratic function solver; added wrapper for math.sqrt() 2020-04-12 16:07:16 +02:00
ywang a86677b42f Fix minor bugs 2020-04-12 16:07:16 +02:00
ywang be22775cdb More accurate train logic, but still buggy 2020-04-12 16:07:16 +02:00
ywang e22262a450 Fix problems related to zero
Note: this fix only makes sure that the mod does not throw errors, but 
there are currently weird behaviors related to trainlogic.
2020-04-12 16:07:16 +02:00
ywang 2db7eab62e Update trainlogic to use new LZB function 2020-04-12 16:04:58 +02:00
ywang 0d1c5a873c Add function to calculate distance until override
The function will be used to improve the train movement algorithm.
The changes related to spaces in blank lines is caused by a weird
feature in the text editor.
2020-04-12 16:03:44 +02:00
ywang 40124d97f4 hostfix for trains ignoring ATC tracks 2020-04-07 19:40:35 +02:00
Gabriel Pérez-Cerezo fb837a449a Merge branch 'diagonal_platforms' of https://github.com/Montandalar/advtrains 2020-03-15 12:04:10 +01:00
Blockhead 301dcf953e Reduce the profile of the platforms by 0.1
Currently some trains clip the platform (especially E231
modpack), but they won't after the platform edge is moved
back slightly.
2020-03-15 21:56:42 +11:00
Blockhead 09fda4ffaa Add 45 degree diagonal platforms with a mesh 2020-03-15 21:51:38 +11:00
orwell96 372cd7eb80 Get rid of the "Subway Train" item (was an ugly hack anyways, and is obsolete now) 2020-03-08 18:50:04 +01:00
Blockhead 3b87ac5372 Delete train if it ends up off track, show a warning 2020-03-03 23:00:20 +11:00
Blockhead 0689c70aac Save clipboard on item metadata
Also a minor user feedback text cleanup
2020-03-03 23:00:20 +11:00
Blockhead 8a08d77166 Remove debugging print statements 2020-03-03 23:00:20 +11:00
Blockhead 378d862572 Draft copy tool
The copy tool copies a train to a global clipboard.  It copies
the Line number, Routing code, inside text and outside text.
It copies the kinds of wagons in the train and whether they
are flipped around.

Pasting with the copy tool will conditionally flip the train
such that 'your front' of the train, rather than the absolute
front of the train, is what is output. The new train is
oriented to travel forward with the placing player's view.

Conditons are:
- Multi-unit/push-pull train (= has locomotives on both ends):
  Never flipped
- Locomotive-hauled train (= has one end with a locomotive):
  Flipped so that the locomotive is always at the front. If the
  locomotive points long hood forward, it will still point long
  hood forward.
- Rake of wagons (= has no locomotives on ends):
  Flipped according to which end of the train the player copies
  from. If the player is towards the back (wagon out of train
  divded by total wagons > 0.5), then the back becomes the new
  front. If the player is towards the front, no change.
2020-03-03 23:00:20 +11:00
orwell96 9d7b21c451 Relicense under AGPLv3 and update information in readme.txt 2020-02-15 22:19:22 +01:00
ywang 2c18589979 Clean up assets
- HTML output files should be generated when needed; this is a code 
repository.
- Update gitignore to ignore hidden .directory and HTML output.
2020-01-29 16:26:23 +01:00
ywang 4083f4270a explicitly pass train_id to atc.send_command 2020-01-25 21:25:02 +01:00
ywang 7033271a10 Fix problem related to long distance between train and LZB point 2020-01-12 18:11:18 +01:00
ywang 2dd280b931 Fix bug with Point Speed Restriction Rail 2020-01-12 17:40:22 +01:00
ywang 1b24fb7757 Image optimizations 2020-01-12 15:36:17 +01:00
orwell96 1bb1d825f4 Use minetest.safe_file_write() to atomically save state [Breaks MT4 compat] 2020-01-10 14:08:56 +01:00
orwell96 dbaafeda3e Merge branch 'mt5-fixes' 2020-01-04 18:37:52 +01:00
Blockhead c0c6fcf00b Apply minetest.formspec_escape() to prevent formspec injection (H#143) 2020-01-04 18:33:57 +01:00
ywang b83dc400f0 Fix failure to recognize braking 2019-12-18 16:04:51 +01:00
ywang dae5a07eec HUD improvments 2019-12-18 15:04:30 +01:00
orwell96 b905a8bf6d Remove fullbright (H#140) 2019-12-18 10:08:03 +01:00
orwell96 50a81dd1f3 Fix RWT initialization when creating new world (H#142) 2019-12-18 10:01:47 +01:00
ywang 6bc8fa44df Consider speed limit; minor improvments 2019-12-17 20:11:45 +01:00
ywang f4e3592b5b Remove dtime limiting 2019-12-16 20:16:09 +01:00
ywang a2da32b536 Stable code 2019-12-16 19:53:03 +01:00
orwell96 d123679b3c Do not set infotext on Ks signal aspect change
Possible migitation for Linuxworks RAM explosion
2019-12-14 22:26:04 +01:00
orwell96 a8ae0a5332 Simplify and optimize path_get_index_by_offset (cherrypicked) 2019-12-09 11:00:21 +01:00