diff --git a/code/datums/components/crafting/guncrafting.dm b/code/datums/components/crafting/guncrafting.dm index deab5e9b69..7185974d1c 100644 --- a/code/datums/components/crafting/guncrafting.dm +++ b/code/datums/components/crafting/guncrafting.dm @@ -1,6 +1,11 @@ // PARTS // /obj/item/weaponcrafting icon = 'icons/obj/improvised.dmi' +/obj/item/weaponcrafting/receiver + name = "modular receiver" + desc = "A prototype modular receiver and trigger assembly for a firearm." + icon = 'icons/obj/improvised.dmi' + icon_state = "receiver" /obj/item/weaponcrafting/stock name = "rifle stock" @@ -12,41 +17,3 @@ name = "wound thread" desc = "A long piece of thread with some resemblance to cable coil." icon_state = "durastring" - -//////////////////////////////// -// IMPROVISED WEAPON PARTS// -//////////////////////////////// - -/obj/item/weaponcrafting/improvised_parts - name = "Debug Improvised Gun Part" - desc = "A badly coded gun part. You should report coders if you see this." - icon = 'icons/obj/guns/gun_parts.dmi' - icon_state = "palette" - -// RECEIVERS - -/obj/item/weaponcrafting/improvised_parts/rifle_receiver - name = "rifle receiver" - desc = "A crudely constructed receiver to create an improvised bolt-action breechloaded rifle." // removed some text implying that the item had more uses than it does - icon_state = "receiver_rifle" - w_class = WEIGHT_CLASS_SMALL - - -/obj/item/weaponcrafting/improvised_parts/shotgun_receiver - name = "shotgun reciever" - desc = "An improvised receiver to create a break-action breechloaded shotgun." // removed some text implying that the item had more uses than it does - icon_state = "receiver_shotgun" - w_class = WEIGHT_CLASS_SMALL - -// MISC - -/obj/item/weaponcrafting/improvised_parts/trigger_assembly - name = "firearm trigger assembly" - desc = "A modular trigger assembly with a firing pin, this can be used to make a whole bunch of improvised firearss." - icon_state = "trigger_assembly" - w_class = WEIGHT_CLASS_SMALL - -/obj/item/weaponcrafting/improvised_parts/wooden_body - name = "wooden firearm body" - desc = "A crudely fashioned wooden body to help keep higher calibre improvised weapons from blowing themselves apart." - icon_state = "wooden_body" diff --git a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm index 6786f0c0f7..e0e07490f7 100644 --- a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm +++ b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm @@ -298,29 +298,13 @@ name = "Improvised Shotgun" result = /obj/item/gun/ballistic/revolver/doublebarrel/improvised reqs = list(/obj/item/pipe = 2, // putting a large amount of meaningless timegates by forcing people to turn base resources into upgraded resources kinda sucks - /obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 1, - /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1, - /obj/item/weaponcrafting/improvised_parts/wooden_body = 1, - /obj/item/weaponcrafting/stock = 1, - /obj/item/stack/packageWrap = 5) - tools = list(TOOL_SCREWDRIVER) - time = 100 - category = CAT_WEAPONRY - subcategory = CAT_WEAPON - -/datum/crafting_recipe/irifle // larger and less versatile gun, but a bit easier to make - name = "Improvised Rifle (7.62mm)" - result = /obj/item/gun/ballistic/shotgun/boltaction/improvised - reqs = list(/obj/item/pipe = 2, // above - /obj/item/weaponcrafting/improvised_parts/rifle_receiver = 1, - /obj/item/weaponcrafting/improvised_parts/trigger_assembly = 1, - /obj/item/weaponcrafting/improvised_parts/wooden_body = 1, /obj/item/weaponcrafting/stock = 1, /obj/item/stack/packageWrap = 5) tools = list(TOOL_SCREWDRIVER) time = 100 category = CAT_WEAPONRY subcategory = CAT_WEAPON +//the Improvised Rifle will not be missed. Rest in Pieces 2019-2021 ////////////////// ///AMMO CRAFTING// diff --git a/code/game/gamemodes/gangs/gang_items.dm b/code/game/gamemodes/gangs/gang_items.dm index 7d6ecd00f6..1d70a33cd2 100644 --- a/code/game/gamemodes/gangs/gang_items.dm +++ b/code/game/gamemodes/gangs/gang_items.dm @@ -188,7 +188,7 @@ datum/gang_item/clothing/shades //Addition: Why not have cool shades on a gang m name = "Sawn-Off Improvised Shotgun" id = "sawn" cost = 5 - item_path = /obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawn + item_path = /obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawn /datum/gang_item/weapon/ammo/improvised_ammo name = "Box of Buckshot" diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 37b23402f1..2cbd4f21f6 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -273,106 +273,6 @@ return user.visible_message("[user.name]'s soul is captured by \the [src]!", "You've lost the gamble! Your soul is forfeit!") -///////////////////////////// -// DOUBLE BARRELED SHOTGUN // -///////////////////////////// - -/obj/item/gun/ballistic/revolver/doublebarrel - name = "double-barreled shotgun" - desc = "A true classic." - icon_state = "dshotgun" - item_state = "shotgun" - w_class = WEIGHT_CLASS_BULKY - weapon_weight = WEAPON_MEDIUM - force = 10 - flags_1 = CONDUCT_1 - slot_flags = ITEM_SLOT_BACK - mag_type = /obj/item/ammo_box/magazine/internal/shot/dual - sawn_desc = "Omar's coming!" - obj_flags = UNIQUE_RENAME - unique_reskin = list("Default" = "dshotgun", - "Dark Red Finish" = "dshotgun-d", - "Ash" = "dshotgun-f", - "Faded Grey" = "dshotgun-g", - "Maple" = "dshotgun-l", - "Rosewood" = "dshotgun-p" - ) - -/obj/item/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params) - ..() - if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing)) - chamber_round() - 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/revolver/doublebarrel/attack_self(mob/living/user) - var/num_unloaded = 0 - while (get_ammo() > 0) - var/obj/item/ammo_casing/CB - CB = magazine.get_round(0) - chambered = null - CB.forceMove(drop_location()) - CB.update_icon() - num_unloaded++ - if (num_unloaded) - to_chat(user, "You break open \the [src] and unload [num_unloaded] shell\s.") - else - to_chat(user, "[src] is empty!") - -///////////////////////////// -// IMPROVISED SHOTGUN // -///////////////////////////// - -/obj/item/gun/ballistic/revolver/doublebarrel/improvised - name = "improvised shotgun" - desc = "A shoddy break-action breechloaded shotgun. Less ammo-efficient than an actual shotgun, but still packs a punch." - icon_state = "ishotgun" - item_state = "shotgun" - w_class = WEIGHT_CLASS_BULKY - weapon_weight = WEAPON_MEDIUM // prevents shooting 2 at once, but doesn't require 2 hands - force = 10 - slot_flags = null - mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised - sawn_desc = "I'm just here for the gasoline." - unique_reskin = null - var/slung = FALSE - -/obj/item/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params) - ..() - if(istype(A, /obj/item/stack/cable_coil) && !sawn_off) - if(A.use_tool(src, user, 0, 10, skill_gain_mult = EASY_USE_TOOL_MULT)) - slot_flags = ITEM_SLOT_BACK - to_chat(user, "You tie the lengths of cable to the shotgun, making a sling.") - slung = TRUE - update_icon() - else - to_chat(user, "You need at least ten lengths of cable if you want to make a sling!") - -/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_overlays() - . = ..() - if(slung) - . += "[icon_state]sling" - -/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawoff(mob/user) - . = ..() - if(. && slung) //sawing off the gun removes the sling - new /obj/item/stack/cable_coil(get_turf(src), 10) - slung = 0 - update_icon() - -/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawn - name = "sawn-off improvised shotgun" - desc = "The barrel and stock have been sawn and filed down; it can fit in backpacks. You wont want to shoot two of these at once if you value your wrists." - icon_state = "ishotgun" - item_state = "gun" - w_class = WEIGHT_CLASS_NORMAL - sawn_off = TRUE - slot_flags = ITEM_SLOT_BELT - /obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course. clumsy_check = 0 diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 7b3ac36ef6..f3f5155217 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -318,7 +318,105 @@ pump() return TRUE -// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm +///////////////////////////// +// DOUBLE BARRELED SHOTGUN // +///////////////////////////// + +/obj/item/gun/ballistic/shotgun/doublebarrel + name = "double-barreled shotgun" + desc = "A true classic." + icon_state = "dshotgun" + item_state = "shotgun" + w_class = WEIGHT_CLASS_BULKY + weapon_weight = WEAPON_MEDIUM + force = 10 + flags_1 = CONDUCT_1 + slot_flags = ITEM_SLOT_BACK + mag_type = /obj/item/ammo_box/magazine/internal/shot/dual + sawn_desc = "Omar's coming!" + obj_flags = UNIQUE_RENAME + unique_reskin = list("Default" = "dshotgun", + "Dark Red Finish" = "dshotgun-d", + "Ash" = "dshotgun-f", + "Faded Grey" = "dshotgun-g", + "Maple" = "dshotgun-l", + "Rosewood" = "dshotgun-p" + ) + +/obj/item/gun/ballistic/shotgun/doublebarrel/attackby(obj/item/A, mob/user, params) + ..() + if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing)) + chamber_round() + 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/doublebarrel/attack_self(mob/living/user) + var/num_unloaded = 0 + while (get_ammo() > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round(0) + chambered = null + CB.forceMove(drop_location()) + CB.update_icon() + num_unloaded++ + if (num_unloaded) + to_chat(user, "You break open \the [src] and unload [num_unloaded] shell\s.") + else + to_chat(user, "[src] is empty!") + +///////////////////////////// +// IMPROVISED SHOTGUN // +///////////////////////////// + +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised + name = "improvised shotgun" + desc = "A shoddy break-action breechloaded shotgun. Less ammo-efficient than an actual shotgun, but still packs a punch." + icon_state = "ishotgun" + item_state = "shotgun" + w_class = WEIGHT_CLASS_BULKY + weapon_weight = WEAPON_MEDIUM // prevents shooting 2 at once, but doesn't require 2 hands + force = 10 + slot_flags = null + mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised + sawn_desc = "I'm just here for the gasoline." + unique_reskin = null + var/slung = FALSE + +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/attackby(obj/item/A, mob/user, params) + ..() + if(istype(A, /obj/item/stack/cable_coil) && !sawn_off) + if(A.use_tool(src, user, 0, 10, skill_gain_mult = EASY_USE_TOOL_MULT)) + slot_flags = ITEM_SLOT_BACK + to_chat(user, "You tie the lengths of cable to the shotgun, making a sling.") + slung = TRUE + update_icon() + else + to_chat(user, "You need at least ten lengths of cable if you want to make a sling!") + +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/update_overlays() + . = ..() + if(slung) + . += "[icon_state]sling" + +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawoff(mob/user) + . = ..() + if(. && slung) //sawing off the gun removes the sling + new /obj/item/stack/cable_coil(get_turf(src), 10) + slung = 0 + update_icon() + +/obj/item/gun/ballistic/shotgun/doublebarrel/improvised/sawn + name = "sawn-off improvised shotgun" + desc = "The barrel and stock have been sawn and filed down; it can fit in backpacks. You wont want to shoot two of these at once if you value your wrists." + icon_state = "ishotgun" + item_state = "gun" + w_class = WEIGHT_CLASS_NORMAL + sawn_off = TRUE + slot_flags = ITEM_SLOT_BELT /obj/item/gun/ballistic/shotgun/doublebarrel/hook name = "hook modified sawn-off shotgun"