Commit graph

58 commits

Author SHA1 Message Date
teknomunk
e4aef86352 Make old rails have a drawtype, make update lbm always run 2024-06-15 14:08:29 +02:00
teknomunk
aefdb963de Move the various rails to their own files, code cleanup 2024-06-15 14:08:29 +02:00
teknomunk
4ed0fe6a74 Complete rework of curve/tee rail direction functions 2024-06-15 14:08:29 +02:00
teknomunk
160863a740 Rework rail_dir_curve to significantly reduce code size 2024-06-15 14:08:29 +02:00
teknomunk
a2bb88bb2e Convert curved rails direction code to use fourdir 2024-06-15 14:08:29 +02:00
teknomunk
d165e0d2ed Fix typo, set use_texture_alpha = clip for all rail 2024-06-15 14:08:29 +02:00
teknomunk
61a1cda7f8 Fix visual artifacts on the sides of rails 2024-06-15 14:08:29 +02:00
teknomunk
1054d38b4e Fix placed rail conversion, start automatic inventory rail conversion 2024-06-15 14:08:29 +02:00
teknomunk
a96c3fe3ac Stop rail from being placed directly above rail (floating in air) 2024-06-15 14:08:29 +02:00
teknomunk
fba49df2f0 Fix sloped power,activator and detector rails, remove debug print 2024-06-15 14:08:29 +02:00
teknomunk
acb246b88e Finish writing API documentation, remove drop_railcarts (replaced by try_detach_minecart), rename constants to ALL CAPS for consistency, change mcl_minecarts. to mod. for API function definitions 2024-06-15 14:08:29 +02:00
teknomunk
581dcd7b3f Fix typo in rail replacement mapping, fix several crashes 2024-06-15 14:08:29 +02:00
teknomunk
c04ed709e0 Implement movement thru tee rails 2024-06-15 14:08:29 +02:00
teknomunk
386bde698d Major reorganization, start setup for trains 2024-06-15 14:08:29 +02:00
teknomunk
bacc8bdf64 Add utilities to convert between an ObjectRef, it's active object id and a 128bit uuid, move minecart data from entity staticdata to mod storage to eventually allow updating carts when out of range of players and also track what carts are alive, implement on-rail cart collisions 2024-06-15 14:08:29 +02:00
teknomunk
b6e51a3c40 Fix rails in creative inventory, make minecart with tnt not crash server when exploding, make minecart with tnt slightly more powerful than regular tnt 2024-06-15 14:08:29 +02:00
teknomunk
6d9cae1034 Fix rail movement regressions 2024-06-15 14:08:29 +02:00
teknomunk
e6664de6e7 Move cart code to its own file, more code cleanup, add aliases for old track items 2024-06-15 14:08:29 +02:00
teknomunk
fd03fc0027 Cleanup code, restore uphill/downhill cart movement, completely remove old rail 2024-06-15 14:08:29 +02:00
teknomunk
5bd06f5c03 Make legacy rail update apply to all old rail types, add basic detached railcart physics with a stub to use mcl_physics when it gets merged 2024-06-15 14:08:29 +02:00
teknomunk
284c366136 Silence unmaskable print statements 2024-06-15 14:08:29 +02:00
teknomunk
c1a7001c31 Add immortal item entity support, add legacy rail conversion that uses immortal item drops for corners/tees/crosses that are no longer possible 2024-06-15 14:08:29 +02:00
teknomunk
3391a28fa9 Get sloped connections working correctly 2024-06-15 14:08:29 +02:00
teknomunk
ad11fc22ec Re-enable rule for powering rail from underneath, have stairs block minecart movement, fix crash when lightning strikes a minecart 2024-06-15 14:08:29 +02:00
teknomunk
4589206985 Fix mcl_util.table_merge where a standard value overwrites a table, fix base definition usage, implement behavior difference when there is a solid block after a straight piece of track (this will eventually allow minecarts to fly off the end of the track) 2024-06-15 14:08:29 +02:00
teknomunk
19e2dc58eb Update all rail types to new version 2024-06-15 14:08:29 +02:00
teknomunk
4b8cb85319 Reorganize 2024-06-15 14:08:29 +02:00
teknomunk
7b7dfd1da3 Finish reverting 08b41a3b39 2024-06-15 14:08:29 +02:00
teknomunk
75f394e5ab Add sloped rail 2024-06-15 14:08:29 +02:00
teknomunk
4265f0b428 Implement initial rail connection logic (no vertical track yet), experiment with texture modifiers and gravel underlay for display (not working) 2024-06-15 14:08:29 +02:00
teknomunk
57ad709bdd Start implementing new rail nodes 2024-06-15 14:08:29 +02:00
teknomunk
8c6b011c91 Change connected railcar behavior to fix unreliable end of track stopping, set maximum acceleration of powered rails to 8 blocks per second (per https://minecraft.fandom.com/wiki/Powered_Rail), stop powered rails from powering the block underneath it (allows below rail hopper to work while the rail is powered like in https://www.youtube.com/watch?v=szjO0-duTAk), modify mcl_hoppers to allow triggering a hopper pull once the minecart is stopped on top of the hopper and wait before allowing the cart to move to allow redstone circuits time to process 2024-06-15 14:08:29 +02:00
teknomunk
8a91f04cf0 Complete rewrite of minecart movement that resolves https://git.minetest.land/MineClone2/MineClone2/issues/2446 and https://git.minetest.land/MineClone2/MineClone2/issues/247#issuecomment-50960 but has a bug where carts will synchronize movements that I am still investigating 2024-06-15 14:08:29 +02:00
nixnoxus
08b41a3b39 accelerate non-moving carts on mcl_minecarts:golden_rail_on (#4097)
accelerate a non-moving minecart away from a solid opaque block the powered rail is facing

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/4097
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: nixnoxus <nixnoxus@web.de>
Co-committed-by: nixnoxus <nixnoxus@web.de>
2024-03-24 05:29:44 +00:00
SmokeyDope
71671f8b5f Make minecart rails unable to be broken with lava 2023-02-09 01:53:52 +00:00
SmokeyDope
c4d60e50cc Make minecart rails unable to be broken with water 2023-02-09 01:53:52 +00:00
cora
9cea10a706 fix more blast resistance and hardness values 2022-06-13 02:48:00 +02:00
AFCMS
cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS
9e074af07f unify code style [1] 2021-05-25 12:52:25 +02:00
Wuzzy
ba74546d48 Add extended tooltips 2020-02-19 04:54:17 +01:00
Wuzzy
1d2da1f01a TNT minecart and activator rail no longer WIP 2020-01-30 22:31:44 +01:00
Wuzzy
9dc9c12f29 Implement TNT minecart 2020-01-30 22:05:18 +01:00
Wuzzy
1ed1bdfadb Use minetest.raillike_group for rails 2019-04-11 17:03:41 +02:00
Wuzzy
1217d9fa88 New translation system, part 1: entities 2019-03-07 20:43:39 +01:00
Wuzzy
a285827980 Change powered rail texture names to fix MTG clash 2019-02-04 12:38:36 +01:00
Wuzzy
d34c48cb59 Insta-drop minecart when its rail is destroyed 2019-01-30 03:37:47 +01:00
Wuzzy
83829ec358 Hide a couple of very incomplete items in Creative 2018-05-08 01:40:31 +02:00
Wuzzy
cc32c54d87 Draw full set of activator rail textures 2018-01-25 05:18:35 +01:00
Wuzzy
b62075afcb Fix rail rules (kinda) 2018-01-22 17:33:06 +01:00
Wuzzy
c9ef3f8536 Use default redstone rules for rails again 2018-01-17 21:01:26 +01:00