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:
Cody Brittain
2024-05-01 07:46:27 +00:00
committed by GitHub
co-authored by Cody Brittain
parent 405a05b819
commit 9983fca311
350 changed files with 1626 additions and 1498 deletions
+3 -3
View File
@@ -294,14 +294,14 @@
name = "playing card"
desc = "A playing card."
cut_overlays()
ClearOverlays()
if(cards.len == 1)
var/datum/playingcard/P = cards[1]
var/image/I = new(src.icon, (concealed ? "[P.back_icon]" : "[P.card_icon]") )
I.pixel_x += (-5+rand(10))
I.pixel_y += (-5+rand(10))
add_overlay(I)
AddOverlays(I)
return
var/offset = FLOOR(20/cards.len, 1)
@@ -333,7 +333,7 @@
else
I.pixel_x = -7+(offset*i)
I.transform = M
add_overlay(I)
AddOverlays(I)
i++
/obj/item/hand/dropped(mob/user)
+4 -4
View File
@@ -48,15 +48,15 @@
var/muted = FALSE
/obj/item/gamehelm/update_icon()
cut_overlays()
ClearOverlays()
if(open)
icon_state = "open_[case_color]"
add_overlay("buttons_open")
AddOverlays("buttons_open")
else
icon_state = "closed_[case_color]"
add_overlay("buttons_closed")
AddOverlays("buttons_closed")
if(current_screen_state)
add_overlay(current_screen_state)
AddOverlays(current_screen_state)
/obj/item/gamehelm/process()
if(world.time < next_action_time)