13559 Commits

Author SHA1 Message Date
teknomunk
5844dcfff9 Rewrite mcl_mobs:spawn_specific() in terms of mcl_mobs:spawn_setup() and mark as deprecated, cleanup mcl_mobs:spawn_setup(), compute cumulative chance once when the spawn list is created instead of every time a spawn is attempted 2025-01-20 18:37:09 +01:00
teknomunk
886098e5f4 Remove comment superceded by type annotations, give explicit values for mcl_mobs.SpawnDef.dimension 2025-01-20 18:37:09 +01:00
teknomunk
09eb6bde1e Fix crashes in generating state serialization, make adaptive spawn attempt rate actually work 2025-01-20 18:37:09 +01:00
teknomunk
2626a475ee Redo guardian spawn registration (copy biomes from glow squid) 2025-01-20 18:37:09 +01:00
teknomunk
8957bf300c Make sure all parameters to spawn_specific() get stored in the spawn definition, change select_random_mob_def() to remove possible error() call 2025-01-20 18:37:09 +01:00
teknomunk
b568a5cc49 Fix rebase missing moving a function to new mcl_util/table.lua 2025-01-20 18:37:09 +01:00
teknomunk
9aade4034f Add lava conditions 2025-01-20 18:37:09 +01:00
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
ee386080eb Optimize table.intersect 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
bd7c926aaf Move table.* functions to separate file in mcl_utils, add table.find() and table.intersect() 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
e24677bcf1 mcl_portals cleanups (#4858)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4858
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-20 18:36:27 +01:00
kno10
4c7003bd23 Fix stair -> stairs, stairs are plural (#4879)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4879
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-19 04:26:11 +01:00
kno10
53ca78be6f Cactus and cane trivial code cleanup (#4866)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4866
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-19 04:19:23 +01:00
kno10
5ccbe8c060 Make kelp not pass light (#4869)
the base blocks are solid, and should not pass light.

Fixes: light on sea floor with a mineshaft underneath.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4869
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-17 00:01:50 +01:00
kno10
61408dc1b6 Guard logging in mcl_dungeons (#4857)
No dungeon logging by default.

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4857
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-16 23:58:10 +01:00
Grillo del Mal
8e0feb5f4b Fix bow and spear being thrown when right clicking activable blocks. (#4851)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4851
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: Grillo del Mal <grillo@delmal.cl>
Co-committed-by: Grillo del Mal <grillo@delmal.cl>
2025-01-16 23:56:54 +01:00
OpenSauce04
7e96774b06 Remove clicking sound from walking on grass sound effects (#4727)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4727
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: OpenSauce04 <opensauce04@gmail.com>
Co-committed-by: OpenSauce04 <opensauce04@gmail.com>
2025-01-16 23:52:43 +01:00
the-real-herowl
7507715f43 Merge pull request 'Fix spear duplication' (#4849) from fix-spear-duplication into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4849
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-01-15 00:24:44 +01:00
teknomunk
96f04b0a91 Fix typo 2025-01-13 17:41:48 -06:00
teknomunk
f01eaf734d Add creative_collectable field to vl_projectile, cleanup vl_projectile.replace_with_item_drop() 2025-01-12 11:18:26 -06:00
teknomunk
1bdc7c94f2 Fix spear duplication 2025-01-12 18:06:32 +01:00
the-real-herowl
fdc2545511 Merge pull request 'Reduce tree growth speed, integrate cherry blossom trees better, simpler catch-up LBM' (#4817) from tree-growth-speed into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4817
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2025-01-12 17:13:37 +01:00
kno10
930d25079e slight cleanup for now, but needs an actual tree API eventually 2025-01-12 17:13:37 +01:00
kno10
53fcfb9077 add catch-up LBM 2025-01-12 17:13:37 +01:00
kno10
acd39c2b9c reduce differences of cherry trees, drop old catch-up logic 2025-01-12 17:13:37 +01:00
kno10
f454ca1071 reduce tree growth speed, drop LBMs 2025-01-12 17:13:37 +01:00
kno10
e80c9b328f gennotify callbacks for mangrove, chorus, crimson (#4856)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4856
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
2025-01-12 17:09:20 +01:00
Yoric
a40bbf7984 Remove the ability to right-click on a pressure plate - resolves #3843 (#4865)
Co-authored-by: Yoric <d.o.teller+github@gmail.com>
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4865
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Yoric <7vv00bbo8@mozmail.com>
Co-committed-by: Yoric <7vv00bbo8@mozmail.com>
2025-01-12 16:37:40 +01:00
the-real-herowl
b9945d027a Merge pull request 'Spawn room check that tolerates plants' (#4746) from spawn-space into master
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4746
Reviewed-by: teknomunk <teknomunk@protonmail.com>
2025-01-10 02:58:40 +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
SmokeyDope
ec72f7a60c Update redstone dust texture (#4842)
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4842
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: SmokeyDope <smokey@tilde.team>
Co-committed-by: SmokeyDope <smokey@tilde.team>
2025-01-09 07:33:53 +01:00