Wildlife & Farming

Foragables

Access every wild-foraged plant and item in Dinkum, with the biomes they're found in.


Type

Foragable

FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the item's icon, relative to images/
sourcestring[]?The plant or object this item is foraged from
baseSellPricenumberBase sell price in Dinks
buyPricenumber?Purchase price, if purchasable
buffsBuffs?Consumable buff effects, if edible
locationsBiome[]?Biomes the item is found in

Factory

import { foragables } from 'dinkum-data'

foragables() // all 42 items
foragables(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
byLocationbyLocation(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

MethodReturnsDescription
.get()Foragable[]All results
.first()Foragable | undefinedFirst result
.find(id)Foragable | undefinedFind by id
.findByName(name)Foragable | undefinedCase-insensitive exact name match
.search(query)Foragable[]Case-insensitive partial name match
.count()numberNumber of results

Examples

import { foragables } from 'dinkum-data'

// Everything foraged in the Tropics
foragables().byLocation('Tropics').get()

// Look up by name
foragables().findByName('Banana')

Next steps

Previous
Seeds
Next
Trees