Wildlife & Farming

Flowers

Access every flower found across Dinkum's biomes, including the seed or foragable each grows from.


Type

Flower

FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the flower's icon, relative to images/
sourcestring[]?Where the flower is obtained
baseSellPricenumberBase sell price in Dinks
buyPricenumber?Purchase price, if purchasable
seedSeed | Foragable?The seed or foragable this flower grows from, if any
itemsDroppedResource[]?Items produced when harvested
locationsBiome[]Biomes the flower is found in
conditionsstring?Special growing conditions
growthPeriodnumber?Days to reach maturity
regrowthnumber?Days between harvests once mature

Resource is { name: string; img: string; count: number }. See TypeScript integration for the shared type.


Factory

import { flowers } from 'dinkum-data'

flowers() // all 46 flowers
flowers(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
byLocationbyLocation(biome: Biome)Filter to flowers found in the given biome.
import { flowers } from 'dinkum-data'

flowers().byLocation('Plains').get()

Sorts

MethodSignatureDefaultDescription
sortByGrowthPeriodsortByGrowthPeriod(order?: 'asc' | 'desc')'asc'Sort by growth period in days. Flowers without a growthPeriod sort as 0.

Terminal methods

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

Examples

import { flowers } from 'dinkum-data'

// Every flower in Bushlands, fastest-growing first
flowers().byLocation('Bushlands').sortByGrowthPeriod().get()

// Look up by name
flowers().findByName('Billy Button')

Next steps

Previous
Trees