Browse Source

if no tnt add entity damage/effects/sound

pull/97/merge
TenPlus1 2 years ago
parent
commit
e4ca054be3
2 changed files with 10 additions and 3 deletions
  1. +6
    -2
      api.lua
  2. +4
    -1
      sounds/license.txt

+ 6
- 2
api.lua View File

@@ -1,9 +1,9 @@

-- Mobs Api (9th July 2017)

mobs = {}
mobs.mod = "redo"
mobs.version = "20170708"
mobs.version = "20170709"


-- Intllib
@@ -1694,14 +1694,17 @@ local do_states = function(self, dtime)

self.object:remove()

if minetest.get_modpath("tnt") then
if minetest.get_modpath("tnt") and tnt and tnt.boom then

tnt.boom(pos, {
radius = radius,
damage_radius = damage_radius,
sound = self.sounds.explode,
})
else
mob_sound(self, self.sounds.explode)
entity_physics(pos, damage_radius)
effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0)
end

return


+ 4
- 1
sounds/license.txt View File

@@ -1,4 +1,7 @@
Creative Commons sounds from Freesound.org

mobs_swing.ogg by qubodup
mobs_spell.ogg by littletobotsoundfactory
- http://freesound.org/people/qubodup/sounds/60012/
mobs_spell.ogg by littlerobotsoundfactory
- http://freesound.org/people/LittleRobotSoundFactory/sounds/270396/

Loading…
Cancel
Save