From 5f80d7a03156c95614e84de53ad144c33a2009a4 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Tue, 6 Jun 2023 08:49:45 +0100 Subject: [PATCH] add mtobjid mod to optional dependencies, stop mob count going below 0 --- api.lua | 4 ++-- depends.txt | 1 + mod.conf | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index 09669c8..8ab5445 100644 --- a/api.lua +++ b/api.lua @@ -25,7 +25,7 @@ local use_cmi = minetest.global_exists("cmi") mobs = { mod = "redo", - version = "20230527", + version = "20230606", intllib = S, invis = minetest.global_exists("invisibility") and invisibility or {} } @@ -870,7 +870,7 @@ local function remove_mob(self, decrease) self.object:remove() - if decrease and active_limit > 0 then + if decrease and active_limit > 1 then active_mobs = active_mobs - 1 end --print("-- active mobs: " .. active_mobs .. " / " .. active_limit) diff --git a/depends.txt b/depends.txt index 6297913..8db8f2e 100644 --- a/depends.txt +++ b/depends.txt @@ -9,3 +9,4 @@ cmi? toolranks? pathfinder? player_api? +mtobjid? diff --git a/mod.conf b/mod.conf index d1f746c..d8dad31 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = mobs 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.