diff --git a/code/datums/ASRS.dm b/code/datums/ASRS.dm index 86a7363f07ea..677e19eae938 100644 --- a/code/datums/ASRS.dm +++ b/code/datums/ASRS.dm @@ -78,9 +78,16 @@ group = "ASRS" cost = ASRS_VERY_LOW_WEIGHT -/datum/supply_packs/ammo_smartgun/asrs - buyable = 0 - group = "ASRS" +/datum/supply_packs_asrs/ammo_shell_box_breaching + reference_package = /datum/supply_packs/ammo_shell_box_breaching + cost = ASRS_VERY_LOW_WEIGHT + +/datum/supply_packs_asrs/ammo_xm51 + reference_package = /datum/supply_packs/ammo_xm51 + cost = ASRS_VERY_LOW_WEIGHT + +/datum/supply_packs_asrs/ammo_smartgun + reference_package = /datum/supply_packs/ammo_smartgun /datum/supply_packs/ammo_napalm/asrs buyable = 0 diff --git a/code/datums/ammo/bullet/shotgun.dm b/code/datums/ammo/bullet/shotgun.dm index e254821aea98..5cb6ea9ea527 100644 --- a/code/datums/ammo/bullet/shotgun.dm +++ b/code/datums/ammo/bullet/shotgun.dm @@ -327,6 +327,32 @@ penetration = ARMOR_PENETRATION_TIER_10 scatter = SCATTER_AMOUNT_TIER_4 +/* + 16 GAUGE SHOTGUN AMMO +*/ + +/datum/ammo/bullet/shotgun/light/breaching + name = "light breaching shell" + icon_state = "flechette" + handful_state = "breaching_shell" + multiple_handful_name = TRUE + bonus_projectiles_type = /datum/ammo/bullet/shotgun/light/breaching/spread + + accuracy_var_low = PROJECTILE_VARIANCE_TIER_6 + accuracy_var_high = PROJECTILE_VARIANCE_TIER_6 + damage = 55 + max_range = 5 + bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_3 + penetration = ARMOR_PENETRATION_TIER_1 + +/datum/ammo/bullet/shotgun/light/breaching/spread + name = "additional light breaching fragments" + bonus_projectiles_amount = 0 + accuracy_var_low = PROJECTILE_VARIANCE_TIER_6 + accuracy_var_high = PROJECTILE_VARIANCE_TIER_6 + scatter = SCATTER_AMOUNT_TIER_3 + damage = 10 + //Enormous shell for Van Bandolier's superheavy double-barreled hunting gun. /datum/ammo/bullet/shotgun/twobore name = "two bore bullet" diff --git a/code/datums/elements/bullet_trait/damage_boost.dm b/code/datums/elements/bullet_trait/damage_boost.dm index a0370f2d36b6..eee4a8e80f4b 100644 --- a/code/datums/elements/bullet_trait/damage_boost.dm +++ b/code/datums/elements/bullet_trait/damage_boost.dm @@ -1,5 +1,7 @@ GLOBAL_LIST_INIT(damage_boost_turfs, typecacheof(/turf)) +GLOBAL_LIST_INIT(damage_boost_turfs_xeno, typecacheof(/turf/closed/wall/resin)) + GLOBAL_LIST_INIT(damage_boost_breaching, typecacheof(list( /obj/structure/machinery/door, /obj/structure/mineral_door, diff --git a/code/datums/supply_packs/ammo.dm b/code/datums/supply_packs/ammo.dm index 164511c25cc0..326ca075a343 100644 --- a/code/datums/supply_packs/ammo.dm +++ b/code/datums/supply_packs/ammo.dm @@ -240,6 +240,16 @@ containername = "\improper shotgun flechette crate" group = "Ammo" +/datum/supply_packs/ammo_shell_box_breaching + name = "Shell box (16g) (120x breaching shells)" + contains = list( + /obj/item/ammo_box/magazine/shotgun/light/breaching, + ) + cost = 40 + containertype = /obj/structure/closet/crate/ammo + containername = "\improper shotgun breaching crate" + group = "Ammo" + //------------------------For 88M4 ---------------- /datum/supply_packs/ammo_mod88_mag_box_ap @@ -296,6 +306,18 @@ containername = "\improper M41AE2 HPR holo-target magazines crate" group = "Ammo" +/datum/supply_packs/ammo_xm51 + contains = list( + /obj/item/ammo_magazine/rifle/xm51, + /obj/item/ammo_magazine/rifle/xm51, + /obj/item/ammo_magazine/shotgun/light/breaching, + ) + name = "XM51 Ammo (2x mags) (1x small breaching shell box)" + cost = 20 + containertype = /obj/structure/closet/crate/ammo + containername = "\improper XM51 ammo crate" + group = "Ammo" + //------------------------Smartgunner stuff---------------- /datum/supply_packs/ammo_smartgun_battery_pack diff --git a/code/datums/supply_packs/weapons.dm b/code/datums/supply_packs/weapons.dm index 927db853e9fd..8939b80e52d6 100644 --- a/code/datums/supply_packs/weapons.dm +++ b/code/datums/supply_packs/weapons.dm @@ -60,7 +60,18 @@ ) cost = 30 containertype = /obj/structure/closet/crate/weapon - containername = "MOU-53 Breack Action Shotgun Crate" + containername = "MOU-53 Break Action Shotgun Crate" + group = "Weapons" + +/datum/supply_packs/xm51 + name = "XM51 Breaching Scattergun Crate (x2)" + contains = list( + /obj/item/storage/box/guncase/xm51, + /obj/item/storage/box/guncase/xm51, + ) + cost = 30 + containertype = /obj/structure/closet/crate/weapon + containername = "XM51 Breaching Scattergun Crate" group = "Weapons" /datum/supply_packs/smartpistol diff --git a/code/game/machinery/vending/vendor_types/requisitions.dm b/code/game/machinery/vending/vendor_types/requisitions.dm index 3591a7caecfc..74d4e076d89d 100644 --- a/code/game/machinery/vending/vendor_types/requisitions.dm +++ b/code/game/machinery/vending/vendor_types/requisitions.dm @@ -46,6 +46,7 @@ list("M2C Heavy Machine Gun", round(scale * 2), /obj/item/storage/box/guncase/m2c, VENDOR_ITEM_REGULAR), list("M240 Incinerator Unit", round(scale * 2), /obj/item/storage/box/guncase/flamer, VENDOR_ITEM_REGULAR), list("M79 Grenade Launcher", round(scale * 3), /obj/item/storage/box/guncase/m79, VENDOR_ITEM_REGULAR), + list("XM51 Breaching Scattergun", round(scale * 3), /obj/item/storage/box/guncase/xm51, VENDOR_ITEM_REGULAR), list("EXPLOSIVES", -1, null, null), list("M15 Fragmentation Grenade", round(scale * 2), /obj/item/explosive/grenade/high_explosive/m15, VENDOR_ITEM_REGULAR), @@ -253,11 +254,13 @@ list("M41A MK1 AP Magazine (10x24mm)", round(scale * 2), /obj/item/ammo_magazine/rifle/m41aMK1/ap, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), + list("XM51 Magazine (16g)", round(scale * 3), /obj/item/ammo_magazine/rifle/xm51, VENDOR_ITEM_REGULAR), list("SHOTGUN SHELL BOXES", -1, null, null), list("Shotgun Shell Box (Buckshot x 100)", round(scale * 2), /obj/item/ammo_box/magazine/shotgun/buckshot, VENDOR_ITEM_REGULAR), list("Shotgun Shell Box (Flechette x 100)", round(scale * 2), /obj/item/ammo_box/magazine/shotgun/flechette, VENDOR_ITEM_REGULAR), list("Shotgun Shell Box (Slugs x 100)", round(scale * 2), /obj/item/ammo_box/magazine/shotgun, VENDOR_ITEM_REGULAR), + list("Shotgun Shell Box (16g) (Breaching x 120)", 1, /obj/item/ammo_box/magazine/shotgun/light/breaching, VENDOR_ITEM_REGULAR), ) /obj/structure/machinery/cm_vending/sorted/cargo_ammo/stock(obj/item/item_to_stock, mob/user) diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index 4868775c2bf9..1935c9cd3ab1 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -228,6 +228,7 @@ list("M240 Incinerator Tank", round(scale * 3), /obj/item/ammo_magazine/flamer_tank, VENDOR_ITEM_REGULAR), list("M56D Drum Magazine", round(scale * 2), /obj/item/ammo_magazine/m56d, VENDOR_ITEM_REGULAR), list("M2C Box Magazine", round(scale * 2), /obj/item/ammo_magazine/m2c, VENDOR_ITEM_REGULAR), + list("Box of Breaching Shells (16g)", round(scale * 2), /obj/item/ammo_magazine/shotgun/light/breaching, VENDOR_ITEM_REGULAR), list("HIRR Baton Slugs", round(scale * 6), /obj/item/explosive/grenade/slug/baton, VENDOR_ITEM_REGULAR), list("M74 AGM-S Star Shell", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/starshell, VENDOR_ITEM_REGULAR), list("M74 AGM-S Hornet Shell", round(scale * 4), /obj/item/explosive/grenade/high_explosive/airburst/hornet_shell, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 07345dcdc09f..e3fe12afd743 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -256,11 +256,30 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \ new/datum/stack_recipe("empty magazine box (M41A Incen)", /obj/item/ammo_box/magazine/incen/empty), \ new/datum/stack_recipe("empty magazine box (M41A LE)", /obj/item/ammo_box/magazine/le/empty), \ null, \ + new/datum/stack_recipe("empty magazine box (XM51)", /obj/item/ammo_box/magazine/xm51/empty), \ + null, \ + new/datum/stack_recipe("empty magazine box (M41A MK1)", /obj/item/ammo_box/magazine/mk1/empty), \ + new/datum/stack_recipe("empty magazine box (M41A MK1 AP)", /obj/item/ammo_box/magazine/mk1/ap/empty), \ + null, \ + new/datum/stack_recipe("empty drum box (M56B)", /obj/item/ammo_box/magazine/m56b/empty), \ + new/datum/stack_recipe("empty drum box (M56B Irradiated)", /obj/item/ammo_box/magazine/m56b/dirty/empty), \ + new/datum/stack_recipe("empty drum box (M56D)", /obj/item/ammo_box/magazine/m56d/empty), \ + null, \ + new/datum/stack_recipe("empty drum box (M2C)", /obj/item/ammo_box/magazine/m2c/empty), \ + null, \ + new/datum/stack_recipe("empty magazine box (M41AE2)", /obj/item/ammo_box/magazine/m41ae2/empty), \ + new/datum/stack_recipe("empty magazine box (M41AE2 Holo-Target)", /obj/item/ammo_box/magazine/m41ae2/holo/empty), \ + new/datum/stack_recipe("empty magazine box (M41AE2 HEAP)", /obj/item/ammo_box/magazine/m41ae2/heap/empty), \ + null, \ + new/datum/stack_recipe("empty flamer tank box (UT-Napthal)", /obj/item/ammo_box/magazine/flamer/empty), \ + new/datum/stack_recipe("empty flamer tank box (Napalm B-Gel)", /obj/item/ammo_box/magazine/flamer/bgel/empty), \ + null, \ new/datum/stack_recipe("empty shotgun shell box (Beanbag)", /obj/item/ammo_box/magazine/shotgun/beanbag/empty), \ new/datum/stack_recipe("empty shotgun shell box (Buckshot)", /obj/item/ammo_box/magazine/shotgun/buckshot/empty), \ new/datum/stack_recipe("empty shotgun shell box (Flechette)", /obj/item/ammo_box/magazine/shotgun/flechette/empty), \ new/datum/stack_recipe("empty shotgun shell box (Incendiary)", /obj/item/ammo_box/magazine/shotgun/incendiary/empty), \ new/datum/stack_recipe("empty shotgun shell box (Slugs)", /obj/item/ammo_box/magazine/shotgun/empty), \ + new/datum/stack_recipe("empty shotgun shell box (16g) (Breaching)", /obj/item/ammo_box/magazine/shotgun/light/breaching/empty), \ null, \ new/datum/stack_recipe("empty 45-70 bullets box", /obj/item/ammo_box/magazine/lever_action/empty), \ new/datum/stack_recipe("empty 45-70 bullets box (Blanks)", /obj/item/ammo_box/magazine/lever_action/training/empty), \ diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 1e6d0d979967..b72252f5429a 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -902,6 +902,7 @@ var/drawSound = 'sound/weapons/gun_pistol_draw.ogg' ///Used to get flap overlay states as inserting a gun changes icon state. var/base_icon + var/gun_has_gamemode_skin can_hold = list( /obj/item/weapon/gun/pistol, /obj/item/ammo_magazine/pistol, @@ -965,6 +966,14 @@ */ playsound(src, drawSound, 7, TRUE) var/image/gun_underlay = image(icon, current_gun.base_gun_icon) + if(gun_has_gamemode_skin) + switch(SSmapping.configs[GROUND_MAP].camouflage_type) + if("snow") + gun_underlay = image(icon, "s_" + current_gun.base_gun_icon) + if("desert") + gun_underlay = image(icon, "d_" + current_gun.base_gun_icon) + if("classic") + gun_underlay = image(icon, "c_" + current_gun.base_gun_icon) gun_underlay.pixel_x = holster_slots[slot]["icon_x"] gun_underlay.pixel_y = holster_slots[slot]["icon_y"] gun_underlay.color = current_gun.color @@ -1185,6 +1194,60 @@ "icon_x" = -11, "icon_y" = -5)) +#define MAXIMUM_MAGAZINE_COUNT 2 + +/obj/item/storage/belt/gun/xm51 + name = "\improper M276 pattern XM51 holster rig" + desc = "The M276 is the standard load-bearing equipment of the USCM. It consists of a modular belt with various clips. This version is for the XM51 breaching scattergun, allowing easier storage of the weapon. It features pouches for storing two magazines along with extra shells." + icon_state = "xm51_holster" + has_gamemode_skin = TRUE + gun_has_gamemode_skin = TRUE + storage_slots = 8 + max_w_class = 5 + can_hold = list( + /obj/item/weapon/gun/rifle/xm51, + /obj/item/ammo_magazine/rifle/xm51, + /obj/item/ammo_magazine/handful, + ) + holster_slots = list( + "1" = list( + "icon_x" = 10, + "icon_y" = -1)) + + //Keep a track of how many magazines are inside the belt. + var/magazines = 0 + +/obj/item/storage/belt/gun/xm51/attackby(obj/item/item, mob/user) + if(istype(item, /obj/item/ammo_magazine/shotgun/light/breaching)) + var/obj/item/ammo_magazine/shotgun/light/breaching/ammo_box = item + dump_ammo_to(ammo_box, user, ammo_box.transfer_handful_amount) + else + return ..() + +/obj/item/storage/belt/gun/xm51/can_be_inserted(obj/item/item, mob/user, stop_messages = FALSE) + . = ..() + if(magazines >= MAXIMUM_MAGAZINE_COUNT && istype(item, /obj/item/ammo_magazine/rifle/xm51)) + if(!stop_messages) + to_chat(usr, SPAN_WARNING("[src] can't hold any more magazines.")) + return FALSE + +/obj/item/storage/belt/gun/xm51/handle_item_insertion(obj/item/item, prevent_warning = FALSE, mob/user) + . = ..() + if(istype(item, /obj/item/ammo_magazine/rifle/xm51)) + magazines++ + +/obj/item/storage/belt/gun/xm51/remove_from_storage(obj/item/item as obj, atom/new_location) + . = ..() + if(istype(item, /obj/item/ammo_magazine/rifle/xm51)) + magazines-- + +//If a magazine disintegrates due to acid or something else while in the belt, remove it from the count. +/obj/item/storage/belt/gun/xm51/on_stored_atom_del(atom/movable/item) + if(istype(item, /obj/item/ammo_magazine/rifle/xm51)) + magazines-- + +#undef MAXIMUM_MAGAZINE_COUNT + /obj/item/storage/belt/gun/m44 name = "\improper M276 pattern M44 holster rig" desc = "The M276 is the standard load-bearing equipment of the USCM. It consists of a modular belt with various clips. This version is for the M44 magnum revolver, along with six small pouches for speedloaders. It smells faintly of hay." diff --git a/code/modules/clothing/suits/marine_armor.dm b/code/modules/clothing/suits/marine_armor.dm index e902116d56c4..e0bc38b2d3ad 100644 --- a/code/modules/clothing/suits/marine_armor.dm +++ b/code/modules/clothing/suits/marine_armor.dm @@ -78,6 +78,7 @@ /obj/item/device/motiondetector, /obj/item/device/walkman, /obj/item/storage/belt/gun/m39, + /obj/item/storage/belt/gun/xm51, ) valid_accessory_slots = list(ACCESSORY_SLOT_MEDAL, ACCESSORY_SLOT_PONCHO) diff --git a/code/modules/cm_marines/equipment/guncases.dm b/code/modules/cm_marines/equipment/guncases.dm index 8ab83116f605..8f0b13a2bd93 100644 --- a/code/modules/cm_marines/equipment/guncases.dm +++ b/code/modules/cm_marines/equipment/guncases.dm @@ -348,6 +348,21 @@ new /obj/item/device/vulture_spotter_scope/skillless(src, WEAKREF(rifle)) new /obj/item/tool/screwdriver(src) // Spotter scope needs a screwdriver to disassemble +/obj/item/storage/box/guncase/xm51 + name = "\improper XM51 breaching scattergun case" + desc = "A gun case containing the XM51 Breaching Scattergun. Comes with two spare magazines, two spare shell boxes, an optional stock and a belt to holster the weapon." + storage_slots = 7 + can_hold = list(/obj/item/weapon/gun/rifle/xm51, /obj/item/ammo_magazine/rifle/xm51, /obj/item/storage/belt/gun/xm51, /obj/item/attachable/stock/xm51) + +/obj/item/storage/box/guncase/xm51/fill_preset_inventory() + new /obj/item/attachable/stock/xm51(src) + new /obj/item/weapon/gun/rifle/xm51(src) + new /obj/item/ammo_magazine/rifle/xm51(src) + new /obj/item/ammo_magazine/rifle/xm51(src) + new /obj/item/ammo_magazine/shotgun/light/breaching(src) + new /obj/item/ammo_magazine/shotgun/light/breaching(src) + new /obj/item/storage/belt/gun/xm51(src) + //Handgun case for Military police vendor three mag , a railflashligh and the handgun. //88 Mod 4 Combat Pistol diff --git a/code/modules/projectiles/ammo_boxes/handful_boxes.dm b/code/modules/projectiles/ammo_boxes/handful_boxes.dm index 28eab8463011..a751371cfc47 100644 --- a/code/modules/projectiles/ammo_boxes/handful_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/handful_boxes.dm @@ -59,6 +59,20 @@ /obj/item/ammo_box/magazine/shotgun/beanbag/empty empty = TRUE + +//-----------------------16 GAUGE SHOTGUN SHELL BOXES----------------------- + +/obj/item/ammo_box/magazine/shotgun/light/breaching + name = "\improper 16-gauge shotgun shell box (Breaching x 120)" + icon_state = "base_breach" + overlay_content = "_breach" + magazine_type = /obj/item/ammo_magazine/shotgun/light/breaching + num_of_magazines = 120 //10 full mag reloads. + can_explode = FALSE + +/obj/item/ammo_box/magazine/shotgun/light/breaching/empty + empty = TRUE + //-----------------------R4T Lever-action rifle handfuls box----------------------- /obj/item/ammo_box/magazine/lever_action diff --git a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm index ff90a6659fb2..aa8a64c31aa0 100644 --- a/code/modules/projectiles/ammo_boxes/magazine_boxes.dm +++ b/code/modules/projectiles/ammo_boxes/magazine_boxes.dm @@ -170,6 +170,19 @@ /obj/item/ammo_box/magazine/m4ra/heap/empty empty = TRUE +//-----------------------XM51 Breaching Scattergun Mag Box----------------------- + +/obj/item/ammo_box/magazine/xm51 + name = "\improper magazine box (XM51 x 8)" + icon_state = "base_breach" + flags_equip_slot = SLOT_BACK + overlay_gun_type = "_xm51" + num_of_magazines = 8 + magazine_type = /obj/item/ammo_magazine/rifle/xm51 + +/obj/item/ammo_box/magazine/xm51/empty + empty = TRUE + //-----------------------L42A Battle Rifle Mag Boxes----------------------- /obj/item/ammo_box/magazine/l42a diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index d7ec91b8ec41..4e007be80ba0 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -2088,6 +2088,43 @@ Defined in conflicts.dm of the #defines folder. flags_attach_features = NO_FLAGS hud_offset_mod = 2 +/obj/item/attachable/stock/xm51 + name = "\improper XM51 stock" + desc = "A specialized stock designed for XM51 breaching shotguns. Helps the user absorb the recoil of the weapon while also reducing scatter. Integrated mechanisms inside the stock allow use of a devastating two-shot burst. This comes at a cost of the gun becoming too unwieldy to holster, worse handling and mobility." + icon_state = "xm51_stock" + attach_icon = "xm51_stock_a" + wield_delay_mod = WIELD_DELAY_FAST + hud_offset_mod = 3 + melee_mod = 10 + +/obj/item/attachable/stock/xm51/Initialize(mapload, ...) + . = ..() + select_gamemode_skin(type) + //it makes stuff much better when two-handed + accuracy_mod = HIT_ACCURACY_MULT_TIER_3 + recoil_mod = -RECOIL_AMOUNT_TIER_4 + scatter_mod = -SCATTER_AMOUNT_TIER_8 + movement_onehanded_acc_penalty_mod = -MOVEMENT_ACCURACY_PENALTY_MULT_TIER_4 + //and allows for burst-fire + burst_mod = BURST_AMOUNT_TIER_2 + //but it makes stuff much worse when one handed + accuracy_unwielded_mod = -HIT_ACCURACY_MULT_TIER_5 + recoil_unwielded_mod = RECOIL_AMOUNT_TIER_5 + scatter_unwielded_mod = SCATTER_AMOUNT_TIER_6 + //and makes you slower + aim_speed_mod = CONFIG_GET(number/slowdown_med) + +/obj/item/attachable/stock/xm51/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection) + . = ..() + var/new_attach_icon + switch(SSmapping.configs[GROUND_MAP].camouflage_type) + if("snow") + attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon + if("desert") + attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon + if("classic") + attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon + /obj/item/attachable/stock/mod88 name = "\improper Mod 88 burst stock" desc = "Increases the fire rate and burst amount on the Mod 88. Some versions act as a holster for the weapon when un-attached. This is a test item and should not be used in normal gameplay (yet)." diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 78cf3a654b49..dec0fafa9119 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -1928,3 +1928,123 @@ f90_shotgun_barrel.Attach(src) update_attachable(f90_shotgun.slot) update_attachable(f90_shotgun_barrel.slot) + +//------------------------------------------------------- +//XM51, Breaching Scattergun + +/obj/item/weapon/gun/rifle/xm51 + name = "\improper XM51 breaching scattergun" + desc = "An experimental shotgun model going through testing trials in the USCM. Based on the original civilian and CMB version, the XM51 is a mag-fed, pump-action shotgun. It utilizes special 16-gauge breaching rounds which are effective at breaching walls and doors. Users are advised not to employ the weapon against soft or armored targets due to low performance of the shells." + icon_state = "xm51" + item_state = "xm51" + fire_sound = 'sound/weapons/gun_shotgun_xm51.ogg' + reload_sound = 'sound/weapons/handling/l42_reload.ogg' + unload_sound = 'sound/weapons/handling/l42_unload.ogg' + current_mag = /obj/item/ammo_magazine/rifle/xm51 + attachable_allowed = list( + /obj/item/attachable/bayonet, + /obj/item/attachable/bayonet/upp, + /obj/item/attachable/bayonet/co2, + /obj/item/attachable/reddot, + /obj/item/attachable/reflex, + /obj/item/attachable/verticalgrip, + /obj/item/attachable/angledgrip, + /obj/item/attachable/gyro, + /obj/item/attachable/flashlight/grip, + /obj/item/attachable/flashlight, + /obj/item/attachable/magnetic_harness, + /obj/item/attachable/stock/xm51, + ) + flags_equip_slot = SLOT_BACK + flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER + gun_category = GUN_CATEGORY_SHOTGUN + aim_slowdown = SLOWDOWN_ADS_SHOTGUN + map_specific_decoration = TRUE + + var/pump_delay //How long we have to wait before we can pump the shotgun again. + var/pump_sound = "shotgunpump" + var/message_delay = 1 SECONDS //To stop message spam when trying to pump the gun constantly. + var/burst_count = 0 //To detect when the burst fire is near its end. + COOLDOWN_DECLARE(allow_message) + COOLDOWN_DECLARE(allow_pump) + +/obj/item/weapon/gun/rifle/xm51/set_gun_attachment_offsets() + attachable_offset = list("muzzle_x" = 34, "muzzle_y" = 18, "rail_x" = 12, "rail_y" = 20, "under_x" = 24, "under_y" = 13, "stock_x" = 15, "stock_y" = 16) + +/obj/item/weapon/gun/rifle/xm51/set_gun_config_values() + ..() + set_fire_delay(FIRE_DELAY_TIER_4*2) + set_burst_amount(0) + burst_scatter_mult = SCATTER_AMOUNT_TIER_7 + accuracy_mult = BASE_ACCURACY_MULT + 2*HIT_ACCURACY_MULT_TIER_8 + accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_8 + recoil = RECOIL_AMOUNT_TIER_4 + recoil_unwielded = RECOIL_AMOUNT_TIER_2 + scatter = SCATTER_AMOUNT_TIER_6 + +/obj/item/weapon/gun/rifle/xm51/Initialize(mapload, spawn_empty) + . = ..() + pump_delay = FIRE_DELAY_TIER_8*3 + additional_fire_group_delay += pump_delay + +/obj/item/weapon/gun/rifle/xm51/set_bullet_traits() + LAZYADD(traits_to_give, list( + BULLET_TRAIT_ENTRY_ID("turfs", /datum/element/bullet_trait_damage_boost, 30, GLOB.damage_boost_turfs), //2550, 2 taps colony walls, 4 taps reinforced walls + BULLET_TRAIT_ENTRY_ID("xeno turfs", /datum/element/bullet_trait_damage_boost, 0.23, GLOB.damage_boost_turfs_xeno), //2550*0.23 = 586, 2 taps resin walls, 3 taps thick resin + BULLET_TRAIT_ENTRY_ID("breaching", /datum/element/bullet_trait_damage_boost, 15, GLOB.damage_boost_breaching), //1275, enough to 1 tap airlocks + BULLET_TRAIT_ENTRY_ID("pylons", /datum/element/bullet_trait_damage_boost, 6, GLOB.damage_boost_pylons) //510, 4 shots to take out a pylon + )) + +/obj/item/weapon/gun/rifle/xm51/unique_action(mob/user) + if(!COOLDOWN_FINISHED(src, allow_pump)) + return + if(in_chamber) + if(COOLDOWN_FINISHED(src, allow_message)) + to_chat(usr, SPAN_WARNING("[src] already has a shell in the chamber!")) + COOLDOWN_START(src, allow_message, message_delay) + return + + playsound(user, pump_sound, 10, 1) + COOLDOWN_START(src, allow_pump, pump_delay) + ready_in_chamber() + burst_count = 0 //Reset the count for burst mode. + +/obj/item/weapon/gun/rifle/xm51/load_into_chamber(mob/user) + return in_chamber + +/obj/item/weapon/gun/rifle/xm51/reload_into_chamber(mob/user) //Don't chamber bullets after firing. + if(!current_mag) + update_icon() + return + + in_chamber = null + if(current_mag.current_rounds <= 0 && flags_gun_features & GUN_AUTO_EJECTOR) + if (user.client?.prefs && (user.client?.prefs?.toggle_prefs & TOGGLE_AUTO_EJECT_MAGAZINE_OFF)) + update_icon() + else if (!(flags_gun_features & GUN_BURST_FIRING) || !in_chamber) // Magazine will only unload once burstfire is over + var/drop_to_ground = TRUE + if (user.client?.prefs && (user.client?.prefs?.toggle_prefs & TOGGLE_AUTO_EJECT_MAGAZINE_TO_HAND)) + drop_to_ground = FALSE + unwield(user) + user.swap_hand() + unload(user, TRUE, drop_to_ground) // We want to quickly autoeject the magazine. This proc does the rest based on magazine type. User can be passed as null. + playsound(src, empty_sound, 25, 1) + if(gun_firemode == GUN_FIREMODE_BURSTFIRE & burst_count < burst_amount - 1) //Fire two (or more) shots in a burst without having to pump. + ready_in_chamber() + burst_count++ + return in_chamber + +/obj/item/weapon/gun/rifle/xm51/replace_magazine(mob/user, obj/item/ammo_magazine/magazine) //Don't chamber a round when reloading. + user.drop_inv_item_to_loc(magazine, src) //Click! + current_mag = magazine + replace_ammo(user,magazine) + user.visible_message(SPAN_NOTICE("[user] loads [magazine] into [src]!"), + SPAN_NOTICE("You load [magazine] into [src]!"), null, 3, CHAT_TYPE_COMBAT_ACTION) + if(reload_sound) + playsound(user, reload_sound, 25, 1, 5) + +/obj/item/weapon/gun/rifle/xm51/cock_gun(mob/user) + return + +/obj/item/weapon/gun/rifle/xm51/cock(mob/user) //Stops the "You cock the gun." message where nothing happens. + return diff --git a/code/modules/projectiles/magazines/rifles.dm b/code/modules/projectiles/magazines/rifles.dm index 47ee89fb7930..1f1c945a9ae1 100644 --- a/code/modules/projectiles/magazines/rifles.dm +++ b/code/modules/projectiles/magazines/rifles.dm @@ -508,3 +508,17 @@ item_state = "aug_dmr" default_ammo = /datum/ammo/bullet/rifle/heap ammo_band_color = AMMO_BAND_COLOR_HEAP + +//-------------------------------------------------------- +//XM51 BREACHING SHOTGUN + +/obj/item/ammo_magazine/rifle/xm51 + name = "\improper XM51 magazine (16g)" + desc = "A 16 gauge pump-action shotgun magazine." + icon_state = "xm51" + caliber = "16g" + w_class = SIZE_MEDIUM + default_ammo = /datum/ammo/bullet/shotgun/light/breaching + max_rounds = 12 + gun_type = /obj/item/weapon/gun/rifle/xm51 + transfer_handful_amount = 6 diff --git a/code/modules/projectiles/magazines/shotguns.dm b/code/modules/projectiles/magazines/shotguns.dm index a35dc727e486..d032c0623108 100644 --- a/code/modules/projectiles/magazines/shotguns.dm +++ b/code/modules/projectiles/magazines/shotguns.dm @@ -83,6 +83,17 @@ var/list/shotgun_boxes_12g = list( name = "box of buckshot shells, USCM special type" desc = "A box filled with buckshot spread shotgun shells, USCM special type. 12 Gauge." default_ammo = /datum/ammo/bullet/shotgun/buckshot/special +/obj/item/ammo_magazine/shotgun/light/breaching + name = "box of breaching shells" + desc = "A box filled with breaching shotgun shells. 16 Gauge." + icon_state = "breaching" + item_state = "breaching" + max_rounds = 30 //6 handfuls of 6 shells, 12 rounds in a XM51 mag + transfer_handful_amount = 6 + default_ammo = /datum/ammo/bullet/shotgun/light/breaching + handful_state = "breaching_shell" + caliber = "16g" + //------------------------------------------------------- /* @@ -242,7 +253,6 @@ var/list/shotgun_handfuls_12g = list( name = "handful of beanbag slugs (20g)" caliber = "20g" - /obj/item/ammo_magazine/handful/shotgun/heavy name = "handful of heavy shotgun slugs (8g)" icon_state = "heavy_slug_4" @@ -281,6 +291,17 @@ var/list/shotgun_handfuls_12g = list( handful_state = "heavy_beanbag" default_ammo = /datum/ammo/bullet/shotgun/heavy/beanbag +/obj/item/ammo_magazine/handful/shotgun/light/breaching + name = "handful of breaching shells (16g)" + icon_state = "breaching_shell_6" + handful_state = "breaching_shell" + max_rounds = 6 //XM51 magazines are 12 rounds total, two handfuls should be enough to reload a mag + current_rounds = 6 + transfer_handful_amount = 6 + default_ammo = /datum/ammo/bullet/shotgun/light/breaching + caliber = "16g" + gun_type = /obj/item/weapon/gun/rifle/xm51 + /obj/item/ammo_magazine/handful/shotgun/twobore name = "handful of shotgun slugs (2 bore)" icon_state = "twobore_3" diff --git a/icons/mob/humans/onmob/belt.dmi b/icons/mob/humans/onmob/belt.dmi index 8a10910930dd..4cff5838fbbb 100644 Binary files a/icons/mob/humans/onmob/belt.dmi and b/icons/mob/humans/onmob/belt.dmi differ diff --git a/icons/obj/items/clothing/belts.dmi b/icons/obj/items/clothing/belts.dmi index 38ff421cfda5..946fbfd23cda 100644 Binary files a/icons/obj/items/clothing/belts.dmi and b/icons/obj/items/clothing/belts.dmi differ diff --git a/icons/obj/items/weapons/guns/attachments/stock.dmi b/icons/obj/items/weapons/guns/attachments/stock.dmi index d3a95284a23f..0867f60d6430 100644 Binary files a/icons/obj/items/weapons/guns/attachments/stock.dmi and b/icons/obj/items/weapons/guns/attachments/stock.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/classic/back.dmi b/icons/obj/items/weapons/guns/guns_by_map/classic/back.dmi index 63b197dd36c4..fb21be90f8a7 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/classic/back.dmi and b/icons/obj/items/weapons/guns/guns_by_map/classic/back.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_lefthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_lefthand.dmi index 22eae6bd0ba4..df823405fac3 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_lefthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_lefthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_obj.dmi b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_obj.dmi index b9aa8907a806..4a31d29042d4 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_obj.dmi and b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_obj.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_righthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_righthand.dmi index dd432a1fa2c1..21d7b04f6f05 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/classic/guns_righthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/classic/guns_righthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/classic/suit_slot.dmi b/icons/obj/items/weapons/guns/guns_by_map/classic/suit_slot.dmi index 1306cbb7d8f6..0d3b1f715571 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/classic/suit_slot.dmi and b/icons/obj/items/weapons/guns/guns_by_map/classic/suit_slot.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/desert/back.dmi b/icons/obj/items/weapons/guns/guns_by_map/desert/back.dmi index 63771f7ff133..9e5e8d4c9c59 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/desert/back.dmi and b/icons/obj/items/weapons/guns/guns_by_map/desert/back.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_lefthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_lefthand.dmi index 6530e1d6967d..02021756a805 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_lefthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_lefthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_obj.dmi b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_obj.dmi index cae152f237ef..a91d071754ad 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_obj.dmi and b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_obj.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_righthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_righthand.dmi index 9df4a0d86ccc..e408fff750da 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/desert/guns_righthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/desert/guns_righthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/desert/suit_slot.dmi b/icons/obj/items/weapons/guns/guns_by_map/desert/suit_slot.dmi index 2f5324fdb46b..764a51e8b390 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/desert/suit_slot.dmi and b/icons/obj/items/weapons/guns/guns_by_map/desert/suit_slot.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/jungle/back.dmi b/icons/obj/items/weapons/guns/guns_by_map/jungle/back.dmi index 04718caddcd1..5cc73c3e9ec5 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/jungle/back.dmi and b/icons/obj/items/weapons/guns/guns_by_map/jungle/back.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_lefthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_lefthand.dmi index 717a1182824e..25f8b823289c 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_lefthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_lefthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_obj.dmi b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_obj.dmi index 9ce7e553ba45..c5b3b3f3fe73 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_obj.dmi and b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_obj.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_righthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_righthand.dmi index 9f69b4ac6815..9c2562d5a921 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_righthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/jungle/guns_righthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/jungle/suit_slot.dmi b/icons/obj/items/weapons/guns/guns_by_map/jungle/suit_slot.dmi index b51ed6044347..0aa7f686a749 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/jungle/suit_slot.dmi and b/icons/obj/items/weapons/guns/guns_by_map/jungle/suit_slot.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/snow/back.dmi b/icons/obj/items/weapons/guns/guns_by_map/snow/back.dmi index b72963ff7917..8ad5352cc440 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/snow/back.dmi and b/icons/obj/items/weapons/guns/guns_by_map/snow/back.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_lefthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_lefthand.dmi index 2c8dedb6cf35..a837e7061417 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_lefthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_lefthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_obj.dmi b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_obj.dmi index fbc98874a4f6..171d0d0eca03 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_obj.dmi and b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_obj.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_righthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_righthand.dmi index 6e7b9cb8c9b5..1de053b6f969 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/snow/guns_righthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/snow/guns_righthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/urban/back.dmi b/icons/obj/items/weapons/guns/guns_by_map/urban/back.dmi index e849b8134004..5996089a64d6 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/urban/back.dmi and b/icons/obj/items/weapons/guns/guns_by_map/urban/back.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_lefthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_lefthand.dmi index c844b637ab7e..ea84f3e69e21 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_lefthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_lefthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_obj.dmi b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_obj.dmi index 09029fb61f2b..78e322e3db8b 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_obj.dmi and b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_obj.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_righthand.dmi b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_righthand.dmi index 78bebfdd4bd9..1b2c96fb9518 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/urban/guns_righthand.dmi and b/icons/obj/items/weapons/guns/guns_by_map/urban/guns_righthand.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_map/urban/suit_slot.dmi b/icons/obj/items/weapons/guns/guns_by_map/urban/suit_slot.dmi index 3fee1087811a..738add8e1df4 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_map/urban/suit_slot.dmi and b/icons/obj/items/weapons/guns/guns_by_map/urban/suit_slot.dmi differ diff --git a/icons/obj/items/weapons/guns/handful.dmi b/icons/obj/items/weapons/guns/handful.dmi index bbea110531ea..e3fe380c9dfe 100644 Binary files a/icons/obj/items/weapons/guns/handful.dmi and b/icons/obj/items/weapons/guns/handful.dmi differ diff --git a/icons/obj/items/weapons/guns/lineart.dmi b/icons/obj/items/weapons/guns/lineart.dmi index 5d52fd658290..7212525c804f 100644 Binary files a/icons/obj/items/weapons/guns/lineart.dmi and b/icons/obj/items/weapons/guns/lineart.dmi differ diff --git a/nano/images/weapons/xm51.png b/nano/images/weapons/xm51.png new file mode 100644 index 000000000000..6eb9d855e8a9 Binary files /dev/null and b/nano/images/weapons/xm51.png differ diff --git a/sound/weapons/gun_shotgun_xm51.ogg b/sound/weapons/gun_shotgun_xm51.ogg new file mode 100644 index 000000000000..0b0f94e49ca1 Binary files /dev/null and b/sound/weapons/gun_shotgun_xm51.ogg differ