Resources & Recipes

Relics

Access every relic dug up from junk piles and sold to John or Franklyn in Dinkum.


Type

interface Relic {
  id: string
  name: string
  img: string
  baseSellPrice: number
  buyPrice?: number
  locations: string[]
  johnsSellPrice: number
  franklynsSellPrice?: number
}
FieldTypeDescription
idstringStable identifier.
namestringDisplay name.
imgstringPath to the relic's icon, relative to images/.
baseSellPricenumberBase sell price in Dinks.
buyPricenumber?Purchase price, if purchasable.
locationsstring[]Junk piles or sources the relic can be dug from.
johnsSellPricenumberSell price at John's Goods.
franklynsSellPricenumber?Sell price to Franklyn, if he buys it.

Factory

import { relics } from 'dinkum-data'

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

Filters

byLocation(location: string)

Filter to relics found at the given location (exact match, case-insensitive).

relics().byLocation('Old Barrel').get()

Sorts

sortByJohnsSellPrice(order?: 'asc' | 'desc')

Sort by John's sell price. Defaults to 'desc' (most valuable first).


Other methods

uniqueLocations()

Every distinct dig-site location across the current result set, alphabetically sorted. Useful for building a location filter without hand-maintaining a separate list.

relics().uniqueLocations()
// ["Car Relic", "Crab Pot", "John's Goods", "Old Barrel", "Satellite", "Wheelie Bin"]

Terminal methods

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

Examples

import { relics } from 'dinkum-data'

// Every relic from an Old Barrel, most valuable first
relics().byLocation('Old Barrel').sortByJohnsSellPrice().get()

Next steps

Previous
Paint