-
Notifications
You must be signed in to change notification settings - Fork 523
Lazy Lists
The LAZY* helpers are a set of defines useful for working with lists in a way that only keeps them around when they're actually needed. Lazy list operators should not be used on lists that are passed by reference as they may break the reference.
Lazy lists are useful for lowering the memory usage of list heavy objects and should generally be preferred over standard lists.
LAZYADD(list, item)
- adds item
to list
. if list
is null, it is created.
LAZYREMOVE(list, item)
- removes item
from list
. If list
is null, nothing is done. If list
has 0 length after the item is removed, it is nulled out.
LAZYACCESS(list, index)
- accesses index
index of list
. if list
is null, null
is returned. If index
is a number and index
is greater than list.len
, null
is returned. Otherwise, value at list[index]
is returned.
LAZYLEN(list)
- gets the length of list
. If list
is null, returns 0
.
LAZYCLEARLIST(list)
- Clears list
via. Cut()
. If list
is null, nothing is done.
UNSETEMPTY(list)
- If list
has no length, it is nulled out. Otherwise, nothing is done.
LAZYINITLIST(list)
- If list
is null, a new list is created and assigned to list
.
A collection of standards and guidelines applied to the codebase.
Documentation regarding common APIs which speed up feature implementation and should be known by all coders.
- Atom Initialization
- Garbage, Queued Deletion, and Destroy
- Callbacks
- Timers
- Lazy Lists
- Overlays
- Processing APIs
- Common Helpers
- Global Listeners
- Singletons
Documentation for less used APIs that are not often needed.
Documentation regarding our implementation of StonedMC (SMC).