mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +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
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user