diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 8dac27915c4..401410e2040 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -63,8 +63,6 @@ var/global/list/autolathe_recipes_hidden = list( \ new /obj/item/ammo_casing/shotgun/buckshot(), \ new /obj/item/ammo_casing/shotgun/dart(), \ new /obj/item/ammo_casing/shotgun/incendiary(), \ - new /obj/item/ishotgunreciever(), \ - new /obj/item/ishotgunbarrel(), \ /* new /obj/item/weapon/shield/riot(), */ \ ) diff --git a/code/modules/projectiles/guns/projectile/crafting.dm b/code/modules/projectiles/guns/projectile/crafting.dm new file mode 100644 index 00000000000..06985516e03 --- /dev/null +++ b/code/modules/projectiles/guns/projectile/crafting.dm @@ -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 << "You screw the pins into place, securing the pipe to the reciever." + 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 << "You tie the wrapping paper around the stock and the barrel to secure it." + qdel(src) + else + user << "You need at least five feet of wrapping paper to secure the stock." + return + diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index af3dced735a..60b5aa7394e 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -140,85 +140,3 @@ else user << "You need at least ten lengths of cable if you want to make a sling." 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 << "You screw the pins into place, attaching the ." - 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 << "You tie the wrapping paper around the stock and the barrel to secure it." - qdel(src) - else - user << "You need at least five feet of wrapping paper to secure the grip." - return - diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index a1a4d361ccb..c585150a334 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -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." diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index b825f455d83..5569606930c 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ diff --git a/icons/obj/improvised.dmi b/icons/obj/improvised.dmi index a48efdf2447..33e2c39ad75 100644 Binary files a/icons/obj/improvised.dmi and b/icons/obj/improvised.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 03fce853a7c..1b2f157d63b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1202,6 +1202,7 @@ #include "code\modules\projectiles\guns\magic\staff.dm" #include "code\modules\projectiles\guns\magic\wand.dm" #include "code\modules\projectiles\guns\projectile\automatic.dm" +#include "code\modules\projectiles\guns\projectile\crafting.dm" #include "code\modules\projectiles\guns\projectile\pistol.dm" #include "code\modules\projectiles\guns\projectile\revolver.dm" #include "code\modules\projectiles\guns\projectile\shotgun.dm"