mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +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
@@ -145,7 +145,7 @@
|
||||
if(max_material_storage - TotalMaterials() < (amount * SHEET_MATERIAL_AMOUNT)) //Can't overfill
|
||||
amount = min(stack.get_amount(), round((max_material_storage - TotalMaterials()) / SHEET_MATERIAL_AMOUNT))
|
||||
|
||||
add_overlay("protolathe_[stack.default_type]")
|
||||
AddOverlays("protolathe_[stack.default_type]")
|
||||
CUT_OVERLAY_IN("protolathe_[stack.default_type]", 10)
|
||||
|
||||
busy = 1
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/r_n_d/tech_processor/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "[initial(icon_state)]_off"
|
||||
else if(!linked_server)
|
||||
@@ -82,4 +82,4 @@
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
if(panel_open)
|
||||
add_overlay("[initial(icon_state)]_open")
|
||||
AddOverlays("[initial(icon_state)]_open")
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
/obj/machinery/weapons_analyzer/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
var/icon/Icon_used
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
var/image/gun_overlay = image(Icon_used)
|
||||
gun_overlay.pixel_x += 7
|
||||
gun_overlay.pixel_y += 8
|
||||
add_overlay(gun_overlay)
|
||||
AddOverlays(gun_overlay)
|
||||
|
||||
/obj/machinery/weapons_analyzer/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
@@ -151,9 +151,9 @@
|
||||
/obj/machinery/suspension_gen/update_icon()
|
||||
icon_state = "suspension_[anchored ? (suspension_field ? "on" : "wrenched") : "loose"]"
|
||||
if(!screwed)
|
||||
add_overlay("suspension_panel")
|
||||
AddOverlays("suspension_panel")
|
||||
else
|
||||
cut_overlay("suspension_panel")
|
||||
CutOverlays("suspension_panel")
|
||||
|
||||
/obj/machinery/suspension_gen/get_cell()
|
||||
return cell
|
||||
|
||||
Reference in New Issue
Block a user