Merge pull request #25011 from PKPenguin321/flashdark

Adds flashdarks
This commit is contained in:
Cheridan
2017-03-17 17:09:27 -05:00
committed by GitHub
4 changed files with 14 additions and 2 deletions
+14 -2
View File
@@ -10,7 +10,8 @@
materials = list(MAT_METAL=50, MAT_GLASS=20)
actions_types = list(/datum/action/item_action/toggle_light)
var/on = 0
var/brightness_on = 4 //luminosity when on
var/brightness_on = 4 //range of light when on
var/flashlight_power //strength of the light when on. optional
/obj/item/device/flashlight/Initialize()
..()
@@ -19,7 +20,10 @@
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
if(on)
icon_state = "[initial(icon_state)]-on"
set_light(brightness_on)
if(flashlight_power)
set_light(l_range = brightness_on, l_power = flashlight_power)
else
set_light(brightness_on)
else
icon_state = initial(icon_state)
set_light(0)
@@ -397,3 +401,11 @@
name = initial(glowtype.name)
color = initial(glowtype.color)
. = ..()
/obj/item/device/flashlight/flashdark
name = "flashdark"
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"
brightness_on = 2.5
flashlight_power = -3
Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB