mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-09 09:20:21 +01:00
switch node/entity setting in mobs:boom
This commit is contained in:
parent
bde53c3475
commit
ca76558edd
8
api.lua
8
api.lua
@ -19,7 +19,7 @@ end
|
|||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20241116",
|
version = "20241121",
|
||||||
spawning_mobs = {},
|
spawning_mobs = {},
|
||||||
translate = S,
|
translate = S,
|
||||||
node_snow = has(minetest.registered_aliases["mapgen_snow"])
|
node_snow = has(minetest.registered_aliases["mapgen_snow"])
|
||||||
@ -4182,14 +4182,14 @@ end
|
|||||||
|
|
||||||
-- make explosion with protection and tnt mod check
|
-- 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
|
if mobs_griefing and minetest.get_modpath("tnt") and tnt and tnt.boom
|
||||||
and not minetest.is_protected(pos, "") then
|
and not minetest.is_protected(pos, "") then
|
||||||
|
|
||||||
tnt.boom(pos, {
|
tnt.boom(pos, {
|
||||||
radius = radius,
|
radius = node_damage_radius,
|
||||||
damage_radius = damage_radius,
|
damage_radius = entity_radius,
|
||||||
sound = self.sounds and self.sounds.explode,
|
sound = self.sounds and self.sounds.explode,
|
||||||
explode_center = true,
|
explode_center = true,
|
||||||
tiles = {(texture or "tnt_smoke.png")}
|
tiles = {(texture or "tnt_smoke.png")}
|
||||||
|
6
api.txt
6
api.txt
@ -619,11 +619,11 @@ Explosion Function
|
|||||||
|
|
||||||
mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead
|
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
|
'self' mob entity
|
||||||
'pos' centre position of explosion
|
'pos' centre position of explosion
|
||||||
'radius' radius of explosion (typically set to 3)
|
'damage_radius' radius of node damage (typically 3)
|
||||||
'damage_radius' radius of damage around explosion
|
'entity_radius' radius of explosion to players and mobs
|
||||||
'texture' particle texture during explosion, defaults to "tnt_smoke.png"
|
'texture' particle texture during explosion, defaults to "tnt_smoke.png"
|
||||||
|
|
||||||
This function generates an explosion which removes nodes in a specific radius
|
This function generates an explosion which removes nodes in a specific radius
|
||||||
|
Loading…
Reference in New Issue
Block a user