Merge pull request #8942 from jakeramsay007/WardenShotgun

Changes the Warden's shotgun to instead be foldable, with greatly increased penalties for being folded.
This commit is contained in:
kevinz000
2019-08-03 00:48:59 -07:00
committed by GitHub
2 changed files with 34 additions and 6 deletions
@@ -212,14 +212,41 @@
)
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
name = "compact combat shotgun"
desc = "A compact version of the semi automatic combat shotgun. For close encounters."
name = "warden's combat shotgun"
desc = "A modified version of the semi automatic combat shotgun with a collapsible stock. For close encounters."
icon_state = "cshotgunc"
mag_type = /obj/item/ammo_box/magazine/internal/shot/com/compact
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
w_class = WEIGHT_CLASS_NORMAL
unique_reskin = list("Tatical" = "cshotgunc",
"Slick" = "cshotgunc_slick"
)
var/stock = FALSE
recoil = 5
spread = 2
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/AltClick(mob/living/user)
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return
toggle_stock(user)
. = ..()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to toggle the stock.</span>")
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/proc/toggle_stock(mob/living/user)
stock = !stock
if(stock)
w_class = WEIGHT_CLASS_HUGE
to_chat(user, "You unfold the stock.")
recoil = 1
spread = 0
else
w_class = WEIGHT_CLASS_NORMAL
to_chat(user, "You fold the stock.")
recoil = 5
spread = 2
update_icon()
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon()
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
//Dual Feed Shotgun
@@ -235,6 +262,7 @@
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to pump it.</span>")
. = ..()
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
. = ..()