Merge pull request #7735 from deathride58/abovelightinglayerairlocklights
Moves airlock lights to the above lighting layer. They now actually glow in the dark
This commit is contained in:
@@ -469,14 +469,15 @@
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(lights && hasPower())
|
||||
|
||||
if(locked)
|
||||
lights_overlay = get_airlock_overlay("lights_bolts", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_bolts", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(emergency)
|
||||
lights_overlay = get_airlock_overlay("lights_emergency", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_emergency", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
|
||||
|
||||
@@ -494,18 +495,18 @@
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_denied", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_denied", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay(notetype, note_overlay_file)
|
||||
|
||||
if(AIRLOCK_EMAG)
|
||||
frame_overlay = get_airlock_overlay("closed", icon)
|
||||
sparks_overlay = get_airlock_overlay("sparks", overlays_file)
|
||||
sparks_overlay = get_airlock_overlay("sparks", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(airlock_material)
|
||||
filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file)
|
||||
else
|
||||
@@ -516,9 +517,9 @@
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_closed", overlays_file)
|
||||
if(obj_integrity <integrity_failure)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_broken", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
else if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_damaged", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(welded)
|
||||
weld_overlay = get_airlock_overlay("welded", overlays_file)
|
||||
if(note)
|
||||
@@ -531,7 +532,7 @@
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_closing", icon)
|
||||
if(lights && hasPower())
|
||||
lights_overlay = get_airlock_overlay("lights_closing", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_closing", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(panel_open)
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_closing_protected", overlays_file)
|
||||
@@ -552,7 +553,7 @@
|
||||
else
|
||||
panel_overlay = get_airlock_overlay("panel_open", overlays_file)
|
||||
if(obj_integrity < (0.75 * max_integrity))
|
||||
damag_overlay = get_airlock_overlay("sparks_open", overlays_file)
|
||||
damag_overlay = get_airlock_overlay("sparks_open", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(note)
|
||||
note_overlay = get_airlock_overlay("[notetype]_open", note_overlay_file)
|
||||
|
||||
@@ -563,7 +564,7 @@
|
||||
else
|
||||
filling_overlay = get_airlock_overlay("fill_opening", icon)
|
||||
if(lights && hasPower())
|
||||
lights_overlay = get_airlock_overlay("lights_opening", overlays_file)
|
||||
lights_overlay = get_airlock_overlay("lights_opening", overlays_file, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
if(panel_open)
|
||||
if(security_level)
|
||||
panel_overlay = get_airlock_overlay("panel_opening_protected", overlays_file)
|
||||
@@ -583,13 +584,13 @@
|
||||
add_overlay(note_overlay)
|
||||
check_unres()
|
||||
|
||||
/proc/get_airlock_overlay(icon_state, icon_file)
|
||||
/proc/get_airlock_overlay(icon_state, icon_file, targetlayer = FLOAT_LAYER, targetplane = FLOAT_PLANE)
|
||||
var/obj/machinery/door/airlock/A
|
||||
pass(A) //suppress unused warning
|
||||
var/list/airlock_overlays = A.airlock_overlays
|
||||
var/iconkey = "[icon_state][icon_file]"
|
||||
if((!(. = airlock_overlays[iconkey])))
|
||||
. = airlock_overlays[iconkey] = mutable_appearance(icon_file, icon_state)
|
||||
. = airlock_overlays[iconkey] = mutable_appearance(icon_file, icon_state, targetlayer, targetplane)
|
||||
|
||||
/obj/machinery/door/airlock/proc/check_unres() //unrestricted sides. This overlay indicates which directions the player can access even without an ID
|
||||
if(hasPower() && unres_sides)
|
||||
@@ -614,7 +615,15 @@
|
||||
set_light(l_range = 2, l_power = 1)
|
||||
add_overlay(I)
|
||||
else
|
||||
set_light(0)
|
||||
if(lights && hasPower())
|
||||
if(locked)
|
||||
set_light(1, 0.1, "#0000FF")
|
||||
else if(emergency)
|
||||
set_light(1, 0.1, "#FFFF00")
|
||||
else
|
||||
set_light(0)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/door/airlock/do_animate(animation)
|
||||
switch(animation)
|
||||
|
||||
Reference in New Issue
Block a user