Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

addToRegistry

addToRegistry<Name, Value>(registry, registryEntry): Disposer

Sets name to value in registry, and returns what takes it out again while name still holds value: a later entry under the same name, such as a hot reload’s, belongs to whoever made it, so disposing the one it replaced leaves it. Each entry passes a value of its own, since two of one value are one owner. What each define* and register* of the engine sets its map with, for a plugin’s own registry, such as a kit’s spells by name.

Type Parameter
Name
Value
Parameter Type
registry Map<Name, Value>
registryEntry RegistryEntry<Name, Value>

Disposer