Skip to main content

Module index

Module index 

Source
Expand description

The references of a world: what each one names, from where, and where in which file it is written.

load_indexed_in loads a tree as load_edited_in does and also returns a ReferenceIndex of every reference the loader checked or followed. The other loads record nothing.

A reference is a value that names something else of the world by its identity: an object’s prototype or render layer, a portal’s plane and anchor, a value of a schema reference field, a zone’s parent, a plane’s default zone, a palette entry, a stairwell step’s prototype, what a transitions document names, a schema field’s definition type, a profile ground layer’s render layer, and the paths and identities by which the manifest, the profile and the defs/ layout tie files together (see Role). Values of json fields and custom objects are not looked into, so a name written there is not a reference here, and neither is anything a game’s own code reads from them. Nothing in the format references a stairwell or an object uid, so neither is ever a Target.

A declaration that names another item is a reference: a definition’s type names its definition type, and a chunk’s plane names its plane. An item’s own identity, such as a plane’s id or a definition’s id, is the item rather than a reference to it, so an item’s own files and identity are found from the World (its key, Chunk::path, its plane’s directory), not from the index.

An indexed load records nothing once the load has a problem, since it then returns diagnostics and no index, and it refuses, with a source.budget diagnostic, a tree whose references, strings or holders would not fit the index’s 32-bit numbering.

Structs§

Reference
One reference of a ReferenceIndex.
ReferenceIndex
The references of one load, interned, with lookups by target and by holder; see the module documentation for what is a reference.

Enums§

Holder
What holds a reference.
Role
Which kind of reference it is: what holds it, and what it is for.
Target
What a reference names.

Type Aliases§

ChunkKey
A chunk’s key in Plane::chunks: (layer, cx, cy).