add mtobjid mod to optional dependencies, stop mob count going below 0

This commit is contained in:
tenplus1 2023-06-06 08:49:45 +01:00
parent cc71ea4e95
commit 5f80d7a031
3 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi")
mobs = { mobs = {
mod = "redo", mod = "redo",
version = "20230527", version = "20230606",
intllib = S, intllib = S,
invis = minetest.global_exists("invisibility") and invisibility or {} invis = minetest.global_exists("invisibility") and invisibility or {}
} }
@ -870,7 +870,7 @@ local function remove_mob(self, decrease)
self.object:remove() self.object:remove()
if decrease and active_limit > 0 then if decrease and active_limit > 1 then
active_mobs = active_mobs - 1 active_mobs = active_mobs - 1
end end
--print("-- active mobs: " .. active_mobs .. " / " .. active_limit) --print("-- active mobs: " .. active_mobs .. " / " .. active_limit)

View File

@ -9,3 +9,4 @@ cmi?
toolranks? toolranks?
pathfinder? pathfinder?
player_api? player_api?
mtobjid?

View File

@ -1,4 +1,4 @@
name = mobs name = mobs
depends = depends =
optional_depends = default, tnt, dye, farming, invisibility, intllib, lucky_block, cmi, toolranks, pathfinder, player_api optional_depends = default, tnt, dye, farming, invisibility, intllib, lucky_block, cmi, toolranks, pathfinder, player_api, mtobjid
description = Adds a mob api for mods to add animals or monsters etc. description = Adds a mob api for mods to add animals or monsters etc.