mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2025-01-08 08:50:20 +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 = {
|
||||
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")}
|
||||
|
6
api.txt
6
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
|
||||
|
Loading…
Reference in New Issue
Block a user