From 17d38f81c6e36ca56bf10bccb0cc1248f3f61b2c Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sun, 20 Sep 2015 08:56:11 -0400 Subject: [PATCH 1/2] Adds in Russian Revolvers --- code/game/jobs/job/support.dm | 1 + code/game/objects/items/toys.dm | 61 +++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 87f83439980..b5ad01dd92d 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -29,6 +29,7 @@ H.equip_or_collect(Barpack, slot_r_hand) else H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/toy/russian_revolver(H.back), slot_in_backpack) H.dna.SetSEState(SOBERBLOCK,1) H.mutations += SOBER diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 1a0f5ed4023..49f95875805 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1350,3 +1350,64 @@ obj/item/toy/cards/deck/syndicate/black user << "The string on [src] hasn't rewound all the way!" return +/obj/item/toy/russian_revolver + name = "russian revolver" + desc = "for fun and games!" + icon = 'icons/obj/gun.dmi' + icon_state = "detective_gold" + item_state = "gun" + lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi' + righthand_file = 'icons/mob/inhands/guns_righthand.dmi' + flags = CONDUCT + slot_flags = SLOT_BELT + materials = list(MAT_METAL=2000) + w_class = 3.0 + throwforce = 5 + throw_speed = 4 + throw_range = 5 + force = 5.0 + origin_tech = "combat=1" + attack_verb = list("struck", "hit", "bashed") + var/bullet_position = 1 + var/is_empty = 0 + + +/obj/item/toy/russian_revolver/New() + spin_cylinder() + ..() + + +/obj/item/toy/russian_revolver/attack_self(mob/user) + if(is_empty) + user.visible_message("[user] loads a bullet into the [src]'s cylinder.") + is_empty = 0 + else + spin_cylinder() + user.visible_message("[user] spins the cylinder on the [src]!") + + +/obj/item/toy/russian_revolver/attack(mob/living/carbon/M, mob/user) + if(M != user) //can't use this on other people + return + if(is_empty) + user << "The [src] is empty." + return + user.visible_message("[user] points the [src] at their head, ready to pull the trigger!") + if(do_after(user, 30, target = M)) + if(bullet_position != 1) + user.visible_message("*click*") + playsound(src, 'sound/weapons/empty.ogg', 100, 1) + bullet_position -= 1 + return + if(bullet_position == 1) + is_empty = 1 + playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1) + user.visible_message("The [src] goes off!") + M.apply_damage(200, "brute", "head", used_weapon = "Self-inflicted gunshot would to the head.", sharp=1) + M.death() + else + user.visible_message("[user] lowers the [src] from their head.") + + +/obj/item/toy/russian_revolver/proc/spin_cylinder() + bullet_position = rand(1,6) \ No newline at end of file From 941e83329052c230d3a711683f9d94427f77d9c2 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Sun, 20 Sep 2015 09:13:51 -0400 Subject: [PATCH 2/2] suicide act for the suicide game --- code/game/objects/items/toys.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 49f95875805..29aeace7ea7 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1371,6 +1371,10 @@ obj/item/toy/cards/deck/syndicate/black var/bullet_position = 1 var/is_empty = 0 +/obj/item/toy/russian_revolver/suicide_act(mob/user) + user.visible_message("[user] quickly loads six bullets into the [src.name]'s cylinder and points it at \his head before pulling the trigger! It looks like they are trying to commit suicide.") + playsound(loc, 'sound/weapons/Gunshot.ogg', 50, 1) + return (BRUTELOSS) /obj/item/toy/russian_revolver/New() spin_cylinder()