mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +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
@@ -41,7 +41,7 @@
|
||||
..()
|
||||
on = TRUE
|
||||
set_light(0)
|
||||
add_overlay(image(icon, "[icon_state]_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image(icon, "[icon_state]_overlay", MOB_LAYER + 1))
|
||||
if(storage_type)
|
||||
storage_compartment = new storage_type(src)
|
||||
if(LAZYLEN(armor_values))
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
..()
|
||||
ion = new ion_type(src)
|
||||
turn_off()
|
||||
add_overlay(image(icon, "[icon_state]_off_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image(icon, "[icon_state]_off_overlay", MOB_LAYER + 1))
|
||||
icon_state = "[bike_icon]_off"
|
||||
if(storage_type)
|
||||
storage_compartment = new storage_type(src)
|
||||
@@ -256,13 +256,13 @@
|
||||
..()
|
||||
|
||||
/obj/vehicle/bike/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
if(on)
|
||||
add_overlay(image(icon, "[bike_icon]_on_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image(icon, "[bike_icon]_on_overlay", MOB_LAYER + 1))
|
||||
icon_state = "[bike_icon]_on"
|
||||
else
|
||||
add_overlay(image(icon, "[bike_icon]_off_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image(icon, "[bike_icon]_off_overlay", MOB_LAYER + 1))
|
||||
icon_state = "[bike_icon]_off"
|
||||
|
||||
..()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(ispath(key_type))
|
||||
key = new key_type(src)
|
||||
var/image/I = new(icon = icon, icon_state = "[icon_state]_overlay", layer = src.layer + 0.2) //over mobs
|
||||
add_overlay(I)
|
||||
AddOverlays(I)
|
||||
turn_off()
|
||||
|
||||
/obj/vehicle/train/cargo/engine/attack_hand(mob/user)
|
||||
@@ -354,7 +354,7 @@
|
||||
MA.pixel_y += load_offset_y
|
||||
MA.layer = VEHICLE_LOAD_LAYER
|
||||
|
||||
add_overlay(MA)
|
||||
AddOverlays(MA)
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/unload(var/mob/user, var/direction)
|
||||
if(istype(load, /datum/vehicle_dummy_load))
|
||||
@@ -362,7 +362,7 @@
|
||||
load = dummy_load.actual_load
|
||||
dummy_load.actual_load = null
|
||||
qdel(dummy_load)
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
..()
|
||||
|
||||
//-------------------------------------------------------
|
||||
|
||||
@@ -116,12 +116,12 @@
|
||||
PW.toggle_hoover()
|
||||
|
||||
/obj/vehicle/train/cargo/engine/pussywagon/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
if(on)
|
||||
add_overlay(image('icons/obj/vehicles.dmi', "[initial(icon_state)]_on_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image('icons/obj/vehicles.dmi', "[initial(icon_state)]_on_overlay", MOB_LAYER + 1))
|
||||
icon_state = "[initial(icon_state)]_on"
|
||||
else
|
||||
add_overlay(image('icons/obj/vehicles.dmi', "[initial(icon_state)]_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image('icons/obj/vehicles.dmi', "[initial(icon_state)]_overlay", MOB_LAYER + 1))
|
||||
icon_state = "[initial(icon_state)]"
|
||||
..()
|
||||
|
||||
@@ -249,10 +249,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/vehicle/train/cargo/trolley/pussywagon/update_icon()
|
||||
cut_overlays()
|
||||
ClearOverlays()
|
||||
|
||||
if(mopping)
|
||||
add_overlay(image('icons/obj/vehicles.dmi', "[icon_state]_mop_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image('icons/obj/vehicles.dmi', "[icon_state]_mop_overlay", MOB_LAYER + 1))
|
||||
|
||||
/obj/item/key/janicart
|
||||
name = "\improper C8000 deluxe custodial truck key fob"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/obj/vehicle/unicycle/Initialize()
|
||||
. = ..()
|
||||
add_overlay(image('icons/obj/vehicles.dmi', "unicycle_overlay", MOB_LAYER + 1))
|
||||
AddOverlays(image('icons/obj/vehicles.dmi', "unicycle_overlay", MOB_LAYER + 1))
|
||||
cell = new /obj/item/cell/high(src)
|
||||
|
||||
/obj/vehicle/unicycle/load(var/atom/movable/C)
|
||||
|
||||
Reference in New Issue
Block a user