mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Adds deflection messages for no damage attacks against objects (#5694)
* Adds deflection messages for no damage attacks against objects (#58873) * Adds deflection messages for no damage attacks * Changes the addition to ", which doesn't leave a mark" instead * Adds deflection messages for no damage attacks against objects Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
This commit is contained in:
@@ -75,10 +75,11 @@
|
||||
/obj/bullet_act(obj/projectile/P)
|
||||
. = ..()
|
||||
playsound(src, P.hitsound, 50, TRUE)
|
||||
var/no_damage = FALSE
|
||||
if(!QDELETED(src) && !take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration)) //Bullet on_hit effect might have already destroyed this object
|
||||
no_damage = TRUE
|
||||
if(P.suppressed != SUPPRESSED_VERY)
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
if(!QDELETED(src)) //Bullet on_hit effect might have already destroyed this object
|
||||
take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration)
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P][no_damage ? ", which doesn't leave a mark" : ""]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
///Called to get the damage that hulks will deal to the obj.
|
||||
/obj/proc/hulk_damage()
|
||||
|
||||
Reference in New Issue
Block a user