Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the XM51 Breaching Scattergun #5086

Merged
merged 36 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
73376e1
basics
VileBeggar Nov 15, 2023
bee321d
burst mode, couple of touch ups
VileBeggar Nov 16, 2023
dabbaa3
inhand and other icons, weapon tweaks and some balancing
VileBeggar Nov 19, 2023
b5b3669
fix icons, autodrop mag and belt
VileBeggar Nov 20, 2023
b6f6c97
mild balancing, ammo boxes, redoing icons and adding camo to the belt
VileBeggar Nov 22, 2023
d96f1a3
respriting and adding camo variants
VileBeggar Nov 25, 2023
ceba3b1
icon overhaul (another one), stock icons updating now
VileBeggar Nov 26, 2023
1b8fbfa
minor icon changes, balancing and adding it to vendors
VileBeggar Nov 30, 2023
3b9b3f4
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Nov 30, 2023
7d8cd67
final nits
VileBeggar Nov 30, 2023
98718c2
fix missing init hint
VileBeggar Dec 1, 2023
14aca3d
remove white dots and icon leftovers
VileBeggar Dec 1, 2023
25fbd26
more req ammo, ASRS chance
VileBeggar Dec 4, 2023
7d3f042
craftable ammo boxes, more ASRS stuff
VileBeggar Dec 4, 2023
81ef225
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Dec 5, 2023
f7d6e62
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Dec 5, 2023
5650121
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Dec 7, 2023
ea6b4b6
adds a guard clause
VileBeggar Dec 11, 2023
656fbb1
add proper cooldowns, some comments, fix urban inhand
VileBeggar Dec 13, 2023
f9e0f70
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Dec 14, 2023
91ff400
buffs the damage, accuracy and roundstart ammo availability. can now …
VileBeggar Dec 25, 2023
551b31e
fix rail attachment offsight
VileBeggar Dec 25, 2023
c2be319
increase availability, fix jungle holster bug, slight holster buff
VileBeggar Dec 25, 2023
66ea721
increases damage against colony walls
VileBeggar Dec 26, 2023
039452a
remakes the holster rig
VileBeggar Dec 27, 2023
c1e4a5a
replaces _private methods
VileBeggar Dec 27, 2023
570e71f
adds correct arguments, fixes mag count staying the same if a mag is …
VileBeggar Dec 28, 2023
b119cca
fixes camo not applying to worn belts
VileBeggar Dec 30, 2023
a6c9afd
suit slot icons
VileBeggar Dec 30, 2023
9f4c7ef
Merge remote-tracking branch 'upstream/master' into breachershotgun
VileBeggar Jan 2, 2024
b8c603d
lowers resin wall damage and spare ammo in preps
VileBeggar Jan 4, 2024
2320f59
lowers the xeno turf damage a little bit more
VileBeggar Jan 4, 2024
e0ff18f
fix the back sprite of the snow camo variant
VileBeggar Jan 9, 2024
a0bf468
reduce range to 3 tiles
VileBeggar Jan 10, 2024
1a300ef
increases range to 4 tiles, lowers ammo availability
VileBeggar Jan 13, 2024
7d5fb6d
fixes the missing weapon stats icon
VileBeggar Feb 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
reference_package = /datum/supply_packs/ammo_shell_box_flechette
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs_asrs/ammo_shell_box_breaching
reference_package = /datum/supply_packs/ammo_shell_box_breaching
cost = ASRS_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

Expand Down
30 changes: 30 additions & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,36 @@
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_4
accuracy_var_high = PROJECTILE_VARIANCE_TIER_4
damage = 20
max_range = 5
damage_falloff = DAMAGE_FALLOFF_TIER_6
effective_range_max = EFFECTIVE_RANGE_MAX_TIER_1

penetration = ARMOR_PENETRATION_TIER_6
bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_3

/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_2
damage_falloff = DAMAGE_FALLOFF_TIER_6
damage = 10

//Enormous shell for Van Bandolier's superheavy double-barreled hunting gun.
/datum/ammo/bullet/shotgun/twobore
name = "two bore bullet"
Expand Down
22 changes: 22 additions & 0 deletions code/datums/supply_packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion code/datums/supply_packs/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/vending/vendor_types/requisitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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 * 2.5), /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),
Expand Down Expand Up @@ -244,11 +245,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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,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),
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ GLOBAL_LIST_INIT_TYPED(cardboard_recipes, /datum/stack_recipe, 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, \
Expand All @@ -280,6 +282,7 @@ GLOBAL_LIST_INIT_TYPED(cardboard_recipes, /datum/stack_recipe, list ( \
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 (Incendiary Buckshot)", /obj/item/ammo_box/magazine/shotgun/incendiarybuck/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), \
Expand Down
31 changes: 30 additions & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,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,
Expand Down Expand Up @@ -965,7 +966,17 @@
sure that we don't have to do any extra calculations.
*/
playsound(src, drawSound, 7, TRUE)
var/image/gun_underlay = image(icon, current_gun.base_gun_icon)
var/image/gun_underlay
if(gun_has_gamemode_skin)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
Drulikar marked this conversation as resolved.
Show resolved Hide resolved
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)
else
gun_underlay = image(icon, 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
Expand Down Expand Up @@ -1186,6 +1197,24 @@
"icon_x" = -11,
"icon_y" = -5))

/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, along with two pouches for spare magazines or shells."
icon_state = "xm51_holster"
has_gamemode_skin = TRUE
gun_has_gamemode_skin = TRUE
storage_slots = 3
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" = 9,
"icon_y" = -2))

/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."
Expand Down
13 changes: 13 additions & 0 deletions code/modules/cm_marines/equipment/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,19 @@
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, an optional stock and a belt to holster the weapon in."
storage_slots = 5
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/storage/belt/gun/xm51(src)

//Handgun case for Military police vendor three mag , a railflashligh and the handgun.

//88 Mod 4 Combat Pistol
Expand Down
14 changes: 14 additions & 0 deletions code/modules/projectiles/ammo_boxes/handful_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,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
Expand Down
13 changes: 13 additions & 0 deletions code/modules/projectiles/ammo_boxes/magazine_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,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)."
Expand Down
Loading