mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +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
@@ -106,11 +106,11 @@
|
||||
if(!S.blood_DNA)
|
||||
S.blood_DNA = list()
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay)
|
||||
S.AddOverlays(S.blood_overlay)
|
||||
if(S.blood_overlay && S.blood_overlay.color != basecolor)
|
||||
S.cut_overlay(S.blood_overlay, TRUE)
|
||||
S.CutOverlays(S.blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
S.blood_overlay.color = basecolor
|
||||
S.add_overlay(S.blood_overlay, TRUE)
|
||||
S.AddOverlays(S.blood_overlay, ATOM_ICON_CACHE_PROTECTED)
|
||||
if(blood_DNA)
|
||||
S.blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
@@ -217,8 +217,8 @@
|
||||
blood.Blend(basecolor,ICON_MULTIPLY)
|
||||
|
||||
icon = blood
|
||||
cut_overlays()
|
||||
add_overlay(giblets)
|
||||
ClearOverlays()
|
||||
AddOverlays(giblets)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gibup1","gibup1","gibup1")
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
color = "#FFFFFF"
|
||||
var/truedir = 0
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
track.fresh = 0
|
||||
track.overlay = I
|
||||
stack[stack_idx] = track
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "wet footprints"
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
shadeOverlay.Blend(shade,ICON_ADD)
|
||||
SSicon_cache.crayon_cache["[type]_s"] = shadeOverlay
|
||||
|
||||
add_overlay(list(mainOverlay, shadeOverlay))
|
||||
AddOverlays(list(mainOverlay, shadeOverlay))
|
||||
|
||||
add_hiddenprint(usr)
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/image/I = image(icon, icon_state = icon_state, dir = dir)
|
||||
I.color = color
|
||||
T.add_overlay(I, TRUE) // Register it as priority so we don't lose it on icon update.
|
||||
T.AddOverlays(I, ATOM_ICON_CACHE_PROTECTED) // Register it as protected so we don't lose it on icon update.
|
||||
qdel(src)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
if(prob(75))
|
||||
var/image/web_overlay = image(icon, icon_state = "[initial(icon_state)]-overlay[pick(1, 2, 3)]", layer = ABOVE_HUMAN_LAYER)
|
||||
add_overlay(web_overlay)
|
||||
AddOverlays(web_overlay)
|
||||
|
||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || height == 0)
|
||||
|
||||
Reference in New Issue
Block a user