refresh( ) → void
Forget the cached item table (after a game adds items at runtime).
item(id: ?) → void
An item's definition from inventoryKit, or nil.
name(id: ?) → void
The display name of an item.
set(id: ?, coins: ?) → void
Pin the shipping price of an item (nil puts it back to the item's own value).
| arg | type | description |
|---|
| id | ? | |
| coins | ? | |
base(id: ?) → void
The base value of an item before the rules scale it.
shippable(id: ?, r: ?) → void
Whether the shipping bin takes this item (tools and the watering can are refused, and with
rules r, anything that would pay nothing: a seed cheaper than 2 coins a seed in the store).
ship(id: ?, r: ?) → void
Coins the bin pays for one of an item under rules r. An item the farm store sells never ships
for more than Prices.STORE_SHARE (half) of its store unit price, rounded down, so buying to
sell is never a profit; harvests and everything the store does not sell keep their own value.
seed(harvestValue: ?, growDays: ?, r: ?) → void
What the store asks for a packet of seeds of a growable whose harvest is worth `harvestValue`.
| arg | type | description |
|---|
| harvestValue | ? | |
| growDays | ? | |
| r | ? | |
seedDefs( ) → void
seed item id -> the growable it plants, for every crop in cropsKit's catalog (other kits' too)
seedPack(def: ?, r: ?) → void
The store's packet for a growable's seeds under rules r: { item, price, qty }.
| arg | type | description |
|---|
| def | ? | |
| r | ? | |
seedPacks(r: ?) → void
Every seed packet the store can stock (all seasons) under rules r, keyed by seed item.
noteStoreEntry(item: ?, price: ?, qty: ?, r: ?) → void
Record a store entry the farm sells under rules r (FarmStore calls it for each priced entry it defines).
| arg | type | description |
|---|
| item | ? | |
| price | ? | |
| qty | ? | |
| r | ? | |
storeUnit(id: ?, r: ?) → void
The price of one unit of an item in the farm store under rules r, or nil when the store
does not sell it. Seeds are priced per packet from cropsKit's catalog; other noted entries
keep the unit price they were last defined at.