From fd0d71fbc04c83cfbaf6f7d1abc5d7b88be91d0e Mon Sep 17 00:00:00 2001 From: Lumipharon Date: Wed, 16 Oct 2024 10:40:10 +1300 Subject: [PATCH] Makes grenades peak (#16666) Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com> --- .../items/explosives/grenades/grenade.dm | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/code/game/objects/items/explosives/grenades/grenade.dm b/code/game/objects/items/explosives/grenades/grenade.dm index 760c38b86d68b..cf76d0bb25867 100644 --- a/code/game/objects/items/explosives/grenades/grenade.dm +++ b/code/game/objects/items/explosives/grenades/grenade.dm @@ -66,6 +66,15 @@ if(user.throw_item(target)) user.changeNext_move(CLICK_CD_THROWING) +/obj/item/explosive/grenade/update_overlays() + . = ..() + if(active && dangerous) + . += new /obj/effect/overlay/danger + +/obj/item/explosive/grenade/fire_act(burn_level) + activate() + +///Activates the grenade /obj/item/explosive/grenade/proc/activate(mob/user) if(active) return @@ -86,19 +95,20 @@ addtimer(CALLBACK(src, PROC_REF(prime)), det_time) return TRUE -/obj/item/explosive/grenade/update_overlays() - . = ..() - if(active && dangerous) - . += new /obj/effect/overlay/danger - - +///Detonation effects /obj/item/explosive/grenade/proc/prime() + if(ishuman(loc)) + var/mob/living/carbon/human/idiot = loc + if(idiot.l_hand == src) + idiot.amputate_limb(BODY_ZONE_PRECISE_L_HAND) + else if(idiot.r_hand == src) + idiot.amputate_limb(BODY_ZONE_PRECISE_R_HAND) + idiot.visible_message(span_danger("[idiot]'s hand is blown into tiny pieces by [src]!"), + span_userdanger("You feel incredible pain and stupidity as [src] blows your hand up.")) + idiot.emote("scream") explosion(loc, light_impact_range = src.light_impact_range, weak_impact_range = src.weak_impact_range) qdel(src) -/obj/item/explosive/grenade/fire_act(burn_level) - activate() - ///Adjusts det time, used for grenade launchers /obj/item/explosive/grenade/proc/launched_det_time() - det_time = min(10, det_time) + det_time = min(1 SECONDS, det_time)