Access every wild-foraged plant and item in Dinkum, with the biomes they're found in.
Type
Foragable
| Field | Type | Description |
|---|
id | string | Stable identifier |
name | string | Display name |
img | string | Path to the item's icon, relative to images/ |
source | string[]? | The plant or object this item is foraged from |
baseSellPrice | number | Base sell price in Dinks |
buyPrice | number? | Purchase price, if purchasable |
buffs | Buffs? | Consumable buff effects, if edible |
locations | Biome[]? | Biomes the item is found in |
Factory
import { foragables } from 'dinkum-data'
foragables()
foragables(source)
Filters
| Method | Signature | Description |
|---|
byLocation | byLocation(biome: Biome) | Filter to foragables found in the given biome. Items with no locations never match. |
import { foragables } from 'dinkum-data'
foragables().byLocation('Tropics').get()
Terminal methods
| Method | Returns | Description |
|---|
.get() | Foragable[] | All results |
.first() | Foragable | undefined | First result |
.find(id) | Foragable | undefined | Find by id |
.findByName(name) | Foragable | undefined | Case-insensitive exact name match |
.search(query) | Foragable[] | Case-insensitive partial name match |
.count() | number | Number of results |
Examples
import { foragables } from 'dinkum-data'
foragables().byLocation('Tropics').get()
foragables().findByName('Banana')
Next steps