From efaeba97d8a2c7c0a09deb04c50d3de2517ca072 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sat, 27 Jun 2020 17:42:48 +0200 Subject: [PATCH] Shotgun Powercreep (#9199) You can now pump a shotgun or work a rifle's bolt without wielding it, but it takes two seconds to do so. Using the double-barreled shotgun in-hand now ejects its ammunition instead of changing the firing mode. Changing the firing mode has been put on alt click. --- .../modules/projectiles/guns/projectile/rifle.dm | 1 - .../projectiles/guns/projectile/shotgun.dm | 16 +++++++++++++--- html/changelogs/geeves-shotgun_powercreep.yml | 7 +++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/geeves-shotgun_powercreep.yml diff --git a/code/modules/projectiles/guns/projectile/rifle.dm b/code/modules/projectiles/guns/projectile/rifle.dm index 0488f706f6f..d3467e23501 100644 --- a/code/modules/projectiles/guns/projectile/rifle.dm +++ b/code/modules/projectiles/guns/projectile/rifle.dm @@ -11,7 +11,6 @@ magazine_type = /obj/item/ammo_magazine/boltaction max_shells = 5 - pump_fail_msg = "You cannot work the rifle's bolt without gripping it with both hands!" pump_snd = 'sound/weapons/riflebolt.ogg' has_wield_state = TRUE diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index e039f96425d..f54f1e170af 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -57,7 +57,6 @@ fire_sound = 'sound/weapons/gunshot/gunshot_shotgun2.ogg' is_wieldable = TRUE var/recentpump = 0 // to prevent spammage - var/pump_fail_msg = "You cannot rack the shotgun without gripping it with both hands!" var/pump_snd = 'sound/weapons/shotgunpump.ogg' var/has_wield_state = TRUE @@ -73,10 +72,11 @@ /obj/item/gun/projectile/shotgun/pump/proc/pump(mob/M) if(!wielded) - to_chat(M, pump_fail_msg) - return + if(!do_after(M, 20, TRUE)) // have to stand still for 2 seconds instead of doing it instantly. bad idea during a shootout + return playsound(M, pump_snd, 60, 1) + to_chat(M, SPAN_NOTICE("You rack \the [src]!")) if(chambered)//We have a shell in the chamber chambered.forceMove(get_turf(src)) //Eject casing @@ -120,6 +120,7 @@ /obj/item/gun/projectile/shotgun/doublebarrel name = "double-barreled shotgun" desc = "A true classic." + desc_info = "Use in hand to unload, alt click to change firemodes." icon = 'icons/obj/guns/dshotgun.dmi' icon_state = "dshotgun" item_state = "dshotgun" @@ -148,6 +149,15 @@ can_sawoff = TRUE sawnoff_workmsg = "shorten the barrel" +/obj/item/gun/projectile/shotgun/doublebarrel/attack_self(mob/user) + unload_ammo(user, TRUE) + +/obj/item/gun/projectile/shotgun/doublebarrel/AltClick(mob/user) + if(Adjacent(user)) + var/datum/firemode/new_mode = switch_firemodes(user) + if(new_mode) + to_chat(user, SPAN_NOTICE("\The [src] is now set to [new_mode.name].")) + /obj/item/gun/projectile/shotgun/doublebarrel/update_icon() ..() if(wielded && has_wield_state) diff --git a/html/changelogs/geeves-shotgun_powercreep.yml b/html/changelogs/geeves-shotgun_powercreep.yml new file mode 100644 index 00000000000..f5f8d24abc5 --- /dev/null +++ b/html/changelogs/geeves-shotgun_powercreep.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - rscadd: "You can now pump a shotgun or work a rifle's bolt without wielding it, but it takes two seconds to do so." + - tweak: "Using the double-barreled shotgun in-hand now ejects its ammunition instead of changing the firing mode. Changing the firing mode has been put on alt click." \ No newline at end of file