From fd5c6358401edc42d0356094cb83d7d41b18f7ec Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Sun, 17 May 2020 17:59:50 -0700 Subject: [PATCH] adds a snowflakey-ish(??? maybe???) way to modify gun damage so we don't need more shot types for improvised shotguns (#12274) * Update gun.dm * Update _firing.dm * Update code/modules/projectiles/ammunition/_firing.dm Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> --- code/modules/projectiles/ammunition/_firing.dm | 4 ++++ code/modules/projectiles/gun.dm | 3 +++ 2 files changed, 7 insertions(+) diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index 848163d658..1a6786524c 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -31,6 +31,10 @@ else BB.def_zone = user.zone_selected BB.suppressed = quiet + + if(isgun(fired_from)) + var/obj/item/gun/G = fired_from + BB.damage *= G.projectile_damage_multiplier if(reagents && BB.reagents) reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 9c1a23174e..cf9e606ffc 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -76,6 +76,9 @@ var/datum/action/item_action/toggle_scope_zoom/azoom var/dualwield_spread_mult = 1 //dualwield spread multiplier + + /// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun. + var/projectile_damage_multiplier = 1 /obj/item/gun/Initialize() . = ..()