From d166b40b2ce286d34415e2128cc87911b2296cbc Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Erikafox@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:31:22 -0500 Subject: [PATCH] Fix glowing guns (#3982) :cl: fix: guns no longer glow in the dark /:cl: Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com> --- code/modules/projectiles/gun.dm | 3 ++- code/modules/projectiles/guns/ballistic/assault.dm | 2 ++ code/modules/projectiles/guns/ballistic/marksman.dm | 2 ++ code/modules/projectiles/guns/ballistic/pistol.dm | 2 ++ code/modules/projectiles/guns/ballistic/smg.dm | 2 ++ .../guns/manufacturer/solar_armories/ballistic.dm | 9 +++++++++ 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 353630dfea74..f66dddfec9b5 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -34,6 +34,7 @@ light_range = 3 light_color = COLOR_VERY_SOFT_YELLOW + light_on = FALSE ///Icon state of the muzzle flash effect. var/muzzleflash_iconstate @@ -879,7 +880,7 @@ var/atom/movable/flash_loc = user if(!light_on) set_light_on(TRUE) - addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light_on), FALSE), 1 SECONDS) + addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light_on), FALSE), 3) //Offset the pixels. switch(firing_angle) diff --git a/code/modules/projectiles/guns/ballistic/assault.dm b/code/modules/projectiles/guns/ballistic/assault.dm index 70125488ccbe..a3247cc3dcf0 100644 --- a/code/modules/projectiles/guns/ballistic/assault.dm +++ b/code/modules/projectiles/guns/ballistic/assault.dm @@ -20,6 +20,8 @@ gunslinger_recoil_bonus = 2 gunslinger_spread_bonus = 16 + light_range = 2 + /obj/item/gun/ballistic/automatic/assault/skm name = "\improper SKM-24" desc = "An obsolete model of assault rifle once used by CLIP. Legendary for its durability and low cost, surplus rifles are commonplace on the Frontier, and the design has been widely copied. Chambered in 7.62x40mm CLIP." diff --git a/code/modules/projectiles/guns/ballistic/marksman.dm b/code/modules/projectiles/guns/ballistic/marksman.dm index 71458e24f1d2..9c89c551b124 100644 --- a/code/modules/projectiles/guns/ballistic/marksman.dm +++ b/code/modules/projectiles/guns/ballistic/marksman.dm @@ -5,3 +5,5 @@ zoomable = TRUE //this var as true without setting anything else produces a 2x zoom wield_slowdown = DMR_SLOWDOWN wield_delay = 1 SECONDS + + light_range = 2 diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index a6bbed500dfc..bd7a4728b188 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -19,6 +19,8 @@ wield_slowdown = PISTOL_SLOWDOWN muzzleflash_iconstate = "muzzle_flash_light" + light_range = 1 + /obj/item/gun/ballistic/automatic/pistol/deagle name = "\improper Desert Eagle" diff --git a/code/modules/projectiles/guns/ballistic/smg.dm b/code/modules/projectiles/guns/ballistic/smg.dm index 74d0a3f50860..52fb375b9424 100644 --- a/code/modules/projectiles/guns/ballistic/smg.dm +++ b/code/modules/projectiles/guns/ballistic/smg.dm @@ -11,6 +11,8 @@ recoil_unwielded = 4 w_class = WEIGHT_CLASS_BULKY + light_range = 1 + gun_firemodes = list(FIREMODE_SEMIAUTO, FIREMODE_FULLAUTO) default_firemode = FIREMODE_SEMIAUTO diff --git a/code/modules/projectiles/guns/manufacturer/solar_armories/ballistic.dm b/code/modules/projectiles/guns/manufacturer/solar_armories/ballistic.dm index ac0cad28c21f..a053a8146831 100644 --- a/code/modules/projectiles/guns/manufacturer/solar_armories/ballistic.dm +++ b/code/modules/projectiles/guns/manufacturer/solar_armories/ballistic.dm @@ -37,6 +37,9 @@ spread_unwielded = 12 fire_select_icon_state_prefix = "slug_" + //gauss doesn't explode so there's not light. + light_range = 0 + valid_attachments = list( /obj/item/attachment/laser_sight, /obj/item/attachment/rail_light, @@ -118,6 +121,9 @@ slot_flags = ITEM_SLOT_BACK + //gauss doesn't explode so there's not light. + light_range = 0 + valid_attachments = list( /obj/item/attachment/laser_sight, /obj/item/attachment/rail_light, @@ -160,6 +166,9 @@ slot_flags = ITEM_SLOT_BACK + //gauss doesn't explode so there's not light. + light_range = 0 + valid_attachments = list( /obj/item/attachment/laser_sight, /obj/item/attachment/rail_light,