From 809335b3b98025097167b649b8ad00d83b1672cc Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Sun, 16 Jul 2023 12:21:10 -0400
Subject: [PATCH] [s] Fixes an inconstancy (#21701)
* fixes an inconsistency
* Apply suggestions from code review
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
---------
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
---
code/game/objects/items/toys.dm | 35 +++++++++++++++++++++++++++++++
code/modules/mob/living/living.dm | 5 +++++
2 files changed, 40 insertions(+)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index d51441f8e6d..89a937df4df 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -1087,13 +1087,48 @@
/obj/item/toy/russian_revolver/trick_revolver/examine(mob/user) //Sneaky sneaky
. = ..()
+ . += "Use a pen on it to rename it."
. += "Has [fake_bullets] round\s remaining."
+ . += "Use in hand to empty the gun's ammo reserves."
. += "[fake_bullets] of those are live rounds."
/obj/item/toy/russian_revolver/trick_revolver/post_shot(user)
to_chat(user, "[src] did look pretty dodgey!")
SEND_SOUND(user, sound('sound/misc/sadtrombone.ogg')) //HONK
+/obj/item/toy/russian_revolver/trick_revolver/verb/trick_spin()
+ set name = "Spin Chamber"
+ set category = "Object"
+ set desc = "Click to spin your revolver's chamber."
+
+ var/mob/M = usr
+
+ if(M.stat || !in_range(M, src))
+ return
+
+ to_chat(M, "You go to spin the chamber... and it goes off in your face!")
+ shoot_gun(M)
+
+/obj/item/toy/russian_revolver/trick_revolver/attack_self(mob/user)
+ if(!bullets_left) //You can re-arm the trap...
+ user.visible_message("[user] loads a bullet into [src]'s cylinder before spinning it.")
+ spin_cylinder()
+ else //But if you try to spin it to see if it was fake...
+ user.visible_message("[user] tries to empty [src], but it goes off in their face!")
+ shoot_gun(user)
+
+/obj/item/toy/russian_revolver/trick_revolver/attackby(obj/item/I, mob/user, params)
+ if(is_pen(I))
+ to_chat(user, "You go to write on [src].. and it goes off in your face!")
+ shoot_gun(user)
+ if(istype(I, /obj/item/ammo_casing/a357))
+ to_chat(user, "You go to load a bullet into [src].. and it goes off in your face!")
+ shoot_gun(user)
+ if(istype(I, /obj/item/ammo_box/a357))
+ to_chat(user, "You go to speedload [src].. and it goes off in your face!")
+ shoot_gun(user)
+ return ..()
+
/*
* Rubber Chainsaw
*/
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 87b2446e321..7797094f851 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -269,6 +269,11 @@
"[src] points [hand_item] at you!")
SEND_SOUND(A, sound('sound/weapons/targeton.ogg'))
return TRUE
+ if(istype(hand_item, /obj/item/toy/russian_revolver/trick_revolver) && A != hand_item)
+ var/obj/item/toy/russian_revolver/trick_revolver/trick = hand_item
+ visible_message("[src] points [trick] at- and [trick] goes off in their hand!")
+ trick.shoot_gun(src)
+
visible_message("[src] points to [pointed_object]")
return TRUE