Skip to content

Commit

Permalink
and done!
Browse files Browse the repository at this point in the history
  • Loading branch information
KoishiVibe committed Aug 29, 2024
1 parent 1ab06f0 commit f874be0
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
11 changes: 11 additions & 0 deletions code/modules/cm_marines/equipment/guncases.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@
new /obj/item/ammo_magazine/rifle/m41aMK1/ap(src)
new /obj/item/ammo_magazine/rifle/m41aMK1/ap(src)

/obj/item/storage/box/guncase/m41aMK1/carbine
name = "\improper XM43A pulse carbine case"
desc = "Contains an unloaded XM43A pulse carbine and three 99 round clips."
storage_slots = 4
can_hold = list(/obj/item/weapon/gun/rifle/m41aMK1/carbine, /obj/item/ammo_magazine/rifle/m41aMK1)

/obj/item/storage/box/guncase/m41aMK1/carbine/fill_preset_inventory()
new /obj/item/weapon/gun/rifle/m41aMK1/carbine(src)
new /obj/item/ammo_magazine/rifle/m41aMK1(src)
new /obj/item/ammo_magazine/rifle/m41aMK1(src)

//------------
//M79 grenade launcher
/obj/item/storage/box/guncase/m79
Expand Down
6 changes: 6 additions & 0 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,12 @@ Defined in conflicts.dm of the #defines folder.
scatter_unwielded_mod = -SCATTER_AMOUNT_TIER_9
accuracy_unwielded_mod = HIT_ACCURACY_MULT_TIER_1

/obj/item/attachable/lasersight/carbine
name = "XM43A carbine underbarrel laser module"
desc = "What in god's name is this doing off the gun?"
icon_state = "lasersight"
attach_icon = "carbine_laser_a"

/obj/item/attachable/lasersight/upp
name = "Zvezda Laser Module"
desc = "Visible band 512nm green laser, compatible with NVG and IR. Bears striking resemblance to an old Weyland Yutani offering... Decreases scatter, especially onehanded, slightly boosts accuracy. "
Expand Down
32 changes: 31 additions & 1 deletion code/modules/projectiles/guns/rifles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,37 @@
icon_state = "xm43a"
item_state = "xm43a"
current_mag = /obj/item/ammo_magazine/rifle/m41aMK1
starting_attachment_types = list(/obj/item/attachable/stock/rifle/collapsible, /obj/item/attachable/under/carbine_laser)
starting_attachment_types = list(/obj/item/attachable/stock/rifle/collapsible, /obj/item/attachable/lasersight/carbine)
aim_slowdown = SLOWDOWN_ADS_QUICK_MINUS
wield_delay = WIELD_DELAY_MIN
attachable_allowed = list(
/obj/item/attachable/stock/rifle/collapsible,
/obj/item/attachable/lasersight/carbine,
)

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

/obj/item/weapon/gun/rifle/m41aMK1/carbine/set_gun_config_values()
..()
set_fire_delay(FIRE_DELAY_TIER_11)
set_burst_amount(BURST_AMOUNT_TIER_4)
set_burst_delay(FIRE_DELAY_TIER_11)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
scatter = SCATTER_AMOUNT_TIER_7
burst_scatter_mult = SCATTER_AMOUNT_TIER_9
scatter_unwielded = SCATTER_AMOUNT_TIER_3
damage_mult = BASE_BULLET_DAMAGE_MULT
recoil_unwielded = RECOIL_AMOUNT_TIER_4

/obj/item/weapon/gun/rifle/m41aMK1/carbine/unloaded
current_mag = null

//----------------------------------------------
//Special gun for the CO to replace the smartgun
Expand Down

0 comments on commit f874be0

Please sign in to comment.