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

commitCost

commitCost(writer, entity, reservation): void

Spends what reserveCost held back under reservation, as an action’s release does, writing the step’s tick into each resource’s spentTick, which pauses its regeneration. Every other reservation’s hold stays as it is, and a reservation that holds nothing spends nothing. A predicted write, as changeResource.

Parameter Type
writer PredictedStep
entity PredictedEntity
reservation ReservationKey

void

commitCost(writer, entity, reservation): void

Spends what reserveCost held back under reservation, as an action’s release does, writing the step’s tick into each resource’s spentTick, which pauses its regeneration. Every other reservation’s hold stays as it is, and a reservation that holds nothing spends nothing. A predicted write, as changeResource.

Parameter Type
writer EntityAuthority
entity Entity
reservation ReservationKey

void