Fixes the Russian Revolver dual wield exploit (#42887)

Fixes #42880
Also theoretically patches out any future bypassing behavior by overriding the function that makes guns actually able to shoot since the russian revolver is all special functionality.
Also corrects some odd behavior with the russian revolver.
## Why It's Good For The Game

I don't think a free 357 is a good idea
## Changelog

cl
fix: The anti-combat mechanism in the Russian Revolver has been revised to prevent usage while dual wielding.
/cl
This commit is contained in:
Rob Bailey
2019-02-25 09:30:12 +13:00
committed by oranges
parent d8c0c4fdd4
commit a0787fef05
@@ -160,17 +160,20 @@
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/attackby(obj/item/A, mob/user, params)
..()
if(get_ammo() > 0)
spin()
spun = TRUE
update_icon()
A.update_icon()
return
/obj/item/gun/ballistic/revolver/russian/attack_self(mob/user)
if(!spun && can_shoot())
if(!spun)
spin()
spun = TRUE
return
@@ -195,7 +198,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!spun)
to_chat(user, "<span class='warning'>You need to spin the revolver's chamber first!</span>")
to_chat(user, "<span class='warning'>You need to spin \the [src]'s chamber first!</span>")
return
spun = FALSE
@@ -216,6 +219,11 @@
user.visible_message("<span class='danger'>*click*</span>")
playsound(src, dry_fire_sound, 30, TRUE)
/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, dry_fire_sound, 30, TRUE)
user.visible_message("<span class='danger'>[user.name] tries to fire \the [src] at the same time, but only succeeds at looking like an idiot.</span>", "<span class='danger'>\The [src]'s anti-combat mechanism prevents you from firing it at the same time!</span>")
/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("<span class='danger'>[user.name] fires [src] at [user.p_their()] head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "<span class='italics'>You hear a gunshot!</span>")