Resources & Recipes

Paint

Access every paint color in Dinkum, used for customizing buildings and vehicles.


Type

Paint is an alias for BaseResource, with no extra fields.

interface Paint {
  id: string
  name: string
  img: string
  source?: string[]
  baseSellPrice: number
  buyPrice?: number
}
FieldTypeDescription
idstringStable identifier.
namestringDisplay name.
imgstringPath to the paint's icon, relative to images/.
sourcestring[]?Where the paint is obtained.
baseSellPricenumberBase sell price in Dinks.
buyPricenumber?Purchase price, if purchasable.

Factory

import { paint } from 'dinkum-data'

paint() // all 12 colors
paint(source) // wrap a pre-filtered array

Filters

bySource(source: string)

Filter to paint obtainable from the given source (case-insensitive substring match). Colors with no source never match.

paint().bySource('Deep Mine').get()

Terminal methods

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

Examples

import { paint } from 'dinkum-data'

// Every paint color found in the Deep Mine
paint().bySource('Deep Mine').get()

Next steps

Previous
Minerals
Next
Relics