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

Removes debuffs from the folded M39 stock #4305

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
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
17 changes: 9 additions & 8 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ Defined in conflicts.dm of the #defines folder.

/obj/item/attachable/stock/smg/collapsible
name = "submachinegun folding stock"
desc = "A Kirchner brand K2 M39 folding stock, standard issue in the USCM. The stock, when extended, reduces recoil and improves accuracy, but at a reduction to handling and agility. Seemingly a bit more effective in a brawl. This stock can collapse in, removing almost all positive and negative effects, however it slightly increases spread due to weapon being off-balanced by the collapsed stock."
desc = "A Kirchner brand K2 M39 folding stock, standard issue in the USCM. The stock, when extended, reduces recoil and improves accuracy, but at a reduction to handling and agility. Seemingly a bit more effective in a brawl. This stock can collapse in, removing all positive and negative effects."
slot = "stock"
melee_mod = 10
size_mod = 1
Expand Down Expand Up @@ -1842,6 +1842,9 @@ Defined in conflicts.dm of the #defines folder.

/obj/item/attachable/stock/smg/collapsible/apply_on_weapon(obj/item/weapon/gun/gun)
if(stock_activated)
accuracy_mod = HIT_ACCURACY_MULT_TIER_3
recoil_mod = -RECOIL_AMOUNT_TIER_4
scatter_mod = -SCATTER_AMOUNT_TIER_8
scatter_unwielded_mod = SCATTER_AMOUNT_TIER_10
size_mod = 1
aim_speed_mod = CONFIG_GET(number/slowdown_low)
Expand All @@ -1854,22 +1857,20 @@ Defined in conflicts.dm of the #defines folder.
attach_icon = "smgstockc_a"

else
accuracy_mod = 0
recoil_mod = 0
scatter_mod = 0
scatter_unwielded_mod = 0
size_mod = 0
aim_speed_mod = 0
wield_delay_mod = 0
movement_onehanded_acc_penalty_mod = 0
accuracy_unwielded_mod = -HIT_ACCURACY_MULT_TIER_1
recoil_unwielded_mod = RECOIL_AMOUNT_TIER_5
accuracy_unwielded_mod = 0
recoil_unwielded_mod = 0
hud_offset_mod = 3
icon_state = "smgstockcc"
attach_icon = "smgstockcc_a"

//don't *= -1 on debuffs, you'd actually be making than without stock when it's collapsed.
accuracy_mod *= -1
recoil_mod *= -1
scatter_mod *= -1

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

Expand Down
Loading