Wildlife & Farming

Bugs

Access every Museum-donatable bug in Dinkum, with biome, rarity, season, and time-of-day data.


Type

Bug

Bug is an alias for PediaItem. See TypeScript integration for the full shared shape.

FieldTypeDescription
idstringStable identifier
namestringDisplay name
imgstringPath to the bug's icon, relative to images/
sourcestring[]?Where the bug is obtained
baseSellPricenumberBase sell price in Dinks
buyPricenumber?Purchase price, if purchasable
biomeBiome[]Biomes the bug is found in
timeFoundTimePeriod[]Times of day the bug is active: 'Morning', 'Day', 'Evening', 'Night', 'All'
seasonsSeason[]Seasons the bug is active
rarityRarityLevel'Common', 'Uncommon', 'Rare', 'Very Rare', or 'Super Rare'

Factory

import { bugs } from 'dinkum-data'

bugs() // all 50 bugs
bugs(source) // wrap a pre-filtered array

Filters

MethodSignatureDescription
byBiomebyBiome(biome: Biome)Filter to bugs found in the given biome.
byRaritybyRarity(rarity: RarityLevel)Filter by rarity.
bySeasonbySeason(season: Season)Filter to bugs active in the given season.
byTimebyTime(time: TimePeriod)Filter to bugs active during the given time period.
import { bugs } from 'dinkum-data'

bugs().byBiome('Pine Forests').get()
bugs().byRarity('Super Rare').get()
bugs().bySeason('Summer').get()
bugs().byTime('Night').get()

Sorts

MethodSignatureDefaultDescription
sortByBaseSellPricesortByBaseSellPrice(order?: 'asc' | 'desc')'desc'Sort by base sell price.

Terminal methods

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

Examples

import { bugs } from 'dinkum-data'

// Super rare bugs active at night in Autumn
bugs().byRarity('Super Rare').byTime('Night').bySeason('Autumn').get()

// Most valuable bugs
bugs().sortByBaseSellPrice().get()

Next steps

Previous
Animals