Commit Graph

13057 Commits

Author SHA1 Message Date
teknomunk
e7c550858d Calculate acceleration of trains based on average of acceleration for all carts in the train, make velocity not change on slopes and 45 degree track 2024-12-31 02:36:18 +01:00
teknomunk
0119814c0d Prevent trains from slowing on 45 degree track 2024-12-31 02:36:18 +01:00
teknomunk
9ef2e02463 Add guard that prevents crash when itemstack is nil 2024-12-31 02:36:18 +01:00
teknomunk
ee49ff612d Silence debug prints and logging 2024-12-31 02:36:18 +01:00
teknomunk
8cde9d4244 Prevent removal of old minecarts 2024-12-31 02:36:18 +01:00
teknomunk
b963936c6d Add legacy node conversion to vl_legacy and update rails.lua to use it 2024-12-31 02:36:18 +01:00
teknomunk
46c1330d31 Make activated tnt minecarts glow in the dark, fix crash with lit tnt minecarts 2024-12-31 02:36:18 +01:00
teknomunk
3d7f45154b Fix a couple of crashes (TNT minecart trying to update orientation after exploding, trying to punch/push a minecart not on track) 2024-12-31 02:36:18 +01:00
teknomunk
b83fb8ccba Expand mcl_util.hopper_pull() to mcl_util.hopper_pull_to_inventory() 2024-12-31 02:36:18 +01:00
teknomunk
c328f9920e Add profiling code to force_get_node() 2024-12-31 02:36:18 +01:00
teknomunk
00665063da Address additional review comments 2024-12-31 02:36:18 +01:00
teknomunk
80c0f52e17 Update API documentation to always use , add compatibility shim to mcl_minecarts.is_rail() and mcl_minecarts.ge_rail_direction() 2024-12-31 02:36:18 +01:00
teknomunk
16caed401c Rewrite mcl_util.hopper_pull in terms of mcl_util.hopper_pull_to_inventory 2024-12-31 02:36:18 +01:00
teknomunk
a176d04bda Correct documentation per review 2024-12-31 02:36:18 +01:00
teknomunk
8c754bf55d Switch over to using vl_legacy for item conversion in player inventories 2024-12-31 02:36:18 +01:00
teknomunk
c165938c1b Fix typo 2024-12-31 02:36:18 +01:00
teknomunk
0dece0afbf Register rail conversions 2024-12-31 02:36:18 +01:00
teknomunk
b47288a260 Implement vl_legacy deprecated function and item conversion APIs 2024-12-31 02:36:18 +01:00
teknomunk
78afadd8b1 Fix crashes 2024-12-31 02:36:18 +01:00
teknomunk
41860500a3 Make old rails have a drawtype, make update lbm always run 2024-12-31 02:36:18 +01:00
teknomunk
dcb534bf9a Move the various rails to their own files, code cleanup 2024-12-31 02:36:18 +01:00
teknomunk
cd1e915638 Remove undefined global for optional environmental physics 2024-12-31 02:36:18 +01:00
teknomunk
f6a002a0b9 Remove Emerge-0 warning that occurs when placing mineshafts 2024-12-31 02:36:18 +01:00
teknomunk
9c7b4d366c Restore 45 degree cart movement, remove warning about unknown global 2024-12-31 02:36:18 +01:00
teknomunk
3eb1e82f7e Complete rework of curve/tee rail direction functions 2024-12-31 02:36:18 +01:00
teknomunk
788db71850 Rework rail_dir_curve to significantly reduce code size 2024-12-31 02:36:18 +01:00
teknomunk
8736f463ad Convert curved rails direction code to use fourdir 2024-12-31 02:36:18 +01:00
teknomunk
90cfa2cf40 Change verticle offset for testing reattaching to rail to 0.55, which is a bit more than the stair step height 2024-12-31 02:36:18 +01:00
teknomunk
2c22f1537e Fix cart detaching without unregistering from everything 2024-12-31 02:36:18 +01:00
teknomunk
c02ce8b8e7 Fix typo, set use_texture_alpha = clip for all rail 2024-12-31 02:36:18 +01:00
teknomunk
fa29e3410b Fix several undefined global warnings, fix cart movement when over maximum speed, fix cart reattachment to sloped track 2024-12-31 02:36:18 +01:00
teknomunk
356328ce4b Revert changed made to debug minecart-updates integration into tsm_railcorridors 2024-12-31 02:36:18 +01:00
teknomunk
10865e6dbb Make punch move minecarts a little, comment out more debug prints 2024-12-31 02:36:18 +01:00
teknomunk
0a935d1f99 Fix visual artifacts on the sides of rails 2024-12-31 02:36:18 +01:00
teknomunk
689b6a8d30 Stop carts from reversing when they stop, make stopped carts try to start moving in the direction the player is facing 2024-12-31 02:36:18 +01:00
teknomunk
8351f39fb1 Fix crash after entering a minecart not on rails 2024-12-31 02:36:18 +01:00
teknomunk
de01ba45a6 Fix placed rail conversion, start automatic inventory rail conversion 2024-12-31 02:36:18 +01:00
teknomunk
4c56707336 Fix players repelling carts with new player metadata system 2024-12-31 02:36:18 +01:00
teknomunk
1831e34b09 Cleanup debug prints 2024-12-31 02:36:18 +01:00
teknomunk
aec9665ecc Add documentation for newly exposed attach_driver 2024-12-31 02:36:18 +01:00
teknomunk
22f5369db9 Add persistent player-specific metadata into mcl_playerinfo, simple cart reattachment (only exists if the luaentity for the cart exists when the player logs in) 2024-12-31 02:36:18 +01:00
teknomunk
3bbd5a20fa More fixes for minecart-hopper movement 2024-12-31 02:36:18 +01:00
teknomunk
7990ed65f6 Get rail placement creating corners that lead into a downward sloped rail 2024-12-31 02:36:18 +01:00
teknomunk
e1ff394204 Create mcl_util.metadata_timer, fix crashes, add checks to prevent hoppers from pulling from carts that are not in the square above it 2024-12-31 02:36:18 +01:00
teknomunk
712f0b9b9b Fix hopper-minecart interaction, convert ipairs(table) to use for i=1,#table instead 2024-12-31 02:36:18 +01:00
teknomunk
d93cf5d4f5 Update mineshafts for new rail and minecarts, add loot to generated chest and hopper minecarts (and remove notes about a hack) 2024-12-31 02:36:18 +01:00
teknomunk
04d29e8f2b Give carts a small vertical lift when pushed to allow them to get back on rails 2024-12-31 02:36:18 +01:00
teknomunk
eae9a2b6ad Stop rail from being placed directly above rail (floating in air) 2024-12-31 02:36:18 +01:00
teknomunk
7a1e0d9a52 Fix sloped power,activator and detector rails, remove debug print 2024-12-31 02:36:18 +01:00
teknomunk
9f192e87f3 Modify mcl_entity_invs to add support for save/load items hooks in entities, add save/load hooks to minecarts to store item list in the minecart data and not in the entity data so that respawn doesn't destroy items 2024-12-31 02:36:18 +01:00