Skip to content

Commit

Permalink
Fix glowing guns (#3982)
Browse files Browse the repository at this point in the history
🆑
fix: guns no longer glow in the dark
/🆑

Co-authored-by: FalloutFalcon <[email protected]>
  • Loading branch information
Erikafox and FalloutFalcon authored Jan 15, 2025
1 parent ad2840e commit d166b40
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/ballistic/assault.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/ballistic/marksman.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/ballistic/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/ballistic/smg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d166b40

Please sign in to comment.