mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Fixes flashbangs not damaging the hand they explode in (#22160)
Makes flashbangs damage the hand they explode in again.
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
new /obj/effect/smoke/illumination(T, brightness=15)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/flashbang/explode_in_hand(var/mob/living/carbon/human/victim, var/obj/item/organ/external/exploded_hand)
|
||||
/obj/item/grenade/flashbang/explode_in_hand(var/mob/living/carbon/human/victim, var/obj/item/organ/external/exploded_organ)
|
||||
. = ..()
|
||||
if(exploded_hand)
|
||||
victim.apply_damage(30, DAMAGE_BRUTE, exploded_hand, src, DAMAGE_FLAG_EXPLODE, 20)
|
||||
victim.apply_damage(20, DAMAGE_BURN, exploded_hand, src, DAMAGE_FLAG_EXPLODE, 20)
|
||||
else
|
||||
victim.apply_damage(20, DAMAGE_BRUTE, exploded_hand, src, DAMAGE_FLAG_EXPLODE|DAMAGE_FLAG_DISPERSED, 20)
|
||||
victim.apply_damage(30, DAMAGE_BURN, exploded_hand, src, DAMAGE_FLAG_EXPLODE|DAMAGE_FLAG_DISPERSED, 20)
|
||||
if(exploded_organ)
|
||||
victim.apply_damage(20, DAMAGE_BRUTE, exploded_organ, src, DAMAGE_FLAG_EXPLODE, 20)
|
||||
victim.apply_damage(30, DAMAGE_BURN, exploded_organ, src, DAMAGE_FLAG_EXPLODE, 20)
|
||||
|
||||
victim.apply_damage(20, DAMAGE_BRUTE, null, src, DAMAGE_FLAG_EXPLODE|DAMAGE_FLAG_DISPERSED, 20)
|
||||
victim.apply_damage(30, DAMAGE_BURN, null, src, DAMAGE_FLAG_EXPLODE|DAMAGE_FLAG_DISPERSED, 20)
|
||||
|
||||
/obj/item/grenade/flashbang/proc/bang(turf/T, mob/living/M)
|
||||
to_chat(M, SPAN_HIGHDANGER("BANG!"))
|
||||
|
||||
@@ -93,18 +93,18 @@
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/victim = loc
|
||||
var/obj/item/organ/external/exploded_hand
|
||||
if(victim.hand == src)
|
||||
exploded_hand = victim.organs_by_name[BP_R_HAND]
|
||||
else if(victim.l_hand == src)
|
||||
exploded_hand = victim.organs_by_name[BP_L_HAND]
|
||||
explode_in_hand(victim, exploded_hand)
|
||||
var/obj/item/organ/external/exploded_organ
|
||||
if(victim.l_hand == src)
|
||||
exploded_organ = victim.get_organ(BP_L_HAND)
|
||||
else if(victim.r_hand == src)
|
||||
exploded_organ = victim.get_organ(BP_R_HAND)
|
||||
explode_in_hand(victim, exploded_organ)
|
||||
|
||||
/// This proc is called when the grenade explodes in your hand or on you. Exploded_hand can be null in case the grenade explodes in a pocket or something.
|
||||
/obj/item/grenade/proc/explode_in_hand(var/mob/living/carbon/human/victim, var/obj/item/organ/external/exploded_hand)
|
||||
/// This proc is called when the grenade explodes in your hand or on you. Exploded_organ can be null in case the grenade explodes in a pocket or something.
|
||||
/obj/item/grenade/proc/explode_in_hand(var/mob/living/carbon/human/victim, var/obj/item/organ/external/exploded_organ)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
if(exploded_hand)
|
||||
to_chat(victim, SPAN_HIGHDANGER("\The [src] goes off in your hand!"))
|
||||
if(exploded_organ)
|
||||
victim.visible_message(SPAN_DANGER("\The [src] goes off in \the [victim]'s hands!"), SPAN_HIGHDANGER("\The [src] goes off in your hand!"))
|
||||
else
|
||||
to_chat(victim, SPAN_HIGHDANGER("\The [src] goes off on you!"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user