Don't display global mob cap reached unless logging setting has been enabled ()

Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4901
Reviewed-by: kno10 <kno10@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
teknomunk 2025-02-09 16:58:26 +01:00 committed by the-real-herowl
parent 12ad6f586d
commit da7cf8a723

View file

@ -1080,7 +1080,9 @@ if mobs_spawn then
local cap_space_non_hostile = math_max(mob_cap.global_non_hostile - total_non_hostile, 0)
if total_mobs > mob_cap.total or total_mobs >= #players * mob_cap.player then
core.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
if logging then
core.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
end
--note = "global mob cap reached"
return
end --mob cap per player