diff --git a/code/__DEFINES/lighting.dm b/code/__DEFINES/lighting.dm
index b0a38ec8087..667038cd8b8 100644
--- a/code/__DEFINES/lighting.dm
+++ b/code/__DEFINES/lighting.dm
@@ -8,6 +8,8 @@
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
+#define LIGHTING_MINIMUM_POWER 0.1
+
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm
index 8555a33b04a..5f3cd7484ae 100644
--- a/code/game/gamemodes/nuclear/nuclearbomb.dm
+++ b/code/game/gamemodes/nuclear/nuclearbomb.dm
@@ -75,6 +75,13 @@ GLOBAL_VAR(bomb_set)
/obj/machinery/nuclearbomb/update_overlays()
. = ..()
+ underlays.Cut()
+ set_light(0)
+
+ if(!lighthack)
+ underlays += emissive_appearance(icon, "nuclearbomb_lightmask")
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
if(panel_open)
. += "npanel_open"
@@ -322,6 +329,7 @@ GLOBAL_VAR(bomb_set)
if(!lighthack)
flick("nuclearbombc", src)
icon_state = "nuclearbomb1"
+ update_icon(UPDATE_OVERLAYS)
extended = TRUE
return
if("auth")
@@ -401,6 +409,7 @@ GLOBAL_VAR(bomb_set)
if(timing)
if(!lighthack)
icon_state = "nuclearbomb2"
+ update_icon(UPDATE_OVERLAYS)
if(!safety)
message_admins("[key_name_admin(usr)] engaged a nuclear bomb [ADMIN_JMP(src)]")
if(!is_syndicate)
@@ -414,6 +423,7 @@ GLOBAL_VAR(bomb_set)
GLOB.bomb_set = FALSE
if(!lighthack)
icon_state = "nuclearbomb1"
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/nuclearbomb/blob_act(obj/structure/blob/B)
@@ -448,6 +458,7 @@ GLOBAL_VAR(bomb_set)
safety = TRUE
if(!lighthack)
icon_state = "nuclearbomb3"
+ update_icon(UPDATE_OVERLAYS)
playsound(src,'sound/machines/alarm.ogg',100,0,5)
if(SSticker && SSticker.mode)
SSticker.mode.explosion_in_progress = TRUE
@@ -502,6 +513,8 @@ GLOBAL_VAR(bomb_set)
if(!lighthack)
if(icon_state == "nuclearbomb2")
icon_state = "nuclearbomb1"
+ update_icon(UPDATE_OVERLAYS)
+
else
visible_message("[src] emits a quiet whirling noise!")
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index fd2d9ca6e0b..aa158f76545 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -214,6 +214,17 @@
luminosity = 0
circuit = /obj/item/circuitboard/camera/telescreen/entertainment
+/obj/machinery/computer/security/telescreen/entertainment/Initialize()
+ . = ..()
+ set_light(1, LIGHTING_MINIMUM_POWER) //so byond doesnt cull, and we get an emissive appearance
+
+/obj/machinery/computer/security/telescreen/entertainment/power_change()
+ ..()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
/obj/machinery/computer/security/wooden_tv
name = "security camera monitor"
desc = "An old TV hooked into the station's camera network."
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index 5bed31038cc..7da76757020 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -76,6 +76,13 @@
else
icon_state = "disco0"
+/obj/machinery/disco/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(active)
+ underlays += emissive_appearance(icon, "disco_lightmask")
+
/obj/machinery/disco/attack_hand(mob/user)
if(..())
return
@@ -125,7 +132,8 @@
playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1)
return
active = TRUE
- update_icon(UPDATE_ICON_STATE)
+ update_icon()
+ set_light(1, LIGHTING_MINIMUM_POWER) //for emmisive appearance
dance_setup()
START_PROCESSING(SSobj, src)
lights_spin()
@@ -480,7 +488,8 @@
STOP_PROCESSING(SSobj, src)
dance_over()
playsound(src,'sound/machines/terminal_off.ogg',50,1)
- icon_state = "disco0"
+ update_icon()
+ set_light(0)
stop = world.time + 100
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 8af106feae7..e8e6a52a9e5 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -44,6 +44,7 @@
GLOBAL_LIST_EMPTY(airlock_overlays)
+GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
/obj/machinery/door/airlock
name = "airlock"
@@ -97,6 +98,11 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
var/image/old_dam_overlay
var/image/old_note_overlay
+ var/mutable_appearance/old_buttons_underlay
+ var/mutable_appearance/old_lights_underlay
+ var/mutable_appearance/old_damag_underlay
+ var/mutable_appearance/old_sparks_underlay
+
var/doorOpen = 'sound/machines/airlock_open.ogg'
var/doorClose = 'sound/machines/airlock_close.ogg'
var/doorDeni = 'sound/machines/deniedbeep.ogg' // i'm thinkin' Deni's
@@ -348,14 +354,20 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
var/image/sparks_overlay
var/image/note_overlay
var/notetype = note_type()
+ var/mutable_appearance/buttons_underlay
+ var/mutable_appearance/lights_underlay
+ var/mutable_appearance/damag_underlay
+ var/mutable_appearance/sparks_underlay
switch(state)
if(AIRLOCK_CLOSED)
frame_overlay = get_airlock_overlay("closed", icon)
+ buttons_underlay = get_airlock_emissive_underlay("closed_lightmask", overlays_file)
if(airlock_material)
filling_overlay = get_airlock_overlay("[airlock_material]_closed", overlays_file)
else
filling_overlay = get_airlock_overlay("fill_closed", icon)
if(panel_open)
+ buttons_underlay = null
if(security_level)
panel_overlay = get_airlock_overlay("panel_closed_protected", overlays_file)
else
@@ -364,13 +376,17 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
weld_overlay = get_airlock_overlay("welded", overlays_file)
if(obj_integrity [src] isn't connected to anything!")
return TRUE
@@ -97,7 +97,7 @@
user.put_in_hands(charging)
charging = null
use_power = IDLE_POWER_USE
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/recharger/attack_tk(mob/user)
if(charging)
@@ -105,14 +105,14 @@
charging.forceMove(loc)
charging = null
use_power = IDLE_POWER_USE
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/recharger/process()
if(stat & (NOPOWER|BROKEN) || !anchored)
return
using_power = try_recharging_if_possible()
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/recharger/emp_act(severity)
if(stat & (NOPOWER|BROKEN) || !anchored)
@@ -132,7 +132,11 @@
/obj/machinery/recharger/power_change()
..()
- update_icon(UPDATE_ICON_STATE)
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/recharger/update_icon_state()
if(stat & (NOPOWER|BROKEN) || !anchored)
@@ -146,6 +150,21 @@
return
icon_state = icon_state_idle
+/obj/machinery/recharger/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(stat & NOPOWER)
+ return
+
+ if(charging)
+ if(using_power)
+ underlays += emissive_appearance(icon, "[icon_state_charging]_lightmask")
+ else
+ underlays += emissive_appearance(icon, "[icon_state_charged]_lightmask")
+ else
+ underlays += emissive_appearance(icon, "[icon_state_idle]_lightmask")
+
/obj/machinery/recharger/proc/get_cell_from(obj/item/I)
if(istype(I, /obj/item/gun/energy))
var/obj/item/gun/energy/E = I
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index b366c283e92..4232215405b 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -73,7 +73,11 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
/obj/machinery/requests_console/power_change()
..()
- update_icon(UPDATE_ICON_STATE)
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/requests_console/update_icon_state()
if(stat & NOPOWER)
@@ -82,6 +86,19 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
else
icon_state = "req_comp[newmessagepriority]"
+/obj/machinery/requests_console/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(stat & NOPOWER)
+ return
+
+ if(newmessagepriority == RQ_NONEW_MESSAGES)
+ underlays += emissive_appearance(icon, "req_comp_lightmask")
+ else
+ underlays += emissive_appearance(icon, "req_comp2_lightmask")
+
+
/obj/machinery/requests_console/Initialize(mapload)
Radio = new /obj/item/radio(src)
Radio.listening = TRUE
@@ -336,7 +353,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
capitalize(title)
if(newmessagepriority < priority)
newmessagepriority = priority
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
if(!silent)
playsound(loc, 'sound/machines/twobeep.ogg', 50, TRUE)
atom_say(title)
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index c5881886781..a2b1161f875 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -59,6 +59,27 @@
..()
if(SSradio)
SSradio.add_object(src, frequency)
+ update_icon()
+
+/obj/machinery/status_display/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(stat & NOPOWER)
+ return
+
+ if(picture_state)
+ . += picture_state
+
+ underlays += emissive_appearance(icon, "lightmask")
+
+/obj/machinery/status_display/power_change()
+ ..()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+ update_icon(UPDATE_OVERLAYS)
// timed process
/obj/machinery/status_display/process()
@@ -160,9 +181,9 @@
index2 = 0
/obj/machinery/status_display/proc/set_picture(state)
- picture_state = state
remove_display()
- overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
+ picture_state = state
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/status_display/proc/update_display(line1, line2, warning = 0)
line1 = uppertext(line1)
@@ -172,10 +193,10 @@
maptext = new_text
/obj/machinery/status_display/proc/remove_display()
- if(overlays.len)
- overlays.Cut()
if(maptext)
maptext = ""
+ picture_state = null
+ update_icon(UPDATE_OVERLAYS)
/obj/machinery/status_display/receive_signal(datum/signal/signal)
switch(signal.data["command"])
@@ -213,85 +234,91 @@
var/emotion = "Neutral"
+/obj/machinery/ai_status_display/Initialize(mapload)
+ . = ..()
+ update_icon()
+
/obj/machinery/ai_status_display/attack_ai(mob/living/silicon/ai/user)
if(isAI(user))
user.ai_statuschange()
-/obj/machinery/ai_status_display/process()
- if(stat & NOPOWER)
- overlays.Cut()
- return
- if(spookymode)
- spookymode = FALSE
- overlays.Cut()
- return
- update()
-
/obj/machinery/ai_status_display/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
..(severity)
return
- set_picture("ai_bsod")
+ mode = 2
+ update_icon()
..(severity)
+/obj/machinery/ai_status_display/power_change()
+ ..()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
/obj/machinery/ai_status_display/flicker()
if(stat & (NOPOWER | BROKEN))
return FALSE
spookymode = TRUE
+ update_icon()
return TRUE
-/obj/machinery/ai_status_display/proc/update()
- if(mode==0) //Blank
- overlays.Cut()
+/obj/machinery/ai_status_display/update_overlays()
+ . = ..()
+
+ var/new_display
+
+ underlays.Cut()
+
+ if(stat & NOPOWER)
return
- if(mode==1) // AI emoticon
- switch(emotion)
- if("Very Happy")
- set_picture("ai_veryhappy")
- if("Happy")
- set_picture("ai_happy")
- if("Neutral")
- set_picture("ai_neutral")
- if("Unsure")
- set_picture("ai_unsure")
- if("Confused")
- set_picture("ai_confused")
- if("Sad")
- set_picture("ai_sad")
- if("Surprised")
- set_picture("ai_surprised")
- if("Upset")
- set_picture("ai_upset")
- if("Angry")
- set_picture("ai_angry")
- if("BSOD")
- set_picture("ai_bsod")
- if("Blank")
- set_picture("ai_off")
- if("Problems?")
- set_picture("ai_trollface")
- if("Awesome")
- set_picture("ai_awesome")
- if("Dorfy")
- set_picture("ai_urist")
- if("Facepalm")
- set_picture("ai_facepalm")
- if("Friend Computer")
- set_picture("ai_friend")
- return
+ switch(mode)
+ if(0) //Blank
+ new_display = "ai_off"
- if(mode==2) // BSOD
- set_picture("ai_bsod")
- return
+ if(1) // AI emoticon
+ switch(emotion)
+ if("Very Happy")
+ new_display = "ai_veryhappy"
+ if("Happy")
+ new_display = "ai_happy"
+ if("Neutral")
+ new_display = "ai_neutral"
+ if("Unsure")
+ new_display = "ai_unsure"
+ if("Confused")
+ new_display = "ai_confused"
+ if("Sad")
+ new_display = "ai_sad"
+ if("Surprised")
+ new_display = "ai_surprised"
+ if("Upset")
+ new_display = "ai_upset"
+ if("Angry")
+ new_display = "ai_angry"
+ if("BSOD")
+ new_display = "ai_bsod"
+ if("Blank")
+ new_display = "ai_off"
+ if("Problems?")
+ new_display = "ai_trollface"
+ if("Awesome")
+ new_display = "ai_awesome"
+ if("Dorfy")
+ new_display = "ai_urist"
+ if("Facepalm")
+ new_display = "ai_facepalm"
+ if("Friend Computer")
+ new_display = "ai_friend"
+ if(2) // BSOD
+ new_display ="ai_bsod"
-/obj/machinery/ai_status_display/proc/set_picture(state)
- picture_state = state
- if(overlays.len)
- overlays.Cut()
- overlays += image('icons/obj/status_display.dmi', icon_state=picture_state)
+ . += new_display
+ underlays += emissive_appearance(icon, "lightmask")
#undef FONT_SIZE
#undef FONT_COLOR
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index 2d5e524a3eb..3e24240aa0a 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -307,6 +307,24 @@
density = TRUE
anchored = TRUE
+/**
+ Internal helper function
+
+ Prevents AI from using the teleporter, prints out failure messages for clarity
+*/
+/obj/machinery/teleport/proc/blockAI(atom/A)
+ if(istype(A, /mob/living/silicon/ai) || istype(A, /obj/structure/AIcore))
+ visible_message("The teleporter rejects the AI unit.")
+ if(istype(A, /mob/living/silicon/ai))
+ var/mob/living/silicon/ai/T = A
+ var/list/TPError = list("Firmware instructions dictate you must remain on your assigned station!",
+ "You cannot interface with this technology and get rejected!",
+ "External firewalls prevent you from utilizing this machine!",
+ "Your AI core's anti-bluespace failsafes trigger and prevent teleportation!")
+ to_chat(T, "[pick(TPError)]")
+ return TRUE
+ return FALSE
+
/obj/machinery/teleport/hub
name = "teleporter hub"
desc = "It's the hub of a teleporting machine."
@@ -413,6 +431,19 @@
else
icon_state = "tele0"
+/obj/machinery/teleport/hub/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(power_station && power_station.engaged && !panel_open)
+ underlays += emissive_appearance(icon, "tele1_lightmask")
+
+/obj/machinery/teleport/hub/proc/update_lighting()
+ if(power_station && power_station.engaged && !panel_open)
+ set_light(2, 1, "#f1f1bd")
+ else
+ set_light(0)
+
/obj/machinery/teleport/perma
name = "permanent teleporter"
desc = "A teleporter with the target pre-set on the circuit board."
@@ -425,6 +456,10 @@
var/target
var/tele_delay = 50
+/obj/machinery/teleport/perma/Initialize(mapload)
+ . = ..()
+ update_lighting()
+
/obj/machinery/teleport/perma/RefreshParts()
for(var/obj/item/circuitboard/teleporter_perma/C in component_parts)
target = C.target
@@ -434,24 +469,6 @@
tele_delay = max(A, 0)
update_icon(UPDATE_ICON_STATE)
-/**
- Internal helper function
-
- Prevents AI from using the teleporter, prints out failure messages for clarity
-*/
-/obj/machinery/teleport/proc/blockAI(atom/A)
- if(istype(A, /mob/living/silicon/ai) || istype(A, /obj/structure/AIcore))
- visible_message("The teleporter rejects the AI unit.")
- if(istype(A, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/T = A
- var/list/TPError = list("Firmware instructions dictate you must remain on your assigned station!",
- "You cannot interface with this technology and get rejected!",
- "External firewalls prevent you from utilizing this machine!",
- "Your AI core's anti-bluespace failsafes trigger and prevent teleportation!")
- to_chat(T, "[pick(TPError)]")
- return TRUE
- return FALSE
-
/obj/machinery/teleport/perma/Bumped(atom/A)
if(stat & (BROKEN|NOPOWER))
return
@@ -464,16 +481,19 @@
use_power(5000)
if(tele_delay)
recalibrating = TRUE
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+ update_lighting()
addtimer(CALLBACK(src, .proc/BumpedCallback), tele_delay)
/obj/machinery/teleport/perma/proc/BumpedCallback()
recalibrating = FALSE
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+ update_lighting()
/obj/machinery/teleport/perma/power_change()
..()
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+ update_lighting()
/obj/machinery/teleport/perma/update_icon_state()
if(panel_open)
@@ -483,6 +503,19 @@
else
icon_state = "tele0"
+/obj/machinery/teleport/perma/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(target && !recalibrating && !(stat & (BROKEN|NOPOWER)) && !panel_open)
+ underlays += emissive_appearance(icon, "tele1_lightmask")
+
+/obj/machinery/teleport/perma/proc/update_lighting()
+ if(target && !recalibrating && !panel_open && !(stat & (BROKEN|NOPOWER)))
+ set_light(2, 1, "#f1f1bd")
+ else
+ set_light(0)
+
/obj/machinery/teleport/perma/attackby(obj/item/I, mob/user, params)
if(exchange_parts(user, I))
return
@@ -584,7 +617,7 @@
/obj/machinery/teleport/station/screwdriver_act(mob/user, obj/item/I)
if(default_deconstruction_screwdriver(user, "controller-o", "controller", I))
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
return TRUE
/obj/machinery/teleport/station/wirecutter_act(mob/user, obj/item/I)
@@ -618,15 +651,23 @@
else
visible_message("No target detected.")
engaged = FALSE
- teleporter_hub.update_icon(UPDATE_ICON_STATE)
+ teleporter_hub.update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+ teleporter_hub.update_lighting()
if(istype(user))
add_fingerprint(user)
/obj/machinery/teleport/station/power_change()
..()
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+
if(teleporter_hub)
- teleporter_hub.update_icon(UPDATE_ICON_STATE)
+ teleporter_hub.update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
+ teleporter_hub.update_lighting()
+
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
/obj/machinery/teleport/station/update_icon_state()
if(panel_open)
@@ -635,3 +676,10 @@
icon_state = "controller-p"
else
icon_state = "controller"
+
+/obj/machinery/teleport/station/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(!(stat & NOPOWER) && !panel_open)
+ underlays += emissive_appearance(icon, "controller_lightmask")
diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm
index 2c82e3e2812..5a6e0c88835 100644
--- a/code/game/objects/items/devices/radio/intercom.dm
+++ b/code/game/objects/items/devices/radio/intercom.dm
@@ -7,6 +7,7 @@
w_class = WEIGHT_CLASS_BULKY
canhear_range = 2
flags = CONDUCT
+ blocks_emissive = FALSE
var/circuitry_installed = 1
var/buildstage = 0
var/custom_name
@@ -64,7 +65,7 @@
b_stat = TRUE
on = FALSE
GLOB.global_intercoms.Add(src)
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/item/radio/intercom/Initialize()
. = ..()
@@ -205,7 +206,7 @@
on = FALSE
b_stat = TRUE
buildstage = 1
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
update_operating_status(FALSE)
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
@@ -226,6 +227,13 @@
else
icon_state = "intercom[!on?"-p":""][b_stat ? "-open":""]"
+/obj/item/radio/intercom/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(on && buildstage == 3)
+ underlays += emissive_appearance(icon, "intercom_lightmask")
+
/obj/item/radio/intercom/proc/update_operating_status(on = TRUE)
var/area/current_area = get_area(src)
if(!current_area)
@@ -247,9 +255,11 @@
var/area/current_area = get_area(src)
if(!current_area)
on = FALSE
+ set_light(0)
else
on = current_area.powered(EQUIP) // set "on" to the equipment power status of our area.
- update_icon(UPDATE_ICON_STATE)
+ set_light(1, LIGHTING_MINIMUM_POWER)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/item/intercom_electronics
name = "intercom electronics"
diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm
index f0541acffd5..5467834f1ed 100644
--- a/code/game/objects/structures/barsign.dm
+++ b/code/game/objects/structures/barsign.dm
@@ -9,8 +9,11 @@
armor = list(MELEE = 20, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
var/list/barsigns=list()
var/list/hiddensigns
- var/prev_sign = ""
+ var/datum/barsign/current_sign
+ var/datum/barsign/prev_sign
var/panel_open = FALSE
+ blocks_emissive = FALSE
+ does_emissive = TRUE
/obj/structure/sign/barsign/Initialize(mapload)
. = ..()
@@ -27,16 +30,39 @@
/obj/structure/sign/barsign/proc/set_sign(datum/barsign/sign)
if(!istype(sign))
return
- icon_state = sign.icon
+ current_sign = sign
name = sign.name
+
if(sign.desc)
desc = sign.desc
else
desc = "It displays \"[name]\"."
+ update_icon()
+
+/obj/structure/sign/barsign/update_icon_state()
+ . = ..()
+
+ if(!current_sign || broken)
+ icon_state = "empty"
+ return
+ icon_state = current_sign.icon
+
+/obj/structure/sign/barsign/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(current_sign == "empty" || broken || !current_sign)
+ return
+
+ underlays |= emissive_appearance(icon, current_sign.icon)
+
/obj/structure/sign/barsign/obj_break(damage_flag)
if(!broken && !(flags & NODECONSTRUCT))
broken = TRUE
+ prev_sign = current_sign
+ set_light(0)
+ update_icon()
/obj/structure/sign/barsign/deconstruct(disassembled = TRUE)
new /obj/item/stack/sheet/metal(drop_location(), 2)
@@ -53,8 +79,6 @@
/obj/structure/sign/barsign/attack_ai(mob/user as mob)
return src.attack_hand(user)
-
-
/obj/structure/sign/barsign/attack_hand(mob/user as mob)
if(!src.allowed(user))
to_chat(user, "Access denied.")
@@ -64,9 +88,6 @@
return
pick_sign()
-
-
-
/obj/structure/sign/barsign/attackby(obj/item/I, mob/user)
if( istype(I, /obj/item/screwdriver))
if(!panel_open)
@@ -76,7 +97,8 @@
else
to_chat(user, "You close the maintenance panel.")
if(!broken && !emagged)
- set_sign(pick(barsigns))
+ set_sign(prev_sign)
+ set_light(1, LIGHTING_MINIMUM_POWER)
else if(emagged)
set_sign(new /datum/barsign/hiddensigns/syndibarsign)
else
@@ -100,15 +122,10 @@
else
return ..()
-
-
/obj/structure/sign/barsign/emp_act(severity)
set_sign(new /datum/barsign/hiddensigns/empbarsign)
broken = TRUE
-
-
-
/obj/structure/sign/barsign/emag_act(mob/user)
if(broken || emagged)
to_chat(user, "Nothing interesting happens!")
@@ -123,44 +140,30 @@
emagged = TRUE
req_access = list(ACCESS_SYNDICATE)
-
-
-
/obj/structure/sign/barsign/proc/pick_sign()
var/picked_name = input("Available Signage", "Bar Sign") as null|anything in barsigns
if(!picked_name)
return
set_sign(picked_name)
-
-
//Code below is to define useless variables for datums. It errors without these
-
-
-
/datum/barsign
var/name = "Name"
var/icon = "Icon"
var/desc = "desc"
var/hidden = 0
-
//Anything below this is where all the specific signs are. If people want to add more signs, add them below.
-
-
-
/datum/barsign/maltesefalcon
name = "Maltese Falcon"
icon = "maltesefalcon"
desc = "The Maltese Falcon, Space Bar and Grill."
-
/datum/barsign/thebark
name = "The Bark"
icon = "thebark"
desc = "Ian's bar of choice."
-
/datum/barsign/harmbaton
name = "The Harmbaton"
icon = "theharmbaton"
@@ -172,67 +175,56 @@
icon = "thesingulo"
desc = "Where people go that'd rather not be called by their name."
-
/datum/barsign/thedrunkcarp
name = "The Drunk Carp"
icon = "thedrunkcarp"
desc = "Don't drink and swim."
-
/datum/barsign/scotchservinwill
name = "Scotch Servin Willy's"
icon = "scotchservinwill"
desc = "Willy sure moved up in the world from clown to bartender."
-
/datum/barsign/officerbeersky
name = "Officer Beersky's"
icon = "officerbeersky"
desc = "Man eat a dong, these drinks are great."
-
/datum/barsign/thecavern
name = "The Cavern"
icon = "thecavern"
desc = "Fine drinks while listening to some fine tunes."
-
/datum/barsign/theouterspess
name = "The Outer Spess"
icon = "theouterspess"
desc = "This bar isn't actually located in outer space."
-
/datum/barsign/slipperyshots
name = "Slippery Shots"
icon = "slipperyshots"
desc = "Slippery slope to drunkeness with our shots!"
-
/datum/barsign/thegreytide
name = "The Grey Tide"
icon = "thegreytide"
desc = "Abandon your toolboxing ways and enjoy a lazy beer!"
-
/datum/barsign/honkednloaded
name = "Honked 'n' Loaded"
icon = "honkednloaded"
desc = "Honk."
-
/datum/barsign/thenest
name = "The Nest"
icon = "thenest"
desc = "A good place to retire for a drink after a long night of crime fighting."
-
/datum/barsign/thecoderbus
name = "The Coderbus"
icon = "thecoderbus"
desc = "A very controversial bar known for its wide variety of constantly-changing drinks."
-
/datum/barsign/theadminbus
name = "The Adminbus"
icon = "theadminbus"
@@ -391,27 +383,18 @@
/datum/barsign/hiddensigns
hidden = 1
-
//Hidden signs list below this point
-
-
-
/datum/barsign/hiddensigns/empbarsign
name = "Haywire Barsign"
icon = "empbarsign"
desc = "Something has gone very wrong."
-
-
/datum/barsign/hiddensigns/syndibarsign
name = "Syndi Cat Takeover"
icon = "syndibarsign"
desc = "Syndicate or die."
-
-
/datum/barsign/hiddensigns/signoff
name = "Bar Sign"
icon = "empty"
desc = "This sign doesn't seem to be on."
-
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index 869c19e5448..77c781b3280 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -41,6 +41,7 @@
/obj/structure/morgue/Initialize()
. = ..()
update_icon(update_state())
+ set_light(1, LIGHTING_MINIMUM_POWER)
/obj/structure/morgue/proc/update_state()
. = UPDATE_OVERLAYS
@@ -69,8 +70,10 @@
/obj/structure/morgue/update_overlays()
. = ..()
+ underlays.Cut()
if(!connected)
. += "morgue_[status]"
+ underlays += emissive_appearance(icon, "morgue_[status]")
if(name != initial(name))
. += "morgue_label"
diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm
index 3d2f300a174..a508140b7dd 100644
--- a/code/game/objects/structures/signs.dm
+++ b/code/game/objects/structures/signs.dm
@@ -8,6 +8,22 @@
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
blocks_emissive = EMISSIVE_BLOCK_GENERIC
+ var/does_emissive = FALSE
+
+/obj/structure/sign/Initialize(mapload)
+ . = ..()
+ if(does_emissive)
+ update_icon()
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
+/obj/structure/sign/update_overlays()
+ . = ..()
+
+ underlays.Cut()
+ if(!does_emissive)
+ return
+
+ underlays += emissive_appearance(icon,"[icon_state]_lightmask")
/obj/structure/sign/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
@@ -35,7 +51,6 @@
S.sign_state = icon_state
qdel(src)
-
/obj/item/sign
name = "sign"
desc = ""
@@ -213,11 +228,15 @@
name = "\improper barber shop sign"
desc = "A spinning sign indicating a barbershop is near."
icon_state = "barber"
+ does_emissive = TRUE
+ blocks_emissive = FALSE
/obj/structure/sign/chinese
name = "\improper chinese restaurant sign"
desc = "A glowing dragon invites you in."
icon_state = "chinese"
+ does_emissive = TRUE
+ blocks_emissive = FALSE
/obj/structure/sign/science
name = "\improper SCIENCE!"
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index e3f483b881e..60bdd940424 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -392,6 +392,15 @@
if(ATMOS_ALARM_DANGER)
icon_state = "alarm1"
+/obj/machinery/alarm/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(stat & NOPOWER || buildstage != AIR_ALARM_READY || wiresexposed || shorted)
+ return
+
+ underlays += emissive_appearance(icon, "alarm_lightmask")
+
/obj/machinery/alarm/proc/register_env_machine(m_id, device_type)
var/new_name
if(device_type=="AVP")
@@ -994,7 +1003,7 @@
coil.use(5)
buildstage = 2
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
first_run()
return
if(0)
@@ -1039,7 +1048,7 @@
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
wiresexposed = !wiresexposed
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
if(wiresexposed)
SCREWDRIVER_OPEN_PANEL_MESSAGE
else
@@ -1072,13 +1081,15 @@
/obj/machinery/alarm/power_change()
if(powered(power_channel))
stat &= ~NOPOWER
+ set_light(1, LIGHTING_MINIMUM_POWER)
else
stat |= NOPOWER
- update_icon(UPDATE_ICON_STATE)
+ set_light(0)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/alarm/obj_break(damage_flag)
..()
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/alarm/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
@@ -1099,7 +1110,7 @@
/obj/machinery/alarm/proc/unshort_callback()
if(shorted)
shorted = FALSE
- update_icon(UPDATE_ICON_STATE)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
/obj/machinery/alarm/proc/enable_ai_control_callback()
if(aidisabled)
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index aa5c5b4e85d..7acc368380d 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -40,6 +40,32 @@ log transactions
. = ..()
machine_id = "[station_name()] RT #[GLOB.num_financial_terminals++]"
reconnect_database()
+ update_icon()
+
+/obj/machinery/atm/update_icon_state()
+ . = ..()
+
+ if(stat & NOPOWER)
+ icon_state = "atm_off"
+ else
+ icon_state = "atm"
+
+/obj/machinery/atm/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(stat & NOPOWER)
+ return
+
+ underlays += emissive_appearance(icon, "atm_lightmask")
+
+/obj/machinery/atm/power_change()
+ ..()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
+ update_icon()
/obj/machinery/atm/process()
if(stat & NOPOWER)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index dc7ab3a4d9c..f9e61e99a41 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -933,6 +933,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
if(istype(M, /obj/machinery/ai_status_display))
var/obj/machinery/ai_status_display/AISD = M
AISD.emotion = emote
+ AISD.update_icon()
//if Friend Computer, change ALL displays
else if(istype(M, /obj/machinery/status_display))
diff --git a/code/modules/newscaster/obj/newscaster.dm b/code/modules/newscaster/obj/newscaster.dm
index 30b235fa2f9..75b3777f4e0 100644
--- a/code/modules/newscaster/obj/newscaster.dm
+++ b/code/modules/newscaster/obj/newscaster.dm
@@ -102,6 +102,11 @@
/obj/machinery/newscaster/update_overlays()
. = ..()
+ underlays.Cut()
+
+ if(!(stat & NOPOWER))
+ underlays += emissive_appearance(icon, "newscaster_lightmask")
+
if(!GLOB.news_network.wanted_issue && alert) //wanted icon state, there can be no overlays on it as it's a priority message
. += "newscaster_alert"
var/hp_percent = obj_integrity * 100 / max_integrity
@@ -117,6 +122,10 @@
/obj/machinery/newscaster/power_change()
..()
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
update_icon()
/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = TRUE, attack_dir)
@@ -422,6 +431,8 @@
return
GLOB.news_network.wanted_issue = null
set_temp("Wanted notice cleared.", update_now = TRUE)
+ for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
+ NC.update_icon()
return FALSE
if("toggle_mute")
is_silent = !is_silent
@@ -533,8 +544,7 @@
SSblackbox.record_feedback("amount", "newscaster_stories", 1)
var/announcement = FC.get_announce_text(title)
// Announce it
- for(var/nc in GLOB.allNewscasters)
- var/obj/machinery/newscaster/NC = nc
+ for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
NC.alert_news(announcement)
// Redirect and eject photo
LAZYINITLIST(last_views[user_name])
@@ -567,8 +577,7 @@
WN.admin_locked = usr.can_admin_interact() && admin_locked
WN.publish_time = world.time
// Announce it and eject photo
- for(var/nc in GLOB.allNewscasters)
- var/obj/machinery/newscaster/NC = nc
+ for(var/obj/machinery/newscaster/NC as anything in GLOB.allNewscasters)
NC.alert_news(wanted_notice = TRUE)
eject_photo(usr)
set_temp("Wanted notice distributed.", "good")
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index ca76140c39b..f77a13bcac2 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -247,6 +247,8 @@
make_terminal()
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
addtimer(CALLBACK(src, .proc/update), 5)
/obj/machinery/power/apc/examine(mob/user)
@@ -330,7 +332,7 @@
if(force_update || update & 1) // Updating the icon state
..(UPDATE_ICON_STATE)
-
+
if(!(update_state & UPSTATE_ALLGOOD))
if(managed_overlays)
..(UPDATE_OVERLAYS)
@@ -360,16 +362,31 @@
/obj/machinery/power/apc/update_overlays()
. = ..()
+ underlays.Cut()
+
+ if(update_state & UPSTATE_BLUESCREEN)
+ underlays += emissive_appearance(icon, "emit_apcemag")
+ return
if(!(update_state & UPSTATE_ALLGOOD))
return
if(!(stat & (BROKEN|MAINT)) && update_state & UPSTATE_ALLGOOD)
- . += status_overlays_lock[locked+1]
- . += status_overlays_charging[charging+1]
+ var/image/statover_lock = status_overlays_lock[locked + 1]
+ var/image/statover_charg = status_overlays_charging[charging + 1]
+ . += statover_lock
+ . += statover_charg
+ underlays += emissive_appearance(icon, statover_lock.icon_state)
+ underlays += emissive_appearance(icon, statover_charg.icon_state)
if(operating)
- . += status_overlays_equipment[equipment+1]
- . += status_overlays_lighting[lighting+1]
- . += status_overlays_environ[environ+1]
+ var/image/statover_equip = status_overlays_equipment[equipment + 1]
+ var/image/statover_light = status_overlays_lighting[lighting + 1]
+ var/image/statover_envir = status_overlays_environ[environ + 1]
+ . += statover_equip
+ . += statover_light
+ . += statover_envir
+ underlays += emissive_appearance(icon, statover_equip.icon_state)
+ underlays += emissive_appearance(icon, statover_light.icon_state)
+ underlays += emissive_appearance(icon, statover_envir.icon_state)
/obj/machinery/power/apc/proc/check_updates()
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 5edab32a23b..353e184d2b2 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -282,7 +282,7 @@
/obj/machinery/light/update_icon_state()
switch(status) // set icon_states
if(LIGHT_OK)
- if(emergency_mode)
+ if(emergency_mode || fire_mode)
icon_state = "[base_state]_emergency"
else
icon_state = "[base_state][on]"
@@ -296,6 +296,17 @@
icon_state = "[base_state]-broken"
on = FALSE
+/obj/machinery/light/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(status != LIGHT_OK || !on || !turning_on)
+ return
+ if(nightshift_enabled || emergency_mode || fire_mode)
+ underlays += emissive_appearance(icon, "[base_state]_emergency_lightmask")
+ else
+ underlays += emissive_appearance(icon, "[base_state]_lightmask")
+
/**
* Updates the light's 'on' state and power consumption based on [/obj/machinery/light/var/on].
*
@@ -367,7 +378,6 @@
return // Nothing's changed here
switchcount++
- update_icon()
if(trigger && (status == LIGHT_OK))
if(rigged)
log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast].")
@@ -381,6 +391,7 @@
return
use_power = ACTIVE_POWER_USE
+ update_icon()
set_light(BR, PO, CO)
if(play_sound)
playsound(src, 'sound/machines/light_on.ogg', 60, TRUE)
@@ -572,9 +583,11 @@
return
if(fire_mode)
set_light(nightshift_light_range, nightshift_light_power, bulb_emergency_colour)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
return
emergency_mode = TRUE
set_light(3, 1.7, bulb_emergency_colour)
+ update_icon(UPDATE_ICON_STATE | UPDATE_OVERLAYS)
RegisterSignal(current_area, COMSIG_AREA_POWER_CHANGE, .proc/update, override = TRUE)
/obj/machinery/light/proc/emergency_lights_off(area/current_area, obj/machinery/power/apc/current_apc)
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index 39635cad224..cbd24e105f9 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -145,6 +145,7 @@
else if(mode==-1)
mode=0
to_chat(user, "You [mode ? "unfasten": "fasten"] the screws around the power connection.")
+ update()
/obj/machinery/disposal/welder_act(mob/user, obj/item/I)
if(mode != required_mode_to_deconstruct)
@@ -315,30 +316,47 @@
// update the icon & overlays to reflect mode & status
/obj/machinery/disposal/proc/update()
- overlays.Cut()
if(stat & BROKEN)
- icon_state = "disposal-broken"
mode = 0
flush = 0
+
+ update_icon()
+
+/obj/machinery/disposal/update_icon_state()
+ . = ..()
+
+ if(stat & BROKEN)
+ icon_state = "disposal-broken"
return
- // flush handle
- if(flush)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-handle")
+ icon_state = initial(icon_state)
- // only handle is shown if no power
- if(stat & NOPOWER || mode == -1)
+/obj/machinery/disposal/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(flush)
+ . += "dispover-handle"
+
+ if(stat & (NOPOWER|BROKEN) || mode == -1)
return
// check for items in disposal - occupied light
if(contents.len > 0)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-full")
+ . += "dispover-full"
+ underlays += emissive_appearance(icon, "dispover-full")
// charging and ready light
- if(mode == 1)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-charge")
- else if(mode == 2)
- overlays += image('icons/obj/pipes/disposal.dmi', "dispover-ready")
+ switch(mode)
+ if(-1)
+ . += "dispover-unscrewed"
+ if(1)
+ . += "dispover-charge"
+ . += "dispover-panel"
+ underlays += emissive_appearance(icon, "dispover-charge")
+ if(2)
+ . += "dispover-ready"
+ underlays += emissive_appearance(icon, "dispover-ready")
// timed process
// charge the gas reservoir and perform flush if ready
@@ -436,6 +454,10 @@
/obj/machinery/disposal/power_change()
..() // do default setting/reset of stat NOPOWER bit
update() // update icon
+ if(stat & NOPOWER)
+ set_light(0)
+ else
+ set_light(1, LIGHTING_MINIMUM_POWER)
return
diff --git a/code/modules/security_levels/keycard_authentication.dm b/code/modules/security_levels/keycard_authentication.dm
index 209fe687b0c..5e48217d5f0 100644
--- a/code/modules/security_levels/keycard_authentication.dm
+++ b/code/modules/security_levels/keycard_authentication.dm
@@ -25,6 +25,22 @@
req_access = list(ACCESS_KEYCARD_AUTH)
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
+/obj/machinery/keycard_auth/update_icon_state()
+ . = ..()
+
+ if(event_triggered_by || event_source)
+ icon_state = "auth_on"
+ else
+ icon_state = "auth_off"
+
+/obj/machinery/keycard_auth/update_overlays()
+ . = ..()
+ underlays.Cut()
+
+ if(event_triggered_by || event_source)
+ underlays += emissive_appearance(icon, "auth_lightmask")
+
+
/obj/machinery/keycard_auth/attack_ai(mob/user as mob)
to_chat(user, "The station AI is not to interact with these devices.")
return
@@ -57,9 +73,9 @@
/obj/machinery/keycard_auth/power_change()
if(powered(ENVIRON))
stat &= ~NOPOWER
- icon_state = "auth_off"
else
stat |= NOPOWER
+ update_icon()
/obj/machinery/keycard_auth/attack_ghost(mob/user)
ui_interact(user)
@@ -115,12 +131,14 @@
swiping = FALSE
confirmed = FALSE
event_source = null
- icon_state = "auth_off"
event_triggered_by = null
event_confirmed_by = null
+ set_light(0)
+ update_icon()
/obj/machinery/keycard_auth/proc/broadcast_request()
- icon_state = "auth_on"
+ update_icon()
+ set_light(1, LIGHTING_MINIMUM_POWER)
for(var/obj/machinery/keycard_auth/KA in GLOB.machines)
if(KA == src) continue
KA.reset()
@@ -138,19 +156,24 @@
/obj/machinery/keycard_auth/proc/receive_request(obj/machinery/keycard_auth/source)
if(stat & (BROKEN|NOPOWER))
return
+
+ set_light(1, LIGHTING_MINIMUM_POWER)
+
event_source = source
busy = TRUE
active = TRUE
SStgui.update_uis(src)
- icon_state = "auth_on"
+ update_icon()
sleep(confirm_delay)
event_source = null
- icon_state = "auth_off"
+ update_icon()
active = FALSE
busy = FALSE
+ set_light(0)
+
/obj/machinery/keycard_auth/proc/trigger_event()
switch(event)
if("Red Alert")
diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm
index c3d6c2e53f7..789a6491289 100644
--- a/code/modules/security_levels/security_levels.dm
+++ b/code/modules/security_levels/security_levels.dm
@@ -123,6 +123,7 @@ GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/secur
for(var/obj/machinery/firealarm/FA in GLOB.machines)
if(is_station_contact(FA.z))
FA.update_icon()
+ FA.update_fire_light()
/proc/num2seclevel(num)
switch(num)
diff --git a/icons/obj/barsigns.dmi b/icons/obj/barsigns.dmi
index 3e2b18ab0a8..c1d1c5c9cb2 100644
Binary files a/icons/obj/barsigns.dmi and b/icons/obj/barsigns.dmi differ
diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi
index f3df608ed78..787d8524708 100644
Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ
diff --git a/icons/obj/decals.dmi b/icons/obj/decals.dmi
index 1412801fa40..a97c2625fe7 100644
Binary files a/icons/obj/decals.dmi and b/icons/obj/decals.dmi differ
diff --git a/icons/obj/doors/airlocks/abductor/overlays.dmi b/icons/obj/doors/airlocks/abductor/overlays.dmi
index 6bc8aae620f..93e10530346 100644
Binary files a/icons/obj/doors/airlocks/abductor/overlays.dmi and b/icons/obj/doors/airlocks/abductor/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/centcom/overlays.dmi b/icons/obj/doors/airlocks/centcom/overlays.dmi
index 7ec3486053f..94595a3e58b 100644
Binary files a/icons/obj/doors/airlocks/centcom/overlays.dmi and b/icons/obj/doors/airlocks/centcom/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/clockwork/overlays.dmi b/icons/obj/doors/airlocks/clockwork/overlays.dmi
index b34b73fb4e4..49a4089a893 100644
Binary files a/icons/obj/doors/airlocks/clockwork/overlays.dmi and b/icons/obj/doors/airlocks/clockwork/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/runed/cult-overlays.dmi b/icons/obj/doors/airlocks/cult/runed/cult-overlays.dmi
index 19920538d9d..05acec5750d 100644
Binary files a/icons/obj/doors/airlocks/cult/runed/cult-overlays.dmi and b/icons/obj/doors/airlocks/cult/runed/cult-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/runed/hell-overlays.dmi b/icons/obj/doors/airlocks/cult/runed/hell-overlays.dmi
index a1b9596b5b5..c7011d524f2 100644
Binary files a/icons/obj/doors/airlocks/cult/runed/hell-overlays.dmi and b/icons/obj/doors/airlocks/cult/runed/hell-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/runed/reaper-overlays.dmi b/icons/obj/doors/airlocks/cult/runed/reaper-overlays.dmi
index 429e0c92697..8612e9bdbfc 100644
Binary files a/icons/obj/doors/airlocks/cult/runed/reaper-overlays.dmi and b/icons/obj/doors/airlocks/cult/runed/reaper-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/unruned/cult-overlays.dmi b/icons/obj/doors/airlocks/cult/unruned/cult-overlays.dmi
index 5fb77f2676c..fda20a9eedf 100644
Binary files a/icons/obj/doors/airlocks/cult/unruned/cult-overlays.dmi and b/icons/obj/doors/airlocks/cult/unruned/cult-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/unruned/hell-overlays.dmi b/icons/obj/doors/airlocks/cult/unruned/hell-overlays.dmi
index 2bbc8e386d5..698bd3076cf 100644
Binary files a/icons/obj/doors/airlocks/cult/unruned/hell-overlays.dmi and b/icons/obj/doors/airlocks/cult/unruned/hell-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/cult/unruned/reaper-overlays.dmi b/icons/obj/doors/airlocks/cult/unruned/reaper-overlays.dmi
index 241f0794f2e..24813ae4fad 100644
Binary files a/icons/obj/doors/airlocks/cult/unruned/reaper-overlays.dmi and b/icons/obj/doors/airlocks/cult/unruned/reaper-overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/external/overlays.dmi b/icons/obj/doors/airlocks/external/overlays.dmi
index 1dde58ab5af..084ce9dd71f 100644
Binary files a/icons/obj/doors/airlocks/external/overlays.dmi and b/icons/obj/doors/airlocks/external/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/glass_large/overlays.dmi b/icons/obj/doors/airlocks/glass_large/overlays.dmi
index dccaca00255..eec7e845951 100644
Binary files a/icons/obj/doors/airlocks/glass_large/overlays.dmi and b/icons/obj/doors/airlocks/glass_large/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/hatch/overlays.dmi b/icons/obj/doors/airlocks/hatch/overlays.dmi
index affcbbf2ce4..bb9a7890f79 100644
Binary files a/icons/obj/doors/airlocks/hatch/overlays.dmi and b/icons/obj/doors/airlocks/hatch/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/highsec/overlays.dmi b/icons/obj/doors/airlocks/highsec/overlays.dmi
index 2a6868c34b9..498a705f7a7 100644
Binary files a/icons/obj/doors/airlocks/highsec/overlays.dmi and b/icons/obj/doors/airlocks/highsec/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/shuttle/overlays.dmi b/icons/obj/doors/airlocks/shuttle/overlays.dmi
index b2bb2cfa04a..0facf73209a 100644
Binary files a/icons/obj/doors/airlocks/shuttle/overlays.dmi and b/icons/obj/doors/airlocks/shuttle/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/station/overlays.dmi b/icons/obj/doors/airlocks/station/overlays.dmi
index 297adc05903..d41ae28a688 100644
Binary files a/icons/obj/doors/airlocks/station/overlays.dmi and b/icons/obj/doors/airlocks/station/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/station2/overlays.dmi b/icons/obj/doors/airlocks/station2/overlays.dmi
index 4cb389cbf2d..82f1251ddaf 100644
Binary files a/icons/obj/doors/airlocks/station2/overlays.dmi and b/icons/obj/doors/airlocks/station2/overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/survival/survival_overlays.dmi b/icons/obj/doors/airlocks/survival/survival_overlays.dmi
index f8e62144cd8..08c6df521d6 100644
Binary files a/icons/obj/doors/airlocks/survival/survival_overlays.dmi and b/icons/obj/doors/airlocks/survival/survival_overlays.dmi differ
diff --git a/icons/obj/doors/airlocks/vault/overlays.dmi b/icons/obj/doors/airlocks/vault/overlays.dmi
index f18346acf68..aa90ae06c7e 100644
Binary files a/icons/obj/doors/airlocks/vault/overlays.dmi and b/icons/obj/doors/airlocks/vault/overlays.dmi differ
diff --git a/icons/obj/doors/doorfire.dmi b/icons/obj/doors/doorfire.dmi
index 94ec8b967fb..d154a8436a0 100644
Binary files a/icons/obj/doors/doorfire.dmi and b/icons/obj/doors/doorfire.dmi differ
diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi
index 0f9cb470bf2..5c1dce5134b 100644
Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ
diff --git a/icons/obj/monitors.dmi b/icons/obj/monitors.dmi
index 7e8994446b5..bc45a663a76 100644
Binary files a/icons/obj/monitors.dmi and b/icons/obj/monitors.dmi differ
diff --git a/icons/obj/pipes/disposal.dmi b/icons/obj/pipes/disposal.dmi
index 18d97345686..0371511f87c 100644
Binary files a/icons/obj/pipes/disposal.dmi and b/icons/obj/pipes/disposal.dmi differ
diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi
index 999a855326f..54868606fd4 100644
Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ
diff --git a/icons/obj/radio.dmi b/icons/obj/radio.dmi
index 245b88283bf..6917e5b2066 100644
Binary files a/icons/obj/radio.dmi and b/icons/obj/radio.dmi differ
diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi
index 3279e0d7e4a..db0ff17cbf4 100755
Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ
diff --git a/icons/obj/status_display.dmi b/icons/obj/status_display.dmi
index 81ccc415de1..69919eeccd5 100644
Binary files a/icons/obj/status_display.dmi and b/icons/obj/status_display.dmi differ
diff --git a/icons/obj/terminals.dmi b/icons/obj/terminals.dmi
index c47cd86e6d3..f6541a96c4b 100644
Binary files a/icons/obj/terminals.dmi and b/icons/obj/terminals.dmi differ