mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-18 00:51:06 +01:00
Add command damage type (This is Non-MC)
This commit is contained in:
parent
53b0ad7347
commit
c9b4ddb923
2 changed files with 3 additions and 2 deletions
|
@ -27,6 +27,7 @@ mcl_damage = {
|
||||||
explosion = {is_explosion = true},
|
explosion = {is_explosion = true},
|
||||||
cramming = {bypasses_armor = true}, -- unused
|
cramming = {bypasses_armor = true}, -- unused
|
||||||
fireworks = {is_explosion = true}, -- unused
|
fireworks = {is_explosion = true}, -- unused
|
||||||
|
command = {bypasses_armor = true, bypasses_invulnerability = true, bypasses_magic = true},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ local function handle_kill_command(suspect, victim)
|
||||||
mcl_death_messages.player_damage(victimref, msg)
|
mcl_death_messages.player_damage(victimref, msg)
|
||||||
end
|
end
|
||||||
-- DIE!
|
-- DIE!
|
||||||
victimref:set_hp(0)
|
victimref:set_hp(0, {_mcl_type = "command"})
|
||||||
-- Log
|
-- Log
|
||||||
if not suspect == victim then
|
if not suspect == victim then
|
||||||
minetest.log("action", string.format("%s killed %s using /kill", suspect, victim))
|
minetest.log("action", string.format("%s killed %s using /kill", suspect, victim))
|
||||||
|
@ -56,4 +56,4 @@ minetest.register_chatcommand("kill", {
|
||||||
return handle_kill_command(name, param)
|
return handle_kill_command(name, param)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue