explosions use tnt.boom() when TNT mod found, otherwise only entity damage

This commit is contained in:
TenPlus1 2017-07-08 21:24:30 +01:00
parent 7e09281760
commit 7b02fef7a5
2 changed files with 10 additions and 5 deletions

13
api.lua
View File

@ -1694,10 +1694,15 @@ local do_states = function(self, dtime)
self.object:remove()
tnt.boom(pos, {
radius = radius,
damage_radius = damage_radius,
})
if minetest.get_modpath("tnt") then
tnt.boom(pos, {
radius = radius,
damage_radius = damage_radius,
})
else
entity_physics(pos, damage_radius)
end
return
end

View File

@ -1,5 +1,5 @@
default
tnt
tnt?
dye?
farming?
invisibility?