yeehaw :)

This commit is contained in:
Hatterhat
2021-03-23 18:55:00 -05:00
parent 6bac90f8de
commit 30a9ad5059
7 changed files with 31 additions and 3 deletions

View File

@@ -59,5 +59,5 @@
/obj/item/ammo_box/magazine/internal/shot/levergun
name = "levergun internal magazine"
ammo_type = /obj/item/ammo_casing/c38 // they're rubber by default, i guess
caliber = ".38"
caliber = "38"
max_ammo = 7

View File

@@ -8,6 +8,7 @@
var/obj/item/ammo_box/magazine/magazine
var/casing_ejector = TRUE //whether the gun ejects the chambered casing
var/magazine_wording = "magazine"
var/sawn_item_state = "gun"
/obj/item/gun/ballistic/Initialize()
. = ..()
@@ -198,13 +199,17 @@
name = "sawn-off [src.name]"
desc = sawn_desc
w_class = WEIGHT_CLASS_NORMAL
item_state = "gun"
item_state = sawn_item_state
slot_flags &= ~ITEM_SLOT_BACK //you can't sling it on your back
slot_flags |= ITEM_SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
sawn_off = TRUE
update_icon()
return 1
/// is something supposed to happen here?
/obj/item/gun/ballistic/proc/on_sawoff(mob/user)
return
// Sawing guns related proc
/obj/item/gun/ballistic/proc/blow_up(mob/user)
. = 0

View File

@@ -12,6 +12,7 @@
casing_ejector = FALSE
var/recentpump = 0 // to prevent spammage
weapon_weight = WEAPON_HEAVY
sawn_item_state = "sawedshotgun"
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
. = ..()
@@ -343,4 +344,26 @@
name = "lever-action rifle"
desc = "While lever-actions have been horribly out of date for hundreds of years now, \
the reported potential versatility of .38 Special is worth paying attention to."
fire_sound = "sound/weapons/revolvershot.ogg"
mag_type = /obj/item/ammo_box/magazine/internal/shot/levergun
icon_state = "levercarabine"
item_state = "leveraction"
sawn_item_state = "maresleg"
/obj/item/gun/ballistic/shotgun/leveraction/attackby(obj/item/A, mob/user, params)
..()
if(A.tool_behaviour == TOOL_SAW || istype(A, /obj/item/gun/energy/plasmacutter))
sawoff(user)
if(istype(A, /obj/item/melee/transforming/energy))
var/obj/item/melee/transforming/energy/W = A
if(W.active)
sawoff(user)
/obj/item/gun/ballistic/shotgun/leveraction/on_sawoff(mob/user)
magazine.max_ammo-- // sawing off drops from 7+1 to 6+1
/obj/item/gun/ballistic/shotgun/leveraction/update_icon_state()
if(current_skin)
icon_state = "[unique_reskin[current_skin]][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"
else
icon_state = "[initial(icon_state)][sawn_off ? "-sawn" : ""][chambered ? "" : "-e"]"