@jeremyckahn/farmhand
Version:
A farming game
15 lines (11 loc) • 388 B
text/typescript
import { itemType } from '../enums.js'
import { isItemAGrownCrop } from './isItemAGrownCrop.js'
const FARM_PRODUCT_TYPES: farmhand.itemType[] = [
itemType.CRAFTED_ITEM,
itemType.FUEL,
itemType.MILK,
itemType.ORE,
itemType.STONE,
]
export const isItemAFarmProduct = (item: farmhand.item): boolean =>
Boolean(isItemAGrownCrop(item) || FARM_PRODUCT_TYPES.includes(item.type))