forked from Mineclonia/Mineclonia
Fix fire charge death message
This commit is contained in:
parent
95e8f80f2c
commit
e9070ee134
|
@ -36,6 +36,9 @@ local msgs = {
|
||||||
"%s was burned to death by a blaze's fireball.",
|
"%s was burned to death by a blaze's fireball.",
|
||||||
"%s was killed by a fireball from a blaze.",
|
"%s was killed by a fireball from a blaze.",
|
||||||
},
|
},
|
||||||
|
["fire_charge"] = {
|
||||||
|
"%s was hit by a fire charge.",
|
||||||
|
},
|
||||||
["ghast_fireball"] = {
|
["ghast_fireball"] = {
|
||||||
"A ghast scared %s to death.",
|
"A ghast scared %s to death.",
|
||||||
"%s has been fireballed by a ghast.",
|
"%s has been fireballed by a ghast.",
|
||||||
|
@ -63,7 +66,6 @@ mobkills = {
|
||||||
["mobs_mc:ocelot"] = "%s was killed by an ocelot.",
|
["mobs_mc:ocelot"] = "%s was killed by an ocelot.",
|
||||||
["mobs_mc:ender_dragon"] = "%s was killed by an ender dragon.",
|
["mobs_mc:ender_dragon"] = "%s was killed by an ender dragon.",
|
||||||
["mobs_mc:wither"] = "%s was killed by a wither.",
|
["mobs_mc:wither"] = "%s was killed by a wither.",
|
||||||
["mobs_mc:blaze"] = "%s was killed by a blaze.",
|
|
||||||
["mobs_mc:enderman"] = "%s was killed by an enderman.",
|
["mobs_mc:enderman"] = "%s was killed by an enderman.",
|
||||||
["mobs_mc:endermite"] = "%s was killed by an endermite.",
|
["mobs_mc:endermite"] = "%s was killed by an endermite.",
|
||||||
["mobs_mc:ghast"] = "%s was killed by a ghast.",
|
["mobs_mc:ghast"] = "%s was killed by a ghast.",
|
||||||
|
@ -150,6 +152,8 @@ minetest.register_on_dieplayer(function(player)
|
||||||
msg = dmsg("blaze_fireball", name)
|
msg = dmsg("blaze_fireball", name)
|
||||||
elseif last_damages[name].hittertype == "ghast_fireball" then
|
elseif last_damages[name].hittertype == "ghast_fireball" then
|
||||||
msg = dmsg("ghast_fireball", name)
|
msg = dmsg("ghast_fireball", name)
|
||||||
|
elseif last_damages[name].hittertype == "fire_charge" then
|
||||||
|
msg = dmsg("fire_charge", name)
|
||||||
-- Custom death message
|
-- Custom death message
|
||||||
elseif last_damages[name].custom then
|
elseif last_damages[name].custom then
|
||||||
msg = last_damages[name].message
|
msg = last_damages[name].message
|
||||||
|
@ -196,7 +200,11 @@ minetest.register_on_punchplayer(function(player, hitter)
|
||||||
end
|
end
|
||||||
-- Blaze fireball
|
-- Blaze fireball
|
||||||
elseif hitter:get_luaentity().name == "mobs_mc:blaze_fireball" then
|
elseif hitter:get_luaentity().name == "mobs_mc:blaze_fireball" then
|
||||||
|
if hitter:get_luaentity()._shot_from_dispenser then
|
||||||
|
hittertype = "fire_charge"
|
||||||
|
else
|
||||||
hittertype = "blaze_fireball"
|
hittertype = "blaze_fireball"
|
||||||
|
end
|
||||||
-- Ghast fireball
|
-- Ghast fireball
|
||||||
elseif hitter:get_luaentity().name == "mobs_monster:fireball" then
|
elseif hitter:get_luaentity().name == "mobs_monster:fireball" then
|
||||||
hittertype = "ghast_fireball"
|
hittertype = "ghast_fireball"
|
||||||
|
|
|
@ -106,6 +106,7 @@ local dispenserdef = {
|
||||||
local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
local shootpos = vector.add(pos, vector.multiply(dropdir, 0.51))
|
||||||
local fireball = minetest.add_entity(shootpos, "mobs_mc:blaze_fireball")
|
local fireball = minetest.add_entity(shootpos, "mobs_mc:blaze_fireball")
|
||||||
local ent = fireball:get_luaentity()
|
local ent = fireball:get_luaentity()
|
||||||
|
ent._shot_from_dispenser = true
|
||||||
local v = ent.velocity or 1
|
local v = ent.velocity or 1
|
||||||
fireball:setvelocity(vector.multiply(dropdir, v))
|
fireball:setvelocity(vector.multiply(dropdir, v))
|
||||||
ent.switch = 1
|
ent.switch = 1
|
||||||
|
|
Loading…
Reference in New Issue