Skip to content

Commit

Permalink
mp5a5+car15a3+m16a5
Browse files Browse the repository at this point in the history
  • Loading branch information
Blundir committed Jul 22, 2024
1 parent 458f57b commit 8348bf7
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 18 deletions.
2 changes: 1 addition & 1 deletion code/datums/skills/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COLONIAL MARSHALS
SKILL_CQC = SKILL_CQC_EXPERT,
SKILL_CONSTRUCTION = SKILL_CONSTRUCTION_DEFAULT,
SKILL_FIREARMS = SKILL_FIREARMS_TRAINED,
SKILL_FIREMAN = SKILL_FIREMAN_SKILLED,
SKILL_FIREMAN = SKILL_FIREMAN_EXPERT,
SKILL_MEDICAL = SKILL_MEDICAL_DOCTOR,
SKILL_SURGERY = SKILL_SURGERY_TRAINED,
SKILL_MELEE_WEAPONS = SKILL_MELEE_TRAINED,
Expand Down
8 changes: 4 additions & 4 deletions code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5/mp5a5/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/restraint/handcuffs/zip, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/motiondetector, WEAR_L_HAND)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/m4a3/black, WEAR_WAIST)
Expand Down Expand Up @@ -382,7 +382,7 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/box/MRE, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/smg/mp5, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smg/mp5/mp5a5/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/rebreather/scarf, WEAR_FACE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/CMB/beret, WEAR_HEAD)
Expand Down Expand Up @@ -432,7 +432,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/m16/ext, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/rebreather/scarf, WEAR_FACE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/m16/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/m16/m16a5/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/cmb/engi, WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/veteran/pmc/knife, WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud/tactical, WEAR_EYES)
Expand Down Expand Up @@ -487,7 +487,7 @@
new_human.equip_to_slot_or_del(new /obj/item/ammo_magazine/rifle/m16/ext, WEAR_IN_JACKET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/veteran, WEAR_HANDS)
new_human.equip_to_slot_or_del(new /obj/item/clothing/mask/rebreather/scarf, WEAR_FACE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/xm177/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/rifle/xm177/car15a3/tactical, WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/marine/veteran/cmb/spec, WEAR_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/veteran/pmc/knife, WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud/tactical, WEAR_EYES)
Expand Down
39 changes: 30 additions & 9 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,11 @@ Defined in conflicts.dm of the #defines folder.
flags_attach_features = NO_FLAGS
hud_offset_mod = 3

/obj/item/attachable/stock/m16/m16a5
name = "\improper M16A5 bump stock"
icon_state = "m16a5_stock"
attach_icon = "m16a5_stock"

/obj/item/attachable/stock/m16/New()//no stats, its cosmetic
..()

Expand All @@ -2062,14 +2067,14 @@ Defined in conflicts.dm of the #defines folder.
desc = "Very illegal in the state of California."
icon_state = "m16_folding"
attach_icon = "m16_folding"
flags_attach_features = NO_FLAGS
hud_offset_mod = 3
collapsible = TRUE
stock_activated = FALSE
wield_delay_mod = WIELD_DELAY_NONE //starts collapsed so no delay mod
collapse_delay = 0.5 SECONDS
flags_attach_features = ATTACH_ACTIVATION
attachment_action_type = /datum/action/item_action/toggle
var/base_icon = "m16_folding"

/obj/item/attachable/stock/m16/xm177/Initialize()
.=..()
Expand All @@ -2090,8 +2095,8 @@ Defined in conflicts.dm of the #defines folder.
scatter_mod = -SCATTER_AMOUNT_TIER_9
aim_speed_mod = CONFIG_GET(number/slowdown_med)
hud_offset_mod = 5
icon_state = "m16_folding"
attach_icon = "m16_folding_on"
icon_state = base_icon
attach_icon = "[base_icon]_on"
wield_delay_mod = WIELD_DELAY_VERY_FAST

