Merge pull request #15202 from Hatterhat/saiga-ballin

CCS stock safety
This commit is contained in:
silicons
2021-09-28 00:12:54 -07:00
committed by GitHub
2 changed files with 15 additions and 7 deletions
@@ -240,7 +240,7 @@
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
name = "warden's combat shotgun"
desc = "A modified version of the semi automatic combat shotgun with a collapsible stock. For close encounters."
desc = "A modified version of the semi-automatic combat shotgun with a collapsible stock and a safety that prevents firing while folded. For close encounters."
icon_state = "cshotgunc"
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
w_class = WEIGHT_CLASS_NORMAL
@@ -250,7 +250,7 @@
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/AltClick(mob/living/user)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)) || item_flags && IN_STORAGE)
return
toggle_stock(user)
return TRUE
@@ -276,6 +276,14 @@
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/update_icon_state()
icon_state = "[current_skin ? unique_reskin[current_skin] : "cshotgun"][stock ? "" : "c"]"
/obj/item/gun/ballistic/shotgun/automatic/combat/compact/afterattack(atom/target, mob/living/user, flag, params)
if(!stock)
shoot_with_empty_chamber(user)
to_chat(user, "<span class='warning'>[src] won't fire with a folded stock!</span>")
else
. = ..()
update_icon()
//Dual Feed Shotgun
/obj/item/gun/ballistic/shotgun/automatic/dual_tube
@@ -1,6 +1,6 @@
/obj/item/gun/magic/staff/motivation
name = "Motivation"
desc = "Rumored to have the ability to open up a portal the depths of Lavaland."
desc = "Rumored to have the ability to open up a portal to the depths of Lavaland."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "motivation"
item_state = "motivation"
@@ -21,15 +21,15 @@
recharge_rate = 5
var/datum/action/judgement_cut/judgementcut = new/datum/action/judgement_cut()
block_parry_data = /datum/block_parry_data/motivation
//to get this to toggle correctly
/obj/item/gun/magic/staff/motivation/Initialize()
. = ..()
judgementcut = new(src)
//lets the user know that their judgment cuts are recharging
//lets the user know that their judgement cuts are recharging
/obj/item/gun/magic/staff/motivation/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='warning'>Judgment Cut is recharging.</span>")
to_chat(user, "<span class='warning'>Judgement Cut is recharging.</span>")
//action button to toggle judgement cuts on/off
/datum/action/judgement_cut
@@ -47,7 +47,7 @@
/obj/item/gun/magic/staff/motivation/can_trigger_gun(mob/living/user)
. = ..()
if(!judgementcut.judgement_toggled)
to_chat(user, "<span class='notice'> Judgment Cut is disabled.</span>")
to_chat(user, "<span class='notice'>Judgement Cut is disabled.</span>")
return FALSE
//adds/removes judgement cut and judgement cut end upon pickup/drop