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

restoreResources

restoreResources(writer, entity, saved): void

Lays a save’s amounts on the resources entity has, after they are declared and its stats restored, with nothing held back, and takes each restored resource out of every reservation: a reload ends what held them. One it lacks, one the world has not installed, or one installed with saved: false, is left out, so it keeps where it starts. The first step caps each at its maximum. Its names are a save’s, text from outside the program.

Parameter Type
writer EntityAuthority
entity Entity
saved SavedResources

void