Merge pull request #7734 from deathride58/fancylightingwave2

Fancy lighting wave 2 - nonbinary colored lighting now applies to gun/helmet flashlights, borgs, bots, welders, and more
This commit is contained in:
nik707
2018-11-19 18:05:27 -06:00
committed by GitHub
13 changed files with 21 additions and 12 deletions
+3 -1
View File
@@ -4,6 +4,8 @@
icon_state = "hardhat0_yellow"
item_state = "hardhat0_yellow"
var/brightness_on = 4 //luminosity when on
light_color = "#FFCC66"
var/power_on = 0.8
var/on = FALSE
item_color = "yellow" //Determines used sprites: hardhat[on]_[item_color] and hardhat[on]_[item_color]2 (lying down sprite)
armor = list("melee" = 15, "bullet" = 5, "laser" = 20,"energy" = 10, "bomb" = 20, "bio" = 10, "rad" = 20, "fire" = 100, "acid" = 50)
@@ -29,7 +31,7 @@
A.UpdateButtonIcon()
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
set_light(brightness_on)
set_light(brightness_on, power_on)
/obj/item/clothing/head/hardhat/proc/turn_off(mob/user)
set_light(0)
+1 -1
View File
@@ -321,7 +321,7 @@
/obj/item/clothing/head/helmet/proc/update_helmlight(mob/user = null)
if(F)
if(F.on)
set_light(F.brightness_on)
set_light(F.brightness_on, F.flashlight_power, F.light_color)
else
set_light(0)
update_icon()
@@ -54,7 +54,7 @@
user.update_inv_head() //So the mob overlay updates
if(on)
set_light(brightness_on)
set_light(brightness_on, 0.8, "#FFCC66")
else
set_light(0)