From 84f37092fec9215c0bb13d74346a726f4142c7bf Mon Sep 17 00:00:00 2001 From: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Date: Thu, 26 Mar 2020 00:29:32 +1100 Subject: [PATCH] Prevents being able to fire a russian revolver in your off-hand while dual-wielding. (#11610) --- code/modules/projectiles/guns/ballistic/revolver.dm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 4c9642df51..7d2910fad3 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -176,6 +176,10 @@ mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rus357 var/spun = FALSE +/obj/item/gun/ballistic/revolver/russian/do_spin() + . = ..() + spun = TRUE + /obj/item/gun/ballistic/revolver/russian/Initialize() . = ..() do_spin() @@ -192,7 +196,7 @@ return /obj/item/gun/ballistic/revolver/russian/attack_self(mob/user) - if(!spun && can_shoot()) + if(!spun) spin() spun = TRUE return @@ -217,7 +221,7 @@ if(ishuman(user)) var/mob/living/carbon/human/H = user if(!spun) - to_chat(user, "You need to spin the revolver's chamber first!") + to_chat(user, "You need to spin \the [src]'s chamber first!") return spun = FALSE @@ -238,6 +242,11 @@ user.visible_message("*click*") playsound(src, "gun_dry_fire", 30, 1) +/obj/item/gun/ballistic/revolver/russian/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0) + add_fingerprint(user) + playsound(src, "gun_dry_fire", 30, TRUE) + user.visible_message("[user.name] tries to fire \the [src] at the same time, but only succeeds at looking like an idiot.", "\The [src]'s anti-combat mechanism prevents you from firing it at the same time!") + /obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = BODY_ZONE_HEAD) user.apply_damage(300, BRUTE, affecting) user.visible_message("[user.name] fires [src] at [user.p_their()] head!", "You fire [src] at your head!", "You hear a gunshot!")