Skip to content

Commit

Permalink
Fixes the flashdark (#21959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Moltijoe authored Apr 28, 2024
1 parent efddbb0 commit c1c71b3
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions code/game/objects/items/devices/flashlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -750,19 +750,12 @@
desc = "A strange device manufactured with mysterious elements that somehow emits darkness. Or maybe it just sucks in light? Nobody knows for sure."
icon_state = "flashdark"
item_state = "flashdark"
light_system = STATIC_LIGHT //The overlay light component is not yet ready to produce darkness.
light_range = 0
///Variable to preserve old lighting behavior in flashlights, to handle darkness.
var/dark_light_range = 2.5
///Variable to preserve old lighting behavior in flashlights, to handle darkness.
var/dark_light_power = -3

/obj/item/flashlight/flashdark/update_brightness(mob/user)
light_power = -2
light_range = 5

/obj/item/flashlight/flashdark/Initialize(mapload)
. = ..()
if(light_on)
set_light(dark_light_range, dark_light_power)
else
set_light(0)
set_light_color(COLOR_VELVET)

/obj/item/flashlight/eyelight
name = "eyelight"
Expand Down

0 comments on commit c1c71b3

Please sign in to comment.