mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
converted most gun crafting to its own module
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/machinery/atmospherics/pipe/simple))
|
||||
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
|
||||
|
||||
@@ -140,85 +140,3 @@
|
||||
else
|
||||
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
|
||||
return
|
||||
|
||||
/obj/item/ishotgunreciever
|
||||
name = "firearm reciever"
|
||||
desc = "An improvised trigger assembly for a firearm."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunreciever"
|
||||
m_amt = 200000 //You need to upgrade the autolathe to make either of these
|
||||
|
||||
/obj/item/ishotgunbarrel
|
||||
name = "shotgun barrel"
|
||||
desc = "A long metal slug barrel, with threading and pin holes that are only compatible with specific weapon recievers."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunbarrel"
|
||||
m_amt = 200000
|
||||
|
||||
/obj/item/ishotgunstock
|
||||
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 = "ishotgunstock"
|
||||
|
||||
/obj/item/ishotgunreciever/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/ishotgunbarrel))
|
||||
user << "You attach the shotgun barrel to the reciever. The pins seem loose."
|
||||
var/obj/item/ishotgunconstruction/I = new /obj/item/ishotgunconstruction
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/ishotgunconstruction
|
||||
name = "slightly conspicuous metal construction"
|
||||
desc = "A long shotgun barrel attached to a trigger assembly."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunstep1"
|
||||
|
||||
/obj/item/ishotgunconstruction/attackby(var/obj/item/I, mob/user as mob)
|
||||
..()
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
var/obj/item/ishotgunconstruction2/C = new /obj/item/ishotgunconstruction2
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(C)
|
||||
user << "<span class='notice'>You screw the pins into place, attaching the .</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ishotgunconstruction2
|
||||
name = "very conspicuous metal construction"
|
||||
desc = "A long shotgun barrel attached to a trigger assembly."
|
||||
icon = 'icons/obj/improvised.dmi'
|
||||
icon_state = "ishotgunstep1"
|
||||
|
||||
/obj/item/ishotgunconstruction2/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/ishotgunstock))
|
||||
user << "You attach the stock to the reciever-barrel assembly."
|
||||
var/obj/item/ishotgunconstruction3/I = new /obj/item/ishotgunconstruction3
|
||||
user.unEquip(src)
|
||||
user.put_in_hands(I)
|
||||
del(W)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/item/ishotgunconstruction3
|
||||
name = "extremely conspicuous metal construction"
|
||||
desc = "A reicever-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/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 grip.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -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