Add back the explosion death msg
This commit is contained in:
parent
7fa8828bd5
commit
d4bc7a2f88
4 changed files with 17 additions and 5 deletions
|
@ -10,10 +10,12 @@ This mod was created by Elias Astrom <ryvnf@riseup.net> and is released
|
|||
under the LGPLv2.1 license.
|
||||
--]]
|
||||
|
||||
|
||||
mcl_explosions = {}
|
||||
|
||||
local creative_mode = minetest.settings:get_bool("creative_mode")
|
||||
local mod_death_messages = minetest.get_modpath("mcl_death_messages") ~= nil
|
||||
|
||||
local S = minetest.get_translator("mcl_explosions")
|
||||
|
||||
-- Saved sphere explosion shapes for various radiuses
|
||||
local sphere_shapes = {}
|
||||
|
@ -280,6 +282,9 @@ local function trace_explode(pos, strength, raydirs, radius, drop_chance)
|
|||
impact = 0
|
||||
end
|
||||
local damage = math.floor((impact * impact + impact) * 7 * strength + 1)
|
||||
if mod_death_messages and obj:is_player() then
|
||||
mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name()))
|
||||
end
|
||||
obj:punch(obj, 10, { damage_groups = { full_punch_interval = 1,
|
||||
fleshy = damage, knockback = impact * 20.0 } }, punch_dir)
|
||||
|
||||
|
|
2
mods/CORE/mcl_explosions/locale/mcl_explosions.de.tr
Normal file
2
mods/CORE/mcl_explosions/locale/mcl_explosions.de.tr
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain:mcl_explosions
|
||||
@1 was caught in an explosion.=@1 wurde Opfer einer Explosion.
|
2
mods/CORE/mcl_explosions/locale/template.txt
Normal file
2
mods/CORE/mcl_explosions/locale/template.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
# textdomain:mcl_explosions
|
||||
@1 was caught in an explosion.=
|
Loading…
Add table
Add a link
Reference in a new issue