Files
S.P.L.U.R.T-Station-13/code/datums/mutable_appearance.dm
CitadelStationBot 3c7520f1f1 [MIRROR] Makes light fixtures actually glow in the dark while on (And adds the necessary groundwork for other above lighting plane stuff) (#5687)
* Makes light fixtures actually glow in the dark while on (And adds the necessary groundwork for other above lighting plane stuff) (#35879)

* adds an above lighting layer, adds lighting overlays

* fixes wonkiness with broken and burned lights

* decreases overlay alpha a tad bit

* i gotta test this - removes new() override from mutable_appearance

* readds /mutable_appearance/New() for legacy behaviour

* Makes light fixtures actually glow in the dark while on (And adds the necessary groundwork for other above lighting plane stuff)
2018-02-24 06:08:23 -06:00

20 lines
928 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()
..()
plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var
// Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE)
var/mutable_appearance/MA = new()
MA.icon = icon
MA.icon_state = icon_state
MA.layer = layer
MA.plane = plane
return MA