mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-22 05:17:38 +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:
@@ -75,11 +75,11 @@
|
||||
. = ..()
|
||||
|
||||
else if(has_edge_icon)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(resource_indicator)
|
||||
add_overlay(resource_indicator)
|
||||
AddOverlays(resource_indicator)
|
||||
if(LAZYLEN(decals))
|
||||
add_overlay(decals)
|
||||
AddOverlays(decals)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/turf_to_check = get_step(src,direction)
|
||||
if(!istype(turf_to_check, type))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/structure/flora/tree/konyang/spring/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/konyang_tree
|
||||
icon_state = "beet_tree[rand(1, 3)]"
|
||||
return
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/obj/structure/flora/tree/konyang/blossom/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/konyang_tree
|
||||
icon_state = "blossom_beet_tree[rand(1, 3)]"
|
||||
return
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/structure/flora/tree/konyang/fall/Initialize(mapload)
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
overlays += /obj/effect/overlay/konyang_tree
|
||||
icon_state = "fall_beet_tree[rand(1, 3)]"
|
||||
return
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
I.appearance_flags = RESET_COLOR
|
||||
I.color = get_random_colour(0, 150, 255)
|
||||
I.plane = EFFECTS_ABOVE_LIGHTING_PLANE
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
set_light(0.3, 0.1, 2, l_color = I.color)
|
||||
|
||||
var/turf/simulated/floor/exoplanet/T = get_turf(src)
|
||||
if(istype(T))
|
||||
var/image/I = overlay_image(icon, "dugin", T.dirt_color, RESET_COLOR)
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
resource_indicator.alpha = rand(30, 60)
|
||||
gen_turf.resource_indicator = resource_indicator
|
||||
if(!gen_turf.density)
|
||||
gen_turf.add_overlay(resource_indicator)
|
||||
gen_turf.AddOverlays(resource_indicator)
|
||||
for(var/OT in ground_ore_levels[ground_resources_roll])
|
||||
var/rand_vals = ground_ore_levels[ground_resources_roll][OT]
|
||||
gen_turf.resources[OT] = rand(rand_vals[1], rand_vals[2])
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
C.targeting = FALSE
|
||||
targeting = O
|
||||
O.targeted_overlay = icon('icons/obj/overmap/overmap_effects.dmi', "lock")
|
||||
O.add_overlay(O.targeted_overlay)
|
||||
O.AddOverlays(O.targeted_overlay)
|
||||
if(designation && class && !obfuscated)
|
||||
if(!O.maptext)
|
||||
O.maptext = SMALL_FONTS(6, "[class] [designation]")
|
||||
@@ -207,6 +207,6 @@
|
||||
if(C)
|
||||
playsound(C, 'sound/items/rfd_interrupt.ogg', 70)
|
||||
if(O)
|
||||
O.cut_overlay(O.targeted_overlay)
|
||||
O.CutOverlays(O.targeted_overlay)
|
||||
O.maptext = null
|
||||
targeting = null
|
||||
|
||||
@@ -194,10 +194,10 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
|
||||
if(has_called_distress_beacon)
|
||||
var/image/distress_overlay = image('icons/obj/overmap/overmap_effects.dmi', "distress")
|
||||
applied_distress_overlay = distress_overlay
|
||||
add_overlay(applied_distress_overlay)
|
||||
AddOverlays(applied_distress_overlay)
|
||||
filters = filter(type = "outline", size = 2, color = COLOR_RED)
|
||||
else
|
||||
cut_overlay(applied_distress_overlay)
|
||||
CutOverlays(applied_distress_overlay)
|
||||
filters = null
|
||||
|
||||
/obj/effect/overmap/visitable/proc/update_name()
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
primer = P
|
||||
P.forceMove(src)
|
||||
var/image/OL = image(P.icon, P.primer_state, layer = layer - 0.01)
|
||||
add_overlay(OL)
|
||||
AddOverlays(OL)
|
||||
update_status()
|
||||
|
||||
/obj/item/ship_ammunition/longbow/proc/add_warhead(var/obj/item/warhead/W)
|
||||
if(W && !QDELETED(W))
|
||||
warhead = W
|
||||
W.forceMove(src)
|
||||
add_overlay(W.warhead_state)
|
||||
AddOverlays(W.warhead_state)
|
||||
impact_type = W.warhead_type
|
||||
ammunition_flags = initial(ammunition_flags)
|
||||
ammunition_flags |= SHIP_AMMO_FLAG_VERY_FRAGILE
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
/obj/machinery/shipsensors/update_icon()
|
||||
icon_state = "[base_icon_state]_off"
|
||||
if(!use_power)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
if(use_power)
|
||||
icon_state = "[base_icon_state]_on"
|
||||
@@ -475,11 +475,11 @@
|
||||
else
|
||||
overlay = "[overlay]5"
|
||||
|
||||
cut_overlays()
|
||||
add_overlay(overlay)
|
||||
ClearOverlays()
|
||||
AddOverlays(overlay)
|
||||
var/heat_percentage = heat / critical_heat * 100
|
||||
if(heat_percentage > 85)
|
||||
add_overlay("sensors-effect-hot")
|
||||
AddOverlays("sensors-effect-hot")
|
||||
|
||||
/obj/machinery/shipsensors/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/obj/machinery/iff_beacon/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(panel_open)
|
||||
icon_state += "_o"
|
||||
if(!operable() || !use_power)
|
||||
|
||||
Reference in New Issue
Block a user