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:
@@ -79,7 +79,7 @@
|
||||
to_chat(user, SPAN_NOTICE("There already is a string attached to this coin."))
|
||||
return
|
||||
if(CC.use(1))
|
||||
add_overlay("coin_string_overlay")
|
||||
AddOverlays("coin_string_overlay")
|
||||
string_attached = TRUE
|
||||
to_chat(user, SPAN_NOTICE("You attach a string to the coin."))
|
||||
else
|
||||
@@ -93,7 +93,7 @@
|
||||
var/obj/item/stack/cable_coil/CC = new /obj/item/stack/cable_coil(get_turf(user))
|
||||
CC.amount = 1
|
||||
CC.update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
string_attached = null
|
||||
to_chat(user, SPAN_NOTICE("You detach the string from the coin."))
|
||||
else ..()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
while(length(resource_field) && !harvesting.resources)
|
||||
harvesting.has_resources = FALSE
|
||||
harvesting.resources = null
|
||||
harvesting.cut_overlay(harvesting.resource_indicator)
|
||||
harvesting.CutOverlays(harvesting.resource_indicator)
|
||||
QDEL_NULL(harvesting.resource_indicator)
|
||||
resource_field -= harvesting
|
||||
if(length(resource_field))
|
||||
@@ -169,7 +169,7 @@
|
||||
if(!found_resource)
|
||||
harvesting.has_resources = FALSE
|
||||
harvesting.resources = null
|
||||
harvesting.cut_overlay(harvesting.resource_indicator)
|
||||
harvesting.CutOverlays(harvesting.resource_indicator)
|
||||
QDEL_NULL(harvesting.resource_indicator)
|
||||
resource_field -= harvesting
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/obj/machinery/mineral/processing_unit_console/Initialize(mapload, d, populate_components)
|
||||
. = ..()
|
||||
var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", plane = EFFECTS_ABOVE_LIGHTING_PLANE)
|
||||
add_overlay(screen_overlay)
|
||||
AddOverlays(screen_overlay)
|
||||
set_light(1.4, 1, COLOR_CYAN)
|
||||
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
@@ -265,7 +265,7 @@
|
||||
P.offset_y += 0
|
||||
P.ico += "paper_stamp-cent"
|
||||
P.stamped += /obj/item/stamp
|
||||
P.add_overlay(stampoverlay)
|
||||
P.AddOverlays(stampoverlay)
|
||||
P.stamps += "<HR><i>This paper has been stamped by the SCC Ore Processing System.</i>"
|
||||
|
||||
user.visible_message("\The [src] rattles and prints out a sheet of paper.")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/obj/machinery/mineral/stacking_unit_console/Initialize(mapload, d, populate_components)
|
||||
..()
|
||||
var/mutable_appearance/screen_overlay = mutable_appearance(icon, "production_console-screen", plane = EFFECTS_ABOVE_LIGHTING_PLANE)
|
||||
add_overlay(screen_overlay)
|
||||
AddOverlays(screen_overlay)
|
||||
set_light(1.4, 1, COLOR_CYAN)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
cell = new /obj/item/cell/high(src)
|
||||
key = new /obj/item/key/minecarts(src)
|
||||
var/image/I = new(icon = 'icons/obj/vehicles.dmi', icon_state = "[icon_state]_overlay", layer = src.layer + 0.2) //over mobs
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
turn_off()
|
||||
|
||||
/obj/vehicle/train/cargo/engine/mining/attackby(obj/item/attacking_item, mob/user)
|
||||
@@ -794,15 +794,15 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/lazarus_injector/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(loaded)
|
||||
var/mutable_appearance/filling = mutable_appearance(icon, "lazarus_filling")
|
||||
filling.color = mask_color
|
||||
add_overlay(filling)
|
||||
AddOverlays(filling)
|
||||
if(malfunctioning || emagged)
|
||||
var/mutable_appearance/static_fill = mutable_appearance(icon, "lazarus_static")
|
||||
static_fill.color = mask_color
|
||||
add_overlay(static_fill)
|
||||
AddOverlays(static_fill)
|
||||
icon_state = "lazarus_[loaded ? "loaded" : "spent"]"
|
||||
item_state = icon_state
|
||||
update_held_icon()
|
||||
@@ -1373,7 +1373,7 @@ var/list/total_extraction_beacons = list()
|
||||
user.forceMove(src.loc)
|
||||
var/image/W = image('icons/obj/mining.dmi',"fitnessweight-w")
|
||||
W.layer = 5.1
|
||||
add_overlay(W)
|
||||
AddOverlays(W)
|
||||
var/bragmessage = pick("pushing it to the limit","going into overdrive","burning with determination","rising up to the challenge", "getting strong now","getting ripped")
|
||||
user.visible_message(SPAN_NOTICE("<B>[user] is [bragmessage]!</B>"))
|
||||
var/reps = 0
|
||||
@@ -1396,7 +1396,7 @@ var/list/total_extraction_beacons = list()
|
||||
animate(user, pixel_y = 0, time = 3)
|
||||
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
|
||||
icon_state = "fitnessweight"
|
||||
cut_overlay(W)
|
||||
CutOverlays(W)
|
||||
to_chat(user, SPAN_NOTICE("[finishmessage]"))
|
||||
user.adjustNutritionLoss(5)
|
||||
user.adjustHydrationLoss(5)
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
/turf/unsimulated/floor/asteroid/ash/Initialize()
|
||||
. = ..()
|
||||
if (prob(20))
|
||||
add_overlay("asteroid[rand(0, 9)]", TRUE)
|
||||
AddOverlays("asteroid[rand(0, 9)]", TRUE)
|
||||
|
||||
/turf/unsimulated/floor/asteroid/ash/rocky
|
||||
name = "rocky ash"
|
||||
|
||||
@@ -417,7 +417,7 @@ var/list/mineral_can_smooth_with = list(
|
||||
new_turf.resources = old_resources
|
||||
new_turf.resource_indicator = old_resource_indicator
|
||||
if(new_turf.resource_indicator)
|
||||
new_turf.add_overlay(new_turf.resource_indicator)
|
||||
new_turf.AddOverlays(new_turf.resource_indicator)
|
||||
|
||||
return new_turf
|
||||
|
||||
@@ -898,7 +898,7 @@ var/list/asteroid_floor_smooth = list(
|
||||
return
|
||||
|
||||
/turf/unsimulated/floor/asteroid/proc/gets_dug(mob/user)
|
||||
add_overlay("asteroid_dug", TRUE)
|
||||
AddOverlays("asteroid_dug", TRUE)
|
||||
|
||||
if(prob(75))
|
||||
new /obj/item/ore/glass(src)
|
||||
@@ -952,7 +952,7 @@ var/list/asteroid_floor_smooth = list(
|
||||
|
||||
if(dug <= 10)
|
||||
dug += 1
|
||||
add_overlay("asteroid_dug", TRUE)
|
||||
AddOverlays("asteroid_dug", TRUE)
|
||||
else
|
||||
var/turf/below = GetBelow(src)
|
||||
if(below)
|
||||
|
||||
Reference in New Issue
Block a user