diff --git a/api.lua b/api.lua index 6dbd6e8..462ba5f 100644 --- a/api.lua +++ b/api.lua @@ -19,7 +19,7 @@ end mobs = { mod = "redo", - version = "20241116", + version = "20241121", spawning_mobs = {}, translate = S, node_snow = has(minetest.registered_aliases["mapgen_snow"]) @@ -4182,14 +4182,14 @@ end -- make explosion with protection and tnt mod check -function mobs:boom(self, pos, radius, damage_radius, texture) +function mobs:boom(self, pos, entity_radius, node_damage_radius, texture) if mobs_griefing and minetest.get_modpath("tnt") and tnt and tnt.boom and not minetest.is_protected(pos, "") then tnt.boom(pos, { - radius = radius, - damage_radius = damage_radius, + radius = node_damage_radius, + damage_radius = entity_radius, sound = self.sounds and self.sounds.explode, explode_center = true, tiles = {(texture or "tnt_smoke.png")} diff --git a/api.txt b/api.txt index a5830ef..4e919be 100644 --- a/api.txt +++ b/api.txt @@ -619,11 +619,11 @@ Explosion Function mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead -mobs:boom(self, pos, radius, damage_radius, texture) +mobs:boom(self, pos, entity_radius, damage_radius, texture) 'self' mob entity 'pos' centre position of explosion - 'radius' radius of explosion (typically set to 3) - 'damage_radius' radius of damage around explosion + 'damage_radius' radius of node damage (typically 3) + 'entity_radius' radius of explosion to players and mobs 'texture' particle texture during explosion, defaults to "tnt_smoke.png" This function generates an explosion which removes nodes in a specific radius