Skip to content

Purchase beta ​

Interface of @v12-engine/engine

ts
export interface Purchase

A purchase that may still be undone (undoBuy), kept on the buyer (purchases) for ShopSettings.undo seconds while it stands at the shop and has not used the item

Members ​

at ​

ts
at: number;

The game's time it was bought at

charges ​

ts
charges: number;

The charges the item had as bought, or the stack had with it: fewer, and it was used

id ​

ts
id: number;

The purchase's id: the id of the item instance bought (what undoBuy names it by)

into ​

ts
into?: number;

The stack it went into (its instance id), when it was stacked onto one carried rather than put in a slot of its own

item ​

ts
item: string;

The item type's id

ts
paid: Cost;

What was paid, given back whole

shop ​

ts
shop: number;

The shop it was bought at: the buyer has to be there still

stocked ​

ts
stocked: boolean;

Whether the shop counted it off its stock, to count it back

used ​

ts
used: ItemInstance[];

The parts it used up, as they were, to come back