reserveCost
Call Signature
Section titled “Call Signature”reserveCost(
writer,entity,reservation,cost?):void
Takes cost off what entity may spend and holds it back under
reservation, so a second action cannot spend it too, until
commitCost spends that hold or refundCost returns it. Each
resource’s reserved is the total of every hold. checkCost first. A
predicted write, as changeResource: from a predicted system, or with
the room’s step. A hold already under reservation is a mechanic that
never settled its last one: a development world throws, naming the
key, and a deployed one keeps the first hold and holds nothing more.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
PredictedStep |
entity |
PredictedEntity |
reservation |
ReservationKey |
cost? |
ResourceCost |
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”reserveCost(
writer,entity,reservation,cost?):void
Takes cost off what entity may spend and holds it back under
reservation, so a second action cannot spend it too, until
commitCost spends that hold or refundCost returns it. Each
resource’s reserved is the total of every hold. checkCost first. A
predicted write, as changeResource: from a predicted system, or with
the room’s step. A hold already under reservation is a mechanic that
never settled its last one: a development world throws, naming the
key, and a deployed one keeps the first hold and holds nothing more.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
EntityAuthority |
entity |
Entity |
reservation |
ReservationKey |
cost? |
ResourceCost |
Returns
Section titled “Returns”void