added 'mob_log_spawn' setting to log mob spawning position.

This commit is contained in:
tenplus1 2023-07-30 11:56:08 +01:00
parent 747af786a8
commit 042130baca
4 changed files with 11 additions and 0 deletions

View File

@ -88,6 +88,7 @@ local mob_chance_multiplier = tonumber(settings:get("mob_chance_multiplier") or
local peaceful_player_enabled = settings:get_bool("enable_peaceful_player")
local mob_smooth_rotate = settings:get_bool("mob_smooth_rotate") ~= false
local mob_height_fix = settings:get_bool("mob_height_fix") ~= false
local mob_log_spawn = settings:get_bool("mob_log_spawn") == true
local active_mobs = 0
-- get loop timers for node and main functions
@ -4100,6 +4101,12 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
-- .. minetest.pos_to_string(pos) .. " on "
-- .. node.name .. " near " .. neighbors[1])
if mob_log_spawn then
minetest.log("[MOBS] Spawned " .. name .. " at "
.. minetest.pos_to_string(pos))
end
if on_spawn and mob then
on_spawn(mob:get_luaentity(), pos)
end

View File

@ -744,6 +744,7 @@ the tools own meta to override the default.
External Settings for "minetest.conf"
------------------------------------
'mob_log_spawn' When True will log spawning position of mobs.
'mob_node_timer_interval' How often mobs get nodes around them (0.25 is default)
for every 1/4 second.
'mob_main_timer_interval' How often mobs run main functions (1.0 is default) for

View File

@ -35,6 +35,7 @@ https://forum.minetest.net/viewtopic.php?f=11&t=9917
* Added 'mobs_attack_creatura' setting so that monsters can attack Creatura mobs
* Nodes can be added to 'runaway_from' table
* Better Mineclone2 compatibility with api, items and recipes
* Added 'mob_log_spawn' setting to log spawning of mobs and position
### Version 1.56

View File

@ -58,6 +58,8 @@ mob_smooth_rotate (Smooth rotation for mobs) bool true
# Fix Mob Height if too low so they cannot escape through specific nodes
mob_height_fix (Fix Mob Height) bool true
mob_log_spawn (Log Mob Spawning) bool false
[Pathfinding]
# Enable pathfinding (default Enabled)
mob_pathfinding_enable (Enable pathfinding) bool true