Resources & Recipes

Minerals

Access every ore, gemstone, and other mineral in Dinkum, with the biomes they're found in.


Type

interface Mineral {
  id: string
  name: string
  img: string
  source?: string[]
  baseSellPrice: number
  buyPrice?: number
  locations?: Biome[]
}
FieldTypeDescription
idstringStable identifier.
namestringDisplay name.
imgstringPath to the mineral's icon, relative to images/.
sourcestring[]?How the mineral is obtained, if not simply mined.
baseSellPricenumberBase sell price in Dinks.
buyPricenumber?Purchase price, if purchasable.
locationsBiome[]?Biomes the mineral is found in.

Factory

import { minerals } from 'dinkum-data'

minerals() // all 15 minerals
minerals(source) // wrap a pre-filtered array

Filters

byLocation(biome: Biome)

Filter to minerals found in the given biome. Minerals with no locations never match.

minerals().byLocation('Island Reef').get()

Terminal methods

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

Examples

import { minerals } from 'dinkum-data'

// Every mineral found in the Island Reef
minerals().byLocation('Island Reef').get()

// Look up by name
minerals().findByName('Berkonium Ore')

Next steps

Previous
Animal products
Next
Paint