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

ReservationsTrait

const ReservationsTrait: Trait<() => Record<string, ReservedAmounts>>

On an entity, each cost a reservation holds back, by the reservation’s key: what commitCost spends and refundCost returns of that key alone. Each resource’s reserved is the total of every key’s hold. Predicted, beside the resources it holds back, so a correction restores both together; on anything but a player’s character, room state.