2655 Commits

Author SHA1 Message Date
teknomunk
b4cd5fe37c Add biome_lookup table to SpawnDef, type annotation for mcl_mobs.SpawnDef class 2025-01-20 18:37:09 +01:00
teknomunk
511434a923 Replace compute_hash with a string.format(), move spawn_names into logging block, remove argument aliasing in get_spawn_list(), add SpawnState type annotation 2025-01-20 18:37:09 +01:00
teknomunk
bc5e5f7262 Inline most spawn definition fields, remove table.insert() 2025-01-20 18:37:09 +01:00
teknomunk
0b07f449da Resolve linter warnings, replace get_item_group with groups.* lookups 2025-01-20 18:37:09 +01:00
teknomunk
e4b5673642 Resolve some review comments 2025-01-20 18:37:09 +01:00
teknomunk
35fafc9928 Resolve several lua-language-server findings, add missing get_item_group, remove spawn_def usage (didn't exist where attempted to be used) 2025-01-20 18:37:09 +01:00
teknomunk
add61ad6b2 Change main spawning look to use adaptive delay based on last run with maximum period of 2.5 seconds, put some logging behind a flag, remove unused constants 2025-01-20 18:37:09 +01:00
teknomunk
8b13b36a6a Move raycast_line_of_sight function to mcl_mobs/functions.lua, rework group spawn point selection code, add line of sight check to group origin 2025-01-20 18:37:09 +01:00
teknomunk
8c42694ac9 Change logging default and one log message 2025-01-20 18:37:09 +01:00
teknomunk
78aa99eacd Refactor spawn_group() so that each spawn point can only be used once and protection is respected 2025-01-20 18:37:09 +01:00
teknomunk
97a674e8c9 Fix passive spawning, disable some debug logging 2025-01-20 18:37:09 +01:00
teknomunk
28a058f8b7 Stop mobs that require ground from spawning in water, remove unused code and variables, some minor microoptimizations 2025-01-20 18:37:09 +01:00
teknomunk
61c9f9eade Drop biome group generation and replace with spawn state checks for much improved performance (but has regressions), change logging of failure to find spawn point, increase spawn attempts to 4 per second with no position retries and only a single mob or group per attempt 2025-01-20 18:37:09 +01:00
teknomunk
8af26e2e75 Replace biome_check() with table.find() 2025-01-20 18:37:09 +01:00
teknomunk
b636a2e831 Implement generating biome groups for spawning (not actually used yet) 2025-01-20 18:37:09 +01:00
teknomunk
0cb2ef8957 Initial changes to spawn_check() and spawn_a_mob(), add profiling for mob spawning 2025-01-20 18:37:09 +01:00
kno10
36bededf5d use helper function for cleaner code 2025-01-09 13:01:25 +01:00
kno10
f8a6172ca3 actually support spawnbox, drop old collisionbox workaround 2025-01-09 13:01:25 +01:00
kno10
2c2e5d7dc8 allow spawning medium size mobs in 2x2 2025-01-09 13:01:25 +01:00
kno10
a4fa9c1913 make fly_in a map 2025-01-09 13:01:25 +01:00
kno10
ac1333be94 spawn room check that tolerates plants 2025-01-09 13:01:25 +01:00
teknomunk
7c7c2bcb6d Address review comments 2025-01-05 02:37:51 +01:00
teknomunk
cc125d8eac Fix all luacheck findings except two empty if branches, two references to math.round and the *_physics variables from optional mods (each guarded by modpath checks) 2025-01-05 02:37:51 +01:00
teknomunk
24ca1b20a8 Export handle_cart_leave from movement, resolve luacheck and lua-language-server findings, fix typo 2025-01-05 02:37:51 +01:00
Mikita Wiśniewski
2df6f7d5d4 Fix jockey spawn room check (#4812)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4812
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-01-05 02:23:48 +01:00
teknomunk
dfc8733261 Change the default logging setting in mob movement from true to false 2025-01-03 13:20:21 +01:00
kno10
25a832c4b6 rerun mod_translation_updater 2025-01-03 11:56:04 +01:00
ninjum
b407cc9628 Squashed: Galician translation 2025-01-03 11:56:04 +01:00
teknomunk
5ee94855b0 Fix TNT Minecart Crash (#4799)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4799
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2025-01-03 11:53:31 +01:00
teknomunk
9b23d9931e Change cart dismount position to behind the cart instead of beside it (#4785)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4785
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2025-01-02 22:30:39 +01:00
teknomunk
ca504e80c7 Fix carts randomly derailing (#4780)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4780
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
2024-12-31 19:35:54 +01:00
kno10
8f3f0e3b44 additional German translations 2024-12-31 02:39:28 +01:00
kno10
b39cee7c5c rerun translation updater 2024-12-31 02:39:28 +01:00
JOSE DANIEL ANGULO PLATA
79fb8b6371 More translations in Spanish 2024-12-31 02:39:28 +01:00
JOSE DANIEL ANGULO PLATA
470ce57ff5 More translations in Spanish 2024-12-31 02:39:28 +01:00
teknomunk
290e2e9753 Fix cart placement so that furnace minecarts will always try to start moving in the direction the player was facing when the cart was placed 2024-12-31 02:36:18 +01:00
teknomunk
7bf2e08baa Fix cart direction when starting to move forward 2024-12-31 02:36:18 +01:00
teknomunk
b5754d63a2 Remove temporary description string, add assert to force description field to be present in rail definitions and fix descriptions for on variants of rail 2024-12-31 02:36:18 +01:00
teknomunk
1656262156 Re-enable trains by default, add to settingtypes.txt 2024-12-31 02:36:18 +01:00
teknomunk
0dbf3fcd62 Fix crash in rail corridor generation, fix missing globals warnings, fix floating rail in rail corridors 2024-12-31 02:36:18 +01:00
teknomunk
46ea9e98cc Guard against undefined nodes 2024-12-31 02:36:18 +01:00
teknomunk
363187b0d6 Prevent glitching into solid blocks at the end of rail 2024-12-31 02:36:18 +01:00
teknomunk
aef68d34fd Address review comment and adjust multiplier 2024-12-31 02:36:18 +01:00
teknomunk
42fe5c4c85 Reduce repulsion of carts off rails 2024-12-31 02:36:18 +01:00
teknomunk
6898675e05 Limit detached cart vertical boost to no more than what is needed to get over the lip of rails 2024-12-31 02:36:18 +01:00
teknomunk
cacc9d384f Handle edge case in mcl_minecarts.reverse_cart_direction() that lead to strange punching and pushing behavior 2024-12-31 02:36:18 +01:00
teknomunk
31066caf06 Fix cart reversal/wrong direction movement on collisions 2024-12-31 02:36:18 +01:00
teknomunk
48c380ca0b Make sure to clear _passenger after expelling mobs 2024-12-31 02:36:18 +01:00
teknomunk
bf9ad1919e Prevent players getting in the same cart as a mob, don't allow mobs already in a cart to be moved to another one 2024-12-31 02:36:18 +01:00
teknomunk
bef17e5401 Patch initial cart direction when placing 2024-12-31 02:36:18 +01:00