Skip to content

Commit 4771cd7

Browse files
Fix glowing guns (#3982)
🆑 fix: guns no longer glow in the dark /🆑 Co-authored-by: FalloutFalcon <[email protected]>
1 parent ad2840e commit 4771cd7

File tree

6 files changed

+19
-1
lines changed

6 files changed

+19
-1
lines changed

Diff for: code/modules/projectiles/gun.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
light_range = 3
3636
light_color = COLOR_VERY_SOFT_YELLOW
37+
light_on = FALSE
3738

3839
///Icon state of the muzzle flash effect.
3940
var/muzzleflash_iconstate
@@ -879,7 +880,7 @@
879880
var/atom/movable/flash_loc = user
880881
if(!light_on)
881882
set_light_on(TRUE)
882-
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light_on), FALSE), 1 SECONDS)
883+
addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, set_light_on), FALSE), 3)
883884

884885
//Offset the pixels.
885886
switch(firing_angle)

Diff for: code/modules/projectiles/guns/ballistic/assault.dm

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
gunslinger_recoil_bonus = 2
2121
gunslinger_spread_bonus = 16
2222

23+
light_range = 2
24+
2325
/obj/item/gun/ballistic/automatic/assault/skm
2426
name = "\improper SKM-24"
2527
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 for: code/modules/projectiles/guns/ballistic/marksman.dm

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
zoomable = TRUE //this var as true without setting anything else produces a 2x zoom
66
wield_slowdown = DMR_SLOWDOWN
77
wield_delay = 1 SECONDS
8+
9+
light_range = 2

Diff for: code/modules/projectiles/guns/ballistic/pistol.dm

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
wield_slowdown = PISTOL_SLOWDOWN
2020

2121
muzzleflash_iconstate = "muzzle_flash_light"
22+
light_range = 1
23+
2224

2325
/obj/item/gun/ballistic/automatic/pistol/deagle
2426
name = "\improper Desert Eagle"

Diff for: code/modules/projectiles/guns/ballistic/smg.dm

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
recoil_unwielded = 4
1212
w_class = WEIGHT_CLASS_BULKY
1313

14+
light_range = 1
15+
1416
gun_firemodes = list(FIREMODE_SEMIAUTO, FIREMODE_FULLAUTO)
1517
default_firemode = FIREMODE_SEMIAUTO
1618

Diff for: code/modules/projectiles/guns/manufacturer/solar_armories/ballistic.dm

+9
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
spread_unwielded = 12
3838
fire_select_icon_state_prefix = "slug_"
3939

40+
//gauss doesn't explode so there's not light.
41+
light_range = 0
42+
4043
valid_attachments = list(
4144
/obj/item/attachment/laser_sight,
4245
/obj/item/attachment/rail_light,
@@ -118,6 +121,9 @@
118121

119122
slot_flags = ITEM_SLOT_BACK
120123

124+
//gauss doesn't explode so there's not light.
125+
light_range = 0
126+
121127
valid_attachments = list(
122128
/obj/item/attachment/laser_sight,
123129
/obj/item/attachment/rail_light,
@@ -160,6 +166,9 @@
160166

161167
slot_flags = ITEM_SLOT_BACK
162168

169+
//gauss doesn't explode so there's not light.
170+
light_range = 0
171+
163172
valid_attachments = list(
164173
/obj/item/attachment/laser_sight,
165174
/obj/item/attachment/rail_light,

0 commit comments

Comments
 (0)