Files
Aurora.3/code/defines/mutable_appearance.dm
Cody Brittain d95734c606 Emissives (#18895)
A significant amount of influence was taken from
https://github.com/Baystation12/Baystation12/pull/33255, however adapted
to Aurora. Key things to note is the port of the newer alpha settings
from /tg/, among other improvements.

The ancient holographic and screen overlay code has been purged. This is
now handled with emissives, while holograms are handled with filters as
well.

---------

Co-authored-by: Cody Brittain <cbrittain10@live.com>
2024-05-12 20:51:45 +00:00

23 lines
943 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/New(mutable_appearance/to_copy)
..()
if(!to_copy)
plane = FLOAT_PLANE
// Helper similar to image()
/proc/mutable_appearance(icon, icon_state, color, flags = DEFAULT_APPEARANCE_FLAGS | RESET_COLOR | RESET_ALPHA, plane = FLOAT_PLANE, layer = FLOAT_LAYER)
RETURN_TYPE(/mutable_appearance)
var/mutable_appearance/MA = new()
MA.icon = icon
MA.icon_state = icon_state
MA.color = color
MA.appearance_flags = flags
MA.plane = plane
MA.layer = layer
return MA