Merge upstream sync: proper checks of player and mob_log_spawn feature log
* Merge upstream 'master' of https://notabug.org/TenPlus1/mobs_redo into main * proper checks on mount logic * seems minimized nodes at do_states, add older ones * 042130baca added 'mob_log_spawn' setting to log mob spawning position * 747af786a8 player nil check for mob attach 3 days ago * 8201c165e7 can now ride mobs redo mobs in mineclone2
This commit is contained in:
commit
950115d69e
7
api.lua
7
api.lua
@ -92,6 +92,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
|
||||
@ -4161,6 +4162,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
|
||||
|
1
api.txt
1
api.txt
@ -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
|
||||
|
@ -19,9 +19,10 @@ local is_mc2 = minetest.get_modpath("mcl_mobs") -- MineClone2 compatibility
|
||||
-- are we a real player ?
|
||||
local function is_player(player)
|
||||
|
||||
if player and type(player) == "userdata" and minetest.is_player(player) then
|
||||
return true
|
||||
if player then
|
||||
if type(player) == "userdata" then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
|
@ -39,6 +39,7 @@ Zeg9, ExeterDad and AspireMint.
|
||||
* 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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user