mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-11 23:21:28 +00:00
* rnedering update * fixes * wack * wack * placeholder * sigh * sigh Co-authored-by: fake_vm_user <fake_vm_user>
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()
|