fix crash on balrog dead if not enabled tnt explosion
* closes https://codeberg.org/minenux/minetest-mod-mobs_balrog/issues/4
* backported upstream commit bf4b9521cd
This commit is contained in:
parent
4fb57dd20a
commit
586980f672
21
balrog.lua
21
balrog.lua
@ -117,6 +117,7 @@ if (PATH_FINDER == nil) then
|
||||
PATH_FINDER = 1
|
||||
end
|
||||
|
||||
local enable_tnt = minetest.settings:get_bool("enable_tnt")
|
||||
|
||||
local spawn_nodes = {"group:stone"}
|
||||
if minetest.get_modpath("nether") then
|
||||
@ -206,15 +207,17 @@ mobs:register_mob("mobs_jam:balrog", {
|
||||
texture = "fire_basic_flame.png",
|
||||
collisiondetection = true,
|
||||
})
|
||||
tnt.boom(pos, {
|
||||
name = "Balrog's Blast",
|
||||
radius = 14,
|
||||
damage_radius = 50,
|
||||
disable_drops = true,
|
||||
ignore_protection = false,
|
||||
ignore_on_blast = false,
|
||||
tiles = {""},
|
||||
})
|
||||
if enable_tnt then
|
||||
tnt.boom(pos, {
|
||||
name = "Balrog's Blast",
|
||||
radius = 14,
|
||||
damage_radius = 50,
|
||||
disable_drops = true,
|
||||
ignore_protection = false,
|
||||
ignore_on_blast = false,
|
||||
tiles = {""},
|
||||
})
|
||||
end
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
@ -63,6 +63,12 @@ Optionally
|
||||
* intlib
|
||||
* lucky_blocks
|
||||
|
||||
### Configurations
|
||||
|
||||
animals has a bunch of options
|
||||
|
||||
balrog needs `enable_tnt` to set to true if you want to explote on dead!
|
||||
|
||||
## Animals:
|
||||
|
||||
**Note**: *After breeding, animals need to rest for 4 minutes and baby animals take 4 minutes to grow up, also feeding them helps them grow quicker...*
|
||||
|
Loading…
x
Reference in New Issue
Block a user