mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
* :) * that * move those there * refactor that too * wew * stuff * almost. * sigh * just need speed * stuf * pain * hm * tweaks * that * eh * wack * a * done * that's important * wacky * all that * fixes * typo * that * a * funny * that * that * woo * help im losing my fucking mind * okay * fix
29 lines
687 B
Plaintext
29 lines
687 B
Plaintext
/**
|
|
* Holds parallax information.
|
|
*/
|
|
/datum/parallax
|
|
/// List of parallax objects - these are cloned to a parallax holder using Clone on each.
|
|
var/list/atom/movable/screen/parallax_layer/objects
|
|
/// Parallax layers
|
|
var/layers = 0
|
|
|
|
/datum/parallax/New(create_objects = TRUE)
|
|
if(create_objects)
|
|
objects = CreateObjects()
|
|
layers = objects.len
|
|
|
|
/datum/parallax/Destroy()
|
|
QDEL_LIST(objects)
|
|
return ..()
|
|
|
|
/**
|
|
* Gets a new version of the objects inside - used when applying to a holder.
|
|
*/
|
|
/datum/parallax/proc/GetObjects()
|
|
. = list()
|
|
for(var/atom/movable/screen/parallax_layer/layer in objects)
|
|
. += layer.Clone()
|
|
|
|
/datum/parallax/proc/CreateObjects()
|
|
. = objects = list()
|