From 9e4fdc291158894058b7e4a848529a4c106b7572 Mon Sep 17 00:00:00 2001 From: firebudgy <153147550+firebudgy@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:42:12 -0800 Subject: [PATCH] SKM-24u LMG Modification on the Black Market (#3871) ## About The Pull Request Adds the SKM-24u LMG Modification to the black market, for on average about 1000 above standard SKM sale price. Given the statistical similarities to the regular SKM minus it's having of a bipod and the non-guarantee of drum magazines, this felt right. Also fixes bipods to actually work at all after the code for them was just outright removed in a PR I can't care to find. ## Why It's Good For The Game New rare weapons variety to the black market, and a defensive option in the form of a bipod-attached LMG should make for some interesting situations. ## Changelog :cl: add: An intercepted shipment of CM-40 barrels has led to an influx of SKM-24u LMGs to the black market. Report sightings to your nearest CLIP representative. fix: Bipods actually work now. /:cl: --------- Signed-off-by: firebudgy <153147550+firebudgy@users.noreply.github.com> --- .../blackmarket/blackmarket_items/weapons.dm | 11 +++++++++++ code/modules/projectiles/guns/ballistic/hmg.dm | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm b/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm index 096edd5707f9..6eae1c1a1484 100644 --- a/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm +++ b/code/modules/cargo/blackmarket/blackmarket_items/weapons.dm @@ -425,3 +425,14 @@ stock_min = 1 stock_max = 5 availability_prob = 10 + +/datum/blackmarket_item/weapon/skm_lmg + name = "SKM-24u Light Machinegun" + desc = "Your regular rifles not have enough oomph for you? This SKM-24 was converted with help from a 'liberated' CM-40 parts shipment into a light machinegun, ready to blow away whatever you point it at. Increased firerate makes it buck like a mule, so keep that bipod on the ground. Drums sold separately!" + item = /obj/item/gun/ballistic/automatic/hmg/skm_lmg + + price_min = 5000 + price_max = 7000 + stock_max = 2 + availability_prob = 15 + spawn_weighting = FALSE diff --git a/code/modules/projectiles/guns/ballistic/hmg.dm b/code/modules/projectiles/guns/ballistic/hmg.dm index a55a26063f5f..1c318164ee76 100644 --- a/code/modules/projectiles/guns/ballistic/hmg.dm +++ b/code/modules/projectiles/guns/ballistic/hmg.dm @@ -65,6 +65,22 @@ else retract_bipod(user=user) +/obj/item/gun/ballistic/automatic/hmg/calculate_recoil(mob/user, recoil_bonus = 0) + var/total_recoil = recoil_bonus + + if(bipod_deployed) + total_recoil += deploy_recoil_bonus + + return ..(user, total_recoil) + +/obj/item/gun/ballistic/automatic/hmg/calculate_spread(mob/user, bonus_spread) + var/total_spread = bonus_spread + + if(bipod_deployed) + total_spread += deploy_spread_bonus + + return ..(user, total_spread) + /obj/item/gun/ballistic/automatic/hmg/proc/deploy_bipod(mob/user) //we check if we can actually deploy the thing var/can_deploy = TRUE