Gear & Equipment

Weapons

Access every melee and ranged weapon in Dinkum, with their damage and source.


Type

Weapon

FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the weapon's icon, relative to images/
sourcestring[]Where the weapon is obtained
baseSellPricenumberBase sell price in Dinks
buyPricenumber?Purchase price, if purchasable
damagenumber | nullDamage dealt
licenceLevelnumber | nullLicense level required, or null if none
inputsResource[]?Crafting inputs
buyUnitsBuyUnits?'Dinks' or 'Permit Points', when purchasable

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


Factory

import { weapons } from 'dinkum-data'

weapons() // all 32 weapons
weapons(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
bySourcebySource(source: string)Filter to weapons obtainable from the given source (case-insensitive substring match).
import { weapons } from 'dinkum-data'

weapons().bySource('Ted Selly').get()

Sorts

MethodSignatureDefaultDescription
sortByDamagesortByDamage(order?: 'asc' | 'desc')'desc'Sort by damage.

Terminal methods

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

Examples

import { weapons } from 'dinkum-data'

// Everything sold by Ted Selly, strongest first
weapons().bySource('Ted Selly').sortByDamage().get()

// The strongest weapon in the game
weapons().sortByDamage().first()

Next steps

  • See Tools for gathering and utility tools
  • Browse Equipment for placeable and wearable equipment
  • Read the query builder guide for more filter patterns
Previous
Tools