added 'mob_log_spawn' setting to log mob spawning position.
This commit is contained in:
parent
747af786a8
commit
042130baca
7
api.lua
7
api.lua
@ -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 peaceful_player_enabled = settings:get_bool("enable_peaceful_player")
|
||||||
local mob_smooth_rotate = settings:get_bool("mob_smooth_rotate") ~= false
|
local mob_smooth_rotate = settings:get_bool("mob_smooth_rotate") ~= false
|
||||||
local mob_height_fix = settings:get_bool("mob_height_fix") ~= 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
|
local active_mobs = 0
|
||||||
|
|
||||||
-- get loop timers for node and main functions
|
-- 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 "
|
-- .. minetest.pos_to_string(pos) .. " on "
|
||||||
-- .. node.name .. " near " .. neighbors[1])
|
-- .. 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
|
if on_spawn and mob then
|
||||||
on_spawn(mob:get_luaentity(), pos)
|
on_spawn(mob:get_luaentity(), pos)
|
||||||
end
|
end
|
||||||
|
1
api.txt
1
api.txt
@ -744,6 +744,7 @@ the tools own meta to override the default.
|
|||||||
External Settings for "minetest.conf"
|
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)
|
'mob_node_timer_interval' How often mobs get nodes around them (0.25 is default)
|
||||||
for every 1/4 second.
|
for every 1/4 second.
|
||||||
'mob_main_timer_interval' How often mobs run main functions (1.0 is default) for
|
'mob_main_timer_interval' How often mobs run main functions (1.0 is default) for
|
||||||
|
@ -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
|
* Added 'mobs_attack_creatura' setting so that monsters can attack Creatura mobs
|
||||||
* Nodes can be added to 'runaway_from' table
|
* Nodes can be added to 'runaway_from' table
|
||||||
* Better Mineclone2 compatibility with api, items and recipes
|
* Better Mineclone2 compatibility with api, items and recipes
|
||||||
|
* Added 'mob_log_spawn' setting to log spawning of mobs and position
|
||||||
|
|
||||||
### Version 1.56
|
### Version 1.56
|
||||||
|
|
||||||
|
@ -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
|
# Fix Mob Height if too low so they cannot escape through specific nodes
|
||||||
mob_height_fix (Fix Mob Height) bool true
|
mob_height_fix (Fix Mob Height) bool true
|
||||||
|
|
||||||
|
mob_log_spawn (Log Mob Spawning) bool false
|
||||||
|
|
||||||
[Pathfinding]
|
[Pathfinding]
|
||||||
# Enable pathfinding (default Enabled)
|
# Enable pathfinding (default Enabled)
|
||||||
mob_pathfinding_enable (Enable pathfinding) bool true
|
mob_pathfinding_enable (Enable pathfinding) bool true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user