mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-11 16:07:36 +01:00
cca0dfe7b6
Part one of our nefarious plans to destroy lag forever, and also accomplish some cool shit. This replaces our renderer system with plane masters, this will also be used to turn skyboxes into backdrops and thus totally remove skybox updating lag. Additionally, this will let us manipulate entire planes very easily to do all sorts of zany shit. All credit goes to the original coders, this is some seriously cool stuff. Also fixes some bizarre smoothing behaviour, reduces updateoverlays calls since now not every single structure in the game tries smoothing with nothing. <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/9b7cecd7-3c47-448b-9dd8-9b904640bf82" /> <img width="1349" height="1349" alt="image" src="https://github.com/user-attachments/assets/647d75a2-1bff-45ca-ab92-0aea10631afd" /> --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
25 lines
991 B
Plaintext
25 lines
991 B
Plaintext
// Mutable appearances are an inbuilt byond datastructure. Read the documentation on them by hitting F1 in DM.
|
|
// Basically use them instead of images for overlays/underlays and when changing an object's appearance if you're doing so with any regularity.
|
|
// Unless you need the overlay/underlay to have a different direction than the base object. Then you have to use an image due to a bug.
|
|
|
|
// Mutable appearances are children of images, just so you know.
|
|
|
|
/mutable_appearance
|
|
appearance_flags = DEFAULT_APPEARANCE_FLAGS //Bay shit
|
|
|
|
/mutable_appearance/New(mutable_appearance/to_copy)
|
|
..()
|
|
plane = FLOAT_PLANE
|
|
|
|
// Helper similar to image()
|
|
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE)
|
|
RETURN_TYPE(/mutable_appearance)
|
|
var/mutable_appearance/MA = new()
|
|
MA.icon = icon
|
|
MA.icon_state = icon_state
|
|
MA.layer = layer
|
|
MA.plane = plane
|
|
MA.alpha = alpha
|
|
MA.appearance_flags |= appearance_flags
|
|
return MA
|