mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +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:
co-authored by
Cody Brittain
parent
405a05b819
commit
9983fca311
@@ -37,7 +37,7 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
holder = null
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
attached_overlays = null
|
||||
|
||||
. = ..()
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
if(bombtank)
|
||||
icon_state = bombtank.icon_state
|
||||
if(bombassembly)
|
||||
add_overlay(bombassembly)
|
||||
add_overlay("bomb_assembly")
|
||||
AddOverlays(bombassembly)
|
||||
AddOverlays("bomb_assembly")
|
||||
|
||||
/obj/item/device/onetankbomb/attackby(obj/item/attacking_item, mob/user)
|
||||
if(istype(attacking_item, /obj/item/device/analyzer))
|
||||
|
||||
@@ -64,15 +64,15 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/assembly_holder/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(a_left)
|
||||
add_overlay("[a_left.icon_state]_left")
|
||||
AddOverlays("[a_left.icon_state]_left")
|
||||
for(var/O in a_left.attached_overlays)
|
||||
add_overlay("[O]_l")
|
||||
AddOverlays("[O]_l")
|
||||
if(a_right)
|
||||
add_overlay("[a_right.icon_state]_right")
|
||||
AddOverlays("[a_right.icon_state]_right")
|
||||
for(var/O in a_right.attached_overlays)
|
||||
add_overlay("[O]_r")
|
||||
AddOverlays("[O]_r")
|
||||
if(master)
|
||||
master.update_icon()
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
return secured
|
||||
|
||||
/obj/item/device/assembly/infra/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
add_overlay("infrared_on")
|
||||
AddOverlays("infrared_on")
|
||||
attached_overlays += "infrared_on"
|
||||
|
||||
if(holder)
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/prox_sensor/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
add_overlay("prox_timing")
|
||||
AddOverlays("prox_timing")
|
||||
attached_overlays += "prox_timing"
|
||||
if(scanning)
|
||||
add_overlay("prox_scanning")
|
||||
AddOverlays("prox_scanning")
|
||||
attached_overlays += "prox_scanning"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
time = 10
|
||||
|
||||
/obj/item/device/assembly/timer/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
add_overlay("timer_timing")
|
||||
AddOverlays("timer_timing")
|
||||
attached_overlays += "timer_timing"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
Reference in New Issue
Block a user