Access every gathering and combat tool in Dinkum, with the license and source needed to unlock each.
Type
Tool
| Field | Type | Description |
|---|
id | string | Stable identifier |
name | string | Display name |
img | string | Path to the tool's icon, relative to images/ |
source | string[] | Where the tool is obtained |
baseSellPrice | number | Base sell price in Dinks |
buyPrice | number? | Purchase price, if purchasable |
damage | number | null | Damage dealt, or null for non-combat tools |
licence | string | License required to buy or use the tool |
shinyDiscCount | number? | Shiny Discs required to craft |
berkoniumOreCount | number? | Berkonium Ore required to craft |
inputs | Resource[]? | Other crafting inputs |
buyUnits | BuyUnits? | '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 { tools } from 'dinkum-data'
tools()
tools(source)
Filters
| Method | Signature | Description |
|---|
byLicence | byLicence(licence: string) | Filter to tools that require the given license (exact match, case-insensitive). |
bySource | bySource(source: string) | Filter to tools obtainable from the given source (case-insensitive substring match). |
import { tools } from 'dinkum-data'
tools().byLicence('Mining').get()
tools().bySource("John's Goods").get()
Sorts
| Method | Signature | Default | Description |
|---|
sortByDamage | sortByDamage(order?: 'asc' | 'desc') | 'desc' | Sort by damage. Tools with no damage (gathering tools, for example) sort as 0. |
Terminal methods
| Method | Returns | Description |
|---|
.get() | Tool[] | All results |
.first() | Tool | undefined | First result |
.find(id) | Tool | undefined | Find by id |
.findByName(name) | Tool | undefined | Case-insensitive exact name match |
.search(query) | Tool[] | Case-insensitive partial name match |
.count() | number | Number of results |
Examples
import { tools } from 'dinkum-data'
tools().byLicence('Mining').get()
tools().sortByDamage().get()
tools().bySource("John's Goods").get()
Next steps