mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +01:00
Update SSOverlays (ported from Baystation) (#19051)
Our SSOverlays system is outdated, and is likely the cause of many of the issues seen in #18895. It has also been linked to a massive server performance decrease. This brings an updated system from Baystation, hopefully with speed increases. Should be testmerged, ideally with #18895. --------- Co-authored-by: Cody Brittain <cbrittain10@live.com>
This commit is contained in:
@@ -36,17 +36,17 @@
|
||||
|
||||
/obj/machinery/ntnet_relay/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(panel_open)
|
||||
icon_state += "_o"
|
||||
if(!operable())
|
||||
icon_state += "_off"
|
||||
else if(dos_failure)
|
||||
add_overlay("ntnet_o_problem")
|
||||
AddOverlays("ntnet_o_problem")
|
||||
else if(!enabled)
|
||||
add_overlay("ntnet_o_error")
|
||||
AddOverlays("ntnet_o_error")
|
||||
else
|
||||
add_overlay("ntnet_o_ok")
|
||||
AddOverlays("ntnet_o_ok")
|
||||
|
||||
/obj/machinery/ntnet_relay/process()
|
||||
if(operable())
|
||||
|
||||
@@ -165,19 +165,19 @@
|
||||
/obj/item/modular_computer/update_icon()
|
||||
icon_state = icon_state_unpowered
|
||||
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(damage >= broken_damage)
|
||||
icon_state = icon_state_broken
|
||||
add_overlay("broken")
|
||||
AddOverlays("broken")
|
||||
return
|
||||
if(!enabled)
|
||||
if(icon_state_screensaver && working)
|
||||
if (is_holographic)
|
||||
holographic_overlay(src, src.icon, icon_state_screensaver)
|
||||
else
|
||||
add_overlay(icon_state_screensaver)
|
||||
AddOverlays(icon_state_screensaver)
|
||||
if(icon_state_screensaver_key && working)
|
||||
add_overlay(icon_state_screensaver_key)
|
||||
AddOverlays(icon_state_screensaver_key)
|
||||
|
||||
if (screensaver_light_range && working && !flashlight)
|
||||
set_light(screensaver_light_range, light_power, screensaver_light_color ? screensaver_light_color : "#FFFFFF")
|
||||
@@ -190,16 +190,16 @@
|
||||
if (is_holographic)
|
||||
holographic_overlay(src, src.icon, state)
|
||||
else
|
||||
add_overlay(state)
|
||||
add_overlay(state_key)
|
||||
AddOverlays(state)
|
||||
AddOverlays(state_key)
|
||||
if(!flashlight)
|
||||
set_light(light_range, light_power, l_color = active_program.color)
|
||||
else
|
||||
if (is_holographic)
|
||||
holographic_overlay(src, src.icon, icon_state_menu)
|
||||
else
|
||||
add_overlay(icon_state_menu)
|
||||
add_overlay(icon_state_menu_key)
|
||||
AddOverlays(icon_state_menu)
|
||||
AddOverlays(icon_state_menu_key)
|
||||
if(!flashlight)
|
||||
set_light(light_range, light_power, l_color = menu_light_color)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
if(anchored)
|
||||
..()
|
||||
else
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(damage >= broken_damage)
|
||||
icon_state = icon_state_broken + "-closed"
|
||||
else
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
if(!P.stamped)
|
||||
P.stamped = new
|
||||
P.stamped += /obj/item/stamp
|
||||
P.add_overlay(stampoverlay)
|
||||
P.AddOverlays(stampoverlay)
|
||||
P.stamps += "<HR><i>This paper has been stamped by the Shipping Server.</i>"
|
||||
computer.visible_message(SPAN_NOTICE("\The [computer] prints out paper."))
|
||||
if("bounty_print")
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/paper_scanner/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(drive)
|
||||
add_overlay("paperscanner-drive")
|
||||
AddOverlays("paperscanner-drive")
|
||||
|
||||
/obj/item/paper_scanner/AltClick(mob/living/user)
|
||||
if(!drive)
|
||||
|
||||
Reference in New Issue
Block a user