Yummy bugfixes

This commit is contained in:
Cadyn
2020-10-27 19:58:49 -07:00
parent 2fde2bba09
commit 947fe850ff
5 changed files with 21 additions and 12 deletions

View File

@@ -77,12 +77,16 @@
update_lighting()
/obj/item/integrated_circuit/output/light/proc/update_lighting()
if(light_toggled)
if(assembly)
assembly.set_light(l_range = light_brightness, l_power = light_brightness, l_color = light_rgb)
else
if(assembly)
assembly.set_light(0)
//CHOMPEdit Begin
if(assembly)
var/atom/light_source = assembly
if(istype(assembly,/obj/item/device/electronic_assembly/clothing))
light_source = assembly.loc
if(light_toggled)
light_source.set_light(l_range = light_brightness, l_power = light_brightness, l_color = light_rgb)
else
light_source.set_light(0)
//CHOMPEdit End
power_draw_idle = light_toggled ? light_brightness * light_brightness : 0 // Should be the same draw as regular lights.
/obj/item/integrated_circuit/output/light/power_fail() // Turns off the flashlight if there's no power left.