mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Merge pull request #5277 from paprka/newshotguns
Adds improvised shotguns and fixes paths for wrap paper
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
// This file is for projectile weapon crafting. All parts and construction paths will be contained here.
|
||||
// The weapons themselves are children of other weapons and should be contained in their respective files.
|
||||
|
||||
// PARTS //
|
||||
|
||||
/obj/item/weaponcrafting/reciever
|
||||
name = "modular reciever"
|
||||
desc = "A prototype modular reciever and trigger assembly for a firearm."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "reciever"
|
||||
|
||||
/obj/item/weaponcrafting/stock
|
||||
name = "rifle stock"
|
||||
desc = "A classic rifle stock that doubles as a grip, roughly carved out of wood."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "riflestock"
|
||||
|
||||
|
||||
// CRAFTING //
|
||||
|
||||
/obj/item/weaponcrafting/reciever/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/pipe))
|
||||
user << "You attach the shotgun barrel to the reciever. The pins seem loose."
|
||||
var/obj/item/weaponcrafting/ishotgunconstruction/I = new /obj/item/weaponcrafting/ishotgunconstruction
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
return
|
||||
|
||||
// SHOTGUN //
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction
|
||||
name = "slightly conspicuous metal construction"
|
||||
desc = "A long pipe attached to a firearm reciever. The pins seem loose."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunstep1"
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
var/obj/item/weaponcrafting/ishotgunconstruction2/C = new /obj/item/weaponcrafting/ishotgunconstruction2
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(C)
|
||||
user << "<span class='notice'>You screw the pins into place, securing the pipe to the reciever.</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction2
|
||||
name = "very conspicuous metal construction"
|
||||
desc = "A long pipe attached to a trigger assembly."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunstep1"
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction2/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weaponcrafting/stock))
|
||||
user << "You attach the stock to the reciever-barrel assembly."
|
||||
var/obj/item/weaponcrafting/ishotgunconstruction3/I = new /obj/item/weaponcrafting/ishotgunconstruction3
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction3
|
||||
name = "extremely conspicuous metal construction"
|
||||
desc = "A reciever-barrel shotgun assembly with a loose wooden stock. There's no way you can fire it without the stock coming loose."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunstep2"
|
||||
|
||||
/obj/item/weaponcrafting/ishotgunconstruction3/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/packageWrap))
|
||||
var/obj/item/stack/packageWrap/C = I
|
||||
if (C.use(5))
|
||||
var/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/W = new /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(W)
|
||||
user << "<span class='notice'>You tie the wrapping paper around the stock and the barrel to secure it.</span>"
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>You need at least five feet of wrapping paper to secure the stock.</span>"
|
||||
return
|
||||
|
||||
@@ -115,4 +115,14 @@
|
||||
reqs = list(/obj/item/ammo_casing/shotgun/techshell = 1,
|
||||
/datum/reagent/phosphorus = 5,)
|
||||
tools = list(/obj/item/weapon/screwdriver)
|
||||
time = 5
|
||||
time = 5
|
||||
|
||||
/datum/table_recipe/ishotgun
|
||||
name = "Improvised Shotgun"
|
||||
result = /obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
|
||||
reqs = list(/obj/item/weaponcrafting/reciever = 1,
|
||||
/obj/item/pipe = 1,
|
||||
/obj/item/weaponcrafting/stock = 1,
|
||||
/obj/item/stack/packageWrap = 5,)
|
||||
tools = list(/obj/item/weapon/screwdriver)
|
||||
time = 200
|
||||
@@ -70,6 +70,16 @@
|
||||
m_amt = 250
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/improvised
|
||||
name = "improvised shell"
|
||||
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
|
||||
icon_state = "gshell"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/weak
|
||||
m_amt = 250
|
||||
pellets = 5
|
||||
variance = 0.8
|
||||
|
||||
|
||||
/obj/item/ammo_casing/shotgun/stunslug
|
||||
name = "taser slug"
|
||||
desc = "A stunning taser slug."
|
||||
|
||||
@@ -59,6 +59,14 @@
|
||||
max_ammo = 2
|
||||
multiload = 0
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/cylinder/improvised
|
||||
name = "improvised shotgun internal magazine"
|
||||
desc = "This doesn't even exist"
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/improvised
|
||||
caliber = "shotgun"
|
||||
max_ammo = 1
|
||||
multiload = 0
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/shotriot
|
||||
name = "riot shotgun internal magazine"
|
||||
desc = "Oh god, this shouldn't be here"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/clumsy_check = 1
|
||||
var/obj/item/ammo_casing/chambered = null
|
||||
var/trigger_guard = 1
|
||||
var/sawn_desc = null
|
||||
|
||||
/obj/item/weapon/gun/proc/process_chamber()
|
||||
return 0
|
||||
|
||||
@@ -62,9 +62,15 @@
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot //for spawn in the armory
|
||||
name = "riot shotgun"
|
||||
desc = "A sturdy shotgun designed for non-lethal riot control."
|
||||
desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control."
|
||||
icon_state = "riotshotgun"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shotriot
|
||||
sawn_desc = "Come with me if you want to live."
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
@@ -77,28 +83,32 @@
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "combat=3;materials=1"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
||||
sawn_desc = "Omar's coming!"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
..()
|
||||
if (istype(A,/obj/item/ammo_box) || istype(A,/obj/item/ammo_casing))
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
|
||||
user << "<span class='notice'>You begin to shorten the barrel of \the [src].</span>"
|
||||
if(get_ammo())
|
||||
afterattack(user, user) //will this work?
|
||||
afterattack(user, user) //it will. we call it twice, for twice the FUN
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("<span class='danger'>The shotgun goes off!</span>", "<span class='danger'>The shotgun goes off in your face!</span>")
|
||||
return
|
||||
if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY
|
||||
icon_state = "sawnshotgun"
|
||||
w_class = 3.0
|
||||
item_state = "gun"
|
||||
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
|
||||
name = "sawn-off shotgun"
|
||||
desc = "Omar's coming!"
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/weapon/gun/projectile/proc/sawoff(mob/user as mob)
|
||||
user << "<span class='notice'>You begin to shorten \the [src].</span>"
|
||||
if(get_ammo())
|
||||
afterattack(user, user)
|
||||
user.visible_message("<span class='danger'>The [src] goes off!</span>", "<span class='danger'>The [src] goes off in your face!</span>")
|
||||
return
|
||||
if(do_after(user, 30))
|
||||
name = "sawn-off [src.name]"
|
||||
desc = sawn_desc
|
||||
icon_state = initial(icon_state) + "-sawn"
|
||||
w_class = 3.0
|
||||
item_state = "gun"
|
||||
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
user << "<span class='warning'>You shorten \the [src]!</span>"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user as mob)
|
||||
var/num_unloaded = 0
|
||||
@@ -112,4 +122,32 @@
|
||||
if (num_unloaded)
|
||||
user << "<span class = 'notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>"
|
||||
else
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
user << "<span class='notice'>[src] is empty.</span>"
|
||||
|
||||
|
||||
// IMPROVISED SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
|
||||
name = "improvised shotgun"
|
||||
desc = "Essentially a tube that aims shotgun shells."
|
||||
icon_state = "ishotgun"
|
||||
item_state = "shotgun"
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
origin_tech = "combat=2;materials=2"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/improvised
|
||||
sawn_desc = "I'm just here for the gasoline."
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = A
|
||||
if(C.use(10))
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
icon_state = "ishotgunsling"
|
||||
user << "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>"
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
|
||||
return
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
name = "pellet"
|
||||
damage = 15
|
||||
|
||||
/obj/item/projectile/bullet/pellet/weak
|
||||
damage = 3
|
||||
|
||||
/obj/item/projectile/bullet/midbullet
|
||||
damage = 20
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
user.visible_message("<span class='notice'>[user] labels [src] as [str].</span>")
|
||||
name = "[name] ([str])"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrapping_paper))
|
||||
else if(istype(W, /obj/item/stack/wrapping_paper))
|
||||
user.visible_message("<span class='notice'>[user] wraps the package in festive paper!</span>")
|
||||
if(istype(wrapped, /obj/structure/closet/crate))
|
||||
icon_state = "giftcrate"
|
||||
@@ -87,21 +87,21 @@
|
||||
user.visible_message("<span class='notice'>[user] labels [src] as [str].</span>")
|
||||
name = "[name] ([str])"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrapping_paper))
|
||||
else if(istype(W, /obj/item/stack/wrapping_paper))
|
||||
icon_state = "giftcrate[wrapped.w_class]"
|
||||
user.visible_message("<span class='notice'>[user] wraps the package in festive paper!</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/packageWrap
|
||||
/obj/item/stack/packageWrap
|
||||
name = "package wrapper"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
flags = NOBLUDGEON
|
||||
w_class = 3.0
|
||||
var/amount = 25.0
|
||||
amount = 25
|
||||
|
||||
|
||||
/obj/item/weapon/packageWrap/afterattack(var/obj/target as obj, mob/user as mob, proximity)
|
||||
/obj/item/stack/packageWrap/afterattack(var/obj/target as obj, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(!istype(target)) //this really shouldn't be necessary (but it is). -Pete
|
||||
return
|
||||
@@ -161,11 +161,6 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/packageWrap/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>There are [amount] units of package wrap left.</span>"
|
||||
|
||||
|
||||
/obj/item/device/destTagger
|
||||
name = "destination tagger"
|
||||
desc = "Used to set the destination of properly wrapped packages."
|
||||
|
||||
@@ -141,6 +141,15 @@ datum/design/ionrifle
|
||||
build_path = /obj/item/weapon/gun/energy/ionrifle
|
||||
locked = 1
|
||||
|
||||
datum/design/reciever
|
||||
name = "Modular Reciever"
|
||||
desc = "A prototype modular reciever and trigger assembly for a variety of firearms."
|
||||
id = "reciever"
|
||||
req_tech = list("combat" = 5, "materials" = 4)
|
||||
build_type = PROTOLATHE
|
||||
materials = list("$metal" = 6500, "$silver" = 500)
|
||||
build_path = /obj/item/weaponcrafting/reciever
|
||||
|
||||
datum/design/ammo_9mm
|
||||
name = "Ammunition Box (9mm)"
|
||||
desc = "A box of prototype 9mm ammunition."
|
||||
|
||||
Reference in New Issue
Block a user