mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Adds raider gun type, fixes sawn shotgun inhands
Also adds type def to allow spawning sawn shotguns.
This commit is contained in:
@@ -164,3 +164,37 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "silencer"
|
||||
w_class = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/pirate
|
||||
name = "zip gun"
|
||||
desc = "Little more than a barrel, handle, and firing mechanism, makeshift firearms like this are not uncommon in the frontier systems."
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "sawnshotgun"
|
||||
handle_casings = CYCLE_CASINGS //player has to take the old casing out manually before reloading
|
||||
load_method = SINGLE_CASING
|
||||
max_shells = 1 //literally just a barrel
|
||||
|
||||
var/global/list/ammo_types = list(
|
||||
/obj/item/ammo_casing/a357 = ".357",
|
||||
/obj/item/ammo_casing/c9mmf = "9mm",
|
||||
/obj/item/ammo_casing/c45f = ".45",
|
||||
/obj/item/ammo_casing/a12mm = "12mm",
|
||||
/obj/item/ammo_casing/shotgun = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/pellet = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/beanbag = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/stunshell = "12 gauge",
|
||||
/obj/item/ammo_casing/shotgun/flash = "12 gauge",
|
||||
/obj/item/ammo_casing/a762 = "7.62mm",
|
||||
/obj/item/ammo_casing/a556 = "5.56mm",
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/projectile/pirate/New()
|
||||
ammo_type = pick(ammo_types)
|
||||
desc += " Uses [ammo_types[ammo_type]] rounds."
|
||||
|
||||
var/obj/item/ammo_casing/ammo = ammo_type
|
||||
caliber = initial(ammo.caliber)
|
||||
..()
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
|
||||
ammo_type = /obj/item/ammo_casing/shotgun
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
desc = "A true classic."
|
||||
@@ -95,12 +94,22 @@
|
||||
return
|
||||
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "sawnshotgun"
|
||||
w_class = 3
|
||||
item_state = "gun"
|
||||
force = 5
|
||||
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= (SLOT_BELT|SLOT_HOLSTER) //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - or in a holster, why not.
|
||||
name = "sawn-off shotgun"
|
||||
desc = "Omar's coming!"
|
||||
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn
|
||||
name = "sawn-off shotgun"
|
||||
desc = "Omar's coming!"
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "sawnshotgun"
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
w_class = 3
|
||||
force = 5
|
||||
|
||||
Reference in New Issue
Block a user