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)
@@ -11,7 +11,7 @@
circuit = /obj/item/circuitboard/machine/microwave
pass_flags = PASSTABLE
light_color = LIGHT_COLOR_YELLOW
light_power = 3
light_power = 0.9
var/operating = FALSE // Is it on?
var/dirty = 0 // = {0..100} Does it need cleaning?
var/broken = 0 // ={0,1,2} How broken is it???
@@ -71,6 +71,8 @@
var/lamp_max = 10 //Maximum brightness of a borg lamp. Set as a var for easy adjusting.
var/lamp_intensity = 0 //Luminosity of the headlamp. 0 is off. Higher settings than the minimum require power.
light_color = "#FFCC66"
light_power = 0.8
var/lamp_cooldown = 0 //Flag for if the lamp is on cooldown after being forcibly disabled.
var/sight_mode = 0
@@ -5,6 +5,8 @@
gender = NEUTER
mob_biotypes = list(MOB_ROBOTIC)
light_range = 3
light_power = 0.9
light_color = "#CDDDFF"
stop_automated_movement = 1
wander = 0
healable = 0
+1 -1
View File
@@ -386,7 +386,7 @@
/obj/item/gun/proc/update_gunlight(mob/user = null)
if(gun_light)
if(gun_light.on)
set_light(gun_light.brightness_on)
set_light(gun_light.brightness_on, gun_light.flashlight_power, gun_light.light_color)
else
set_light(0)
cut_overlays(flashlight_overlay, TRUE)