else
Expand All @@ -2104,13 +2109,19 @@ Defined in conflicts.dm of the #defines folder.
scatter_unwielded_mod = 0
aim_speed_mod = 0
hud_offset_mod = 3
icon_state = "m16_folding"
attach_icon = "m16_folding"
icon_state = base_icon
attach_icon = base_icon
wield_delay_mod = WIELD_DELAY_NONE //stock is folded so no wield delay
gun.recalculate_attachment_bonuses()
gun.update_overlays(src, "stock")


/obj/item/attachable/stock/m16/xm177/car15a3
name = "\improper collapsible CAR-15A3 stock"
icon_state = "car_folding"
attach_icon = "car_folding"
base_icon = "car_folding"

/obj/item/attachable/stock/ar10
name = "\improper AR10 wooden stock"
desc = "The spring's in here, don't take it off!"
Expand Down Expand Up @@ -2423,6 +2434,7 @@ Defined in conflicts.dm of the #defines folder.
attachment_action_type = /datum/action/item_action/toggle
hud_offset_mod = 5
collapsible = TRUE
var/base_icon = "smgstockc"


/obj/item/attachable/stock/smg/collapsible/New()
Expand Down Expand Up @@ -2455,8 +2467,8 @@ Defined in conflicts.dm of the #defines folder.
accuracy_unwielded_mod = -HIT_ACCURACY_MULT_TIER_3
recoil_unwielded_mod = RECOIL_AMOUNT_TIER_4
hud_offset_mod = 5
icon_state = "smgstockc"
attach_icon = "smgstockc_a"
icon_state = base_icon
attach_icon = "[base_icon]_a"

else
accuracy_mod = 0
Expand All @@ -2470,17 +2482,26 @@ Defined in conflicts.dm of the #defines folder.
accuracy_unwielded_mod = 0
recoil_unwielded_mod = 0
hud_offset_mod = 3
icon_state = "smgstockcc"
attach_icon = "smgstockcc_a"
icon_state = "[base_icon]c"
attach_icon = "[base_icon]c_a"

gun.recalculate_attachment_bonuses()
gun.update_overlays(src, "stock")

/obj/item/attachable/stock/smg/collapsible/mp5a5
name = "MP5A5 folding stock"
icon_state = "mp5_stockc"
base_icon = "mp5_stockc"
attach_icon = "mp5_stockc_a"
flags_attach_features = ATTACH_ACTIVATION
stock_activated = FALSE

/obj/item/attachable/stock/smg/collapsible/brace
name = "\improper submachinegun arm brace"
desc = "A specialized stock for use on an M39 submachine gun. It makes one handing more accurate at the expense of burst amount. Wielding the weapon with this stock attached confers a major inaccuracy and recoil debuff."
size_mod = 1
icon_state = "smg_brace"
base_icon = "smg_brace"
attach_icon = "smg_brace_a"
pixel_shift_x = 43
pixel_shift_y = 11
Expand Down
34 changes: 32 additions & 2 deletions code/modules/projectiles/guns/rifles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,22 @@
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_6
recoil_unwielded = RECOIL_AMOUNT_TIER_2

/obj/item/weapon/gun/rifle/m16/tactical
/obj/item/weapon/gun/rifle/m16/m16a5
name = "\improper M16A5 rifle"
desc = "An old, reliable design first adopted by the U.S. military in the 1960s. Something like this belongs in a museum of war history. It is chambered in 5.56x45mm."
icon = 'icons/obj/items/weapons/guns/guns_by_faction/colony.dmi'
icon_state = "m16a5"
item_state = "m16"

/obj/item/weapon/gun/rifle/m16/m16a5/handle_starting_attachment()
..()
var/obj/item/attachable/stock/m16/m16a5/S = new(src)
S.hidden = FALSE
S.flags_attach_features &= ~ATTACH_REMOVABLE
S.Attach(src)
update_attachable(S.slot)

/obj/item/weapon/gun/rifle/m16/m16a5/tactical
random_spawn_chance = 100
random_spawn_rail = list(
/obj/item/attachable/reddot,
Expand Down Expand Up @@ -1089,7 +1104,22 @@
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_6
recoil_unwielded = RECOIL_AMOUNT_TIER_2

/obj/item/weapon/gun/rifle/xm177/tactical
/obj/item/weapon/gun/rifle/xm177/car15a3
name = "\improper CAR-15A3 carbine"
desc = "Modernized version of the XM177, developed for limited use by special forces and Office of the Colonial Marshals. The short length inhibits the attachment of most underbarrel attachments, and the barrel moderator prohibits the attachment of all muzzle devices."
desc_lore = null
icon_state = "car15a3"
item_state = "m16"

/obj/item/weapon/gun/rifle/xm177/car15a3/handle_starting_attachment()
..()
var/obj/item/attachable/stock/m16/xm177/car15a3/integrated = new(src)
integrated.hidden = FALSE
integrated.flags_attach_features &= ~ATTACH_REMOVABLE
integrated.Attach(src)
update_attachable(integrated.slot)

/obj/item/weapon/gun/rifle/xm177/car15a3/tactical
random_spawn_chance = 100
random_spawn_rail = list(
/obj/item/attachable/reflex,
Expand Down
37 changes: 35 additions & 2 deletions code/modules/projectiles/guns/smgs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,39 @@
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_4
recoil_unwielded = RECOIL_AMOUNT_TIER_5

/obj/item/weapon/gun/smg/mp5/tactical
/obj/item/weapon/gun/smg/mp5/mp5a5
name = "\improper MP5A5 submachinegun"
desc = "A German design, this was one of the most widely used submachine guns in the world. Modernized design for limited use by colonial security and Office of the Colonial Marshals."
icon_state = "mp5_alt"
item_state = "mp5_alt"
attachable_allowed = list(
/obj/item/attachable/suppressor, // Barrel
/obj/item/attachable/bayonet,
/obj/item/attachable/bayonet/upp,
/obj/item/attachable/bayonet/co2,
/obj/item/attachable/extended_barrel,
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/compensator,
/obj/item/attachable/reddot, // Rail
/obj/item/attachable/reflex,
/obj/item/attachable/flashlight,
/obj/item/attachable/magnetic_harness,
/obj/item/attachable/scope/mini,
/obj/item/attachable/lasersight, // Under
/obj/item/attachable/gyro,
/obj/item/attachable/bipod,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/flashlight/grip,
/obj/item/attachable/burstfire_assembly,
/obj/item/attachable/attached_gun/grenade/m203,
/obj/item/attachable/stock/smg/collapsible/mp5a5,
)
starting_attachment_types = list(/obj/item/attachable/stock/smg/collapsible/mp5a5)

/obj/item/weapon/gun/smg/mp5/mp5a5/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 26, "muzzle_y" = 17,"rail_x" = 8, "rail_y" = 19, "under_x" = 19, "under_y" = 13, "stock_x" = 39, "stock_y" = 11)

/obj/item/weapon/gun/smg/mp5/mp5a5/tactical
random_spawn_chance = 100
random_spawn_rail = list(
/obj/item/attachable/reddot,
Expand All @@ -206,9 +238,10 @@

random_spawn_chance = 100
random_spawn_under = list(
/obj/item/attachable/angledgrip,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/flashlight/grip,
/obj/item/attachable/attached_gun/grenade/m203,
)
random_spawn_muzzle = list(
/obj/item/attachable/suppressor,
Expand Down
Binary file modified icons/mob/humans/onmob/items_lefthand_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/items_righthand_1.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/cm_hats.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/attachments.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/attachments/stock.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/guns_by_faction/colony.dmi
Binary file not shown.

0 comments on commit 8348bf7

Please sign in to comment.