Porting update_icon improvements. Part 1.
This commit is contained in:
@@ -48,13 +48,13 @@
|
||||
icon_state = initial(icon_state)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
if(stat & NOPOWER)
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. += "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. += icon_keyboard
|
||||
|
||||
// This whole block lets screens ignore lighting and be visible even in the darkest room
|
||||
// We can't do this for many things that emit light unfortunately because it layers over things that would be on top of it
|
||||
|
||||
@@ -103,21 +103,20 @@
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/aifixer/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/aifixer/update_overlays()
|
||||
. = ..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
. += "ai-fixer-on"
|
||||
if (occupier)
|
||||
switch (occupier.stat)
|
||||
if (0)
|
||||
. += "ai-fixer-full"
|
||||
if (2)
|
||||
. += "ai-fixer-404"
|
||||
else
|
||||
if(active)
|
||||
add_overlay("ai-fixer-on")
|
||||
if (occupier)
|
||||
switch (occupier.stat)
|
||||
if (0)
|
||||
add_overlay("ai-fixer-full")
|
||||
if (2)
|
||||
add_overlay("ai-fixer-404")
|
||||
else
|
||||
add_overlay("ai-fixer-empty")
|
||||
. += "ai-fixer-empty"
|
||||
|
||||
/obj/machinery/computer/aifixer/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
|
||||
if(!..())
|
||||
|
||||
@@ -78,23 +78,20 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/atmos_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/atmos_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
if(priority_alarms.len)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else if(minor_alarms.len)
|
||||
overlay_state = "alert:1"
|
||||
add_overlay("alert:1")
|
||||
else
|
||||
overlay_state = "alert:0"
|
||||
add_overlay("alert:0")
|
||||
. |= overlay_state
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
name = "incinerator chamber gas sensor"
|
||||
id_tag = ATMOS_GAS_MONITOR_SENSOR_INCINERATOR
|
||||
|
||||
/obj/machinery/air_sensor/update_icon()
|
||||
/obj/machinery/air_sensor/update_icon_state()
|
||||
icon_state = "gsensor[on]"
|
||||
|
||||
/obj/machinery/air_sensor/process_atmos()
|
||||
|
||||
@@ -175,11 +175,10 @@
|
||||
clockwork = TRUE //it'd look very weird
|
||||
light_power = 0
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
/obj/machinery/computer/security/telescreen/update_icon_state()
|
||||
icon_state = initial(icon_state)
|
||||
if(stat & BROKEN)
|
||||
icon_state += "b"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/security/telescreen/entertainment
|
||||
name = "entertainment monitor"
|
||||
|
||||
@@ -75,25 +75,23 @@
|
||||
L -= I
|
||||
return !cleared
|
||||
|
||||
/obj/machinery/computer/station_alert/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
/obj/machinery/computer/station_alert/update_overlays()
|
||||
. = ..()
|
||||
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
|
||||
var/overlay_state = icon_screen
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
add_overlay("[icon_keyboard]_off")
|
||||
. |= "[icon_keyboard]_off"
|
||||
return
|
||||
add_overlay(icon_keyboard)
|
||||
. |= icon_keyboard
|
||||
var/active_alarms = FALSE
|
||||
for(var/cat in alarms)
|
||||
var/list/L = alarms[cat]
|
||||
if(L.len)
|
||||
if(length(alarms[cat]))
|
||||
active_alarms = TRUE
|
||||
break
|
||||
if(active_alarms)
|
||||
overlay_state = "alert:2"
|
||||
add_overlay("alert:2")
|
||||
else
|
||||
overlay_state = "alert:0"
|
||||
add_overlay("alert:0")
|
||||
. |= overlay_state
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, layer, plane, dir)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
SSvis_overlays.add_vis_overlay(src, icon, overlay_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE, dir, alpha=128)
|
||||
@@ -44,8 +44,8 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] doesn't appear to be an uplink...</span>")
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/update_icon()
|
||||
..()
|
||||
/obj/machinery/computer/telecrystals/uplinker/update_overlays()
|
||||
. = ..()
|
||||
if(uplinkholder)
|
||||
add_overlay("[initial(icon_state)]-closed")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user