mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +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:
@@ -170,12 +170,12 @@
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(detail_color == COLOR_ASSEMBLY_BLACK) //Black colored overlay looks almost but not exactly like the base sprite, so just cut the overlay and avoid it looking kinda off.
|
||||
return
|
||||
var/image/detail_overlay = image('icons/obj/assemblies/electronic_setups.dmi', "[icon_state]-color")
|
||||
detail_overlay.color = detail_color
|
||||
add_overlay(detail_overlay)
|
||||
AddOverlays(detail_overlay)
|
||||
|
||||
/obj/item/device/electronic_assembly/GetAccess()
|
||||
. = list()
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
|
||||
/obj/item/device/electronic_assembly/clothing/update_icon()
|
||||
clothing.icon_state = "[initial(clothing.icon_state)][opened ? "-open" : ""]"
|
||||
clothing.cut_overlays()
|
||||
clothing.ClearOverlays()
|
||||
var/image/detail_overlay = image('icons/obj/assemblies/wearable_electronic_setups.dmi', "[initial(clothing.icon_state)][opened ? "-open" : ""]-color")
|
||||
detail_overlay.color = detail_color
|
||||
clothing.add_overlay(detail_overlay)
|
||||
clothing.AddOverlays(detail_overlay)
|
||||
clothing.update_clothing_icon()
|
||||
|
||||
// This is 'small' relative to the size of regular clothing assemblies.
|
||||
|
||||
@@ -198,10 +198,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/device/integrated_electronics/detailer/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
var/image/detail_overlay = image('icons/obj/assemblies/electronic_tools.dmi', "detailer-color")
|
||||
detail_overlay.color = detail_color
|
||||
add_overlay(detail_overlay)
|
||||
AddOverlays(detail_overlay)
|
||||
|
||||
/obj/item/device/integrated_electronics/detailer/attack_self(mob/user)
|
||||
var/color_choice = input(user, "Select color.", "Assembly Detailer", detail_color) as null|anything in color_list
|
||||
|
||||
Reference in New Issue
Block a user