Fixes Borg Lighting Conflicts

Borg lights should be functional again.
Being on fire now makes you glow orange instead of white.  Intensity scales based on fire stacks.
This commit is contained in:
Neerti
2017-09-15 21:21:27 -04:00
parent 377e8f15c3
commit 55162bb099
5 changed files with 30 additions and 8 deletions
+18
View File
@@ -12,6 +12,8 @@
handle_modifiers() // Do this early since it might affect other things later.
handle_light()
if(stat != DEAD)
//Breathing, if applicable
handle_breathing()
@@ -191,3 +193,19 @@
/mob/living/proc/handle_hud_icons_health()
return
/mob/living/proc/handle_light()
if(instability >= TECHNOMANCER_INSTABILITY_MIN_GLOW)
var/distance = round(sqrt(instability / 2))
if(distance)
set_light(distance, distance * 4, l_color = "#660066")
return TRUE
else if(on_fire)
set_light(light_range + 3, round(fire_stacks), l_color = "#FF9933")
return TRUE
else
set_light(0)
return FALSE
+2 -2
View File
@@ -310,14 +310,14 @@
/mob/living/proc/IgniteMob()
if(fire_stacks > 0 && !on_fire)
on_fire = 1
set_light(light_range + 3)
handle_light()
update_fire()
/mob/living/proc/ExtinguishMob()
if(on_fire)
on_fire = 0
fire_stacks = 0
set_light(max(0, light_range - 3))
handle_light()
update_fire()
/mob/living/proc/update_fire()
@@ -12,6 +12,8 @@
handle_regular_status_updates()
handle_actions()
handle_instability()
// For some reason borg Life() doesn't call ..()
handle_light()
if(client)
handle_regular_hud_updates()
@@ -347,3 +349,10 @@
/mob/living/silicon/robot/fire_act()
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
IgniteMob()
/mob/living/silicon/robot/handle_light()
. = ..()
if(. == FALSE) // If no other light sources are on.
if(lights_on)
set_light(integrated_light_power, integrated_light_power, "#FFFFFF")
return TRUE
@@ -347,10 +347,7 @@
lights_on = !lights_on
usr << "You [lights_on ? "enable" : "disable"] your integrated light."
if(lights_on)
set_light(integrated_light_power) // 1.5x luminosity of flashlight
else
set_light(0)
handle_light()
/mob/living/silicon/robot/verb/self_diagnosis_verb()
set category = "Robot Commands"