World & Progression

Buildings

Every deed and collectable/movable building available in Dinkum, with construction costs and unlock conditions.


Type

Building

interface Building {
  id: string
  name: string
  img: string
  deedName: string
  size: string
  npc: string
  npcImg: string
  description: string
  buildTime: string
  deedPrice: number
  deedType: DeedType
  inputs: Resource[]
  operatingHours: string[]
  daysClosed: string
}
FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the building's icon, relative to images/
deedNamestringName of the deed item required to place the building
sizestringFootprint, for example "6x5"
npcstringNPC associated with the building
npcImgstringPath to that NPC's portrait
descriptionstringUnlock condition or flavor text
buildTimestringHow many nights construction takes
deedPricenumberPurchase price of the deed in Dinks
deedTypeDeedType'Collectable', 'Movable', or 'Reference'
inputsResource[]Materials required to build
operatingHoursstring[]Hours the building's associated shop or service is open
daysClosedstringDays the building is closed, if any

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


Factory

import { buildings } from 'dinkum-data'

buildings() // all 31 buildings
buildings(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
byDeedTypebyDeedType(type: DeedType)Filter by deed type.
byNPCbyNPC(npc: string)Filter to buildings tied to the given NPC (exact match, case-insensitive).
import { buildings } from 'dinkum-data'

buildings().byDeedType('Collectable').get()
buildings().byNPC('Nancy').get()

Sorts

MethodSignatureDefaultDescription
sortByDeedPricesortByDeedPrice(order?: 'asc' | 'desc')'asc'Sort by deed price, cheapest first.

Terminal methods

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

Examples

import { buildings } from 'dinkum-data'

// Every Collectable building, cheapest first
buildings().byDeedType('Collectable').sortByDeedPrice().get()

// Everything tied to Nancy
buildings().byNPC('Nancy').get()

// Look up by name
buildings().findByName('Airport')

Next steps

  • See NPCs for the residents tied to these buildings
  • Browse Licenses for the requirements that unlock some buildings
  • Read core concepts for the shared query builder pattern
Previous
Decorations
Next
NPCs