import { ItemCategory } from "./itemCategories.js"; import { MaterialTier, GatherMaterialId } from "./materialTiers.js"; const DEFAULT_STACK = 99; /** * Reserved numeric IDs for gathering, crafting, and cooking content (9–25). * Metal ores/bars/pickaxes above bronze live in metalItems.js (35+). * IDs 11 / 12 / 25 are cotton fibre / yarn / cloth (see clothItems.js). */ export const CraftingItemId = Object.freeze({ tinderbox: 10, copperOre: 13, bronzeBar: 14, rawMeat: 15, cookedMeat: 16, leather: 17, arrowTip: 18, arrow: 19, bronzeAxe: 20, bronzePickaxe: 21, fishingRod: 22, fishingNet: 23, rawFish: 24, tinOre: 53 }); function stub (itemId, key, displayName, category, extra = {}) { return Object.freeze({ itemId, key, displayName, description: extra.description ?? "An unfinished good awaiting a proper name.", seedValue: extra.seedValue ?? 1, stackable: extra.stackable ?? true, maxStackSize: extra.maxStackSize ?? DEFAULT_STACK, uniqueInstance: false, category, stub: true, iconKey: extra.iconKey ?? "paper", ...extra }); } /** Minimal defs so recipes and the craft UI can resolve names/icons before art exists. */ export const CRAFTING_ITEM_STUBS = Object.freeze({ [CraftingItemId.tinderbox]: stub(CraftingItemId.tinderbox, "tinderbox", "Tinderbox", ItemCategory.tool, { stackable: false, maxStackSize: 1, description: "A small kit for striking sparks onto dry tinder." }), [CraftingItemId.copperOre]: Object.freeze({ itemId: CraftingItemId.copperOre, key: "copper-ore", displayName: "Copper ore", description: "Reddish copper ore. Smelt with tin at a furnace into bronze bars.", seedValue: 5, stackable: true, maxStackSize: DEFAULT_STACK, uniqueInstance: false, category: ItemCategory.ingredient, iconKey: "metal", defaultState: "ore", tier: GatherMaterialId.copper, tintFromTier: true }), [CraftingItemId.tinOre]: Object.freeze({ itemId: CraftingItemId.tinOre, key: "tin-ore", displayName: "Tin ore", description: "Pale tin ore. Smelt with copper at a furnace into bronze bars.", seedValue: 5, stackable: true, maxStackSize: DEFAULT_STACK, uniqueInstance: false, category: ItemCategory.ingredient, iconKey: "metal", defaultState: "ore", tier: GatherMaterialId.tin, tintFromTier: true }), [CraftingItemId.bronzeBar]: Object.freeze({ itemId: CraftingItemId.bronzeBar, key: "bronze-bar", displayName: "Bronze bar", description: "A solid bronze bar, ready for the anvil.", seedValue: 4, stackable: true, maxStackSize: DEFAULT_STACK, uniqueInstance: false, category: ItemCategory.intermediate, iconKey: "metal", defaultState: "bar", tier: MaterialTier.bronze, tintFromTier: true }), [CraftingItemId.rawMeat]: stub(CraftingItemId.rawMeat, "raw-meat", "Raw meat", ItemCategory.ingredient, { description: "Fresh meat. Cook at an oven or campfire." }), [CraftingItemId.cookedMeat]: stub(CraftingItemId.cookedMeat, "cooked-meat", "Cooked meat", ItemCategory.food, { description: "Meat roasted until tender." }), [CraftingItemId.fishingRod]: stub(CraftingItemId.fishingRod, "fishing-rod", "Fishing rod", ItemCategory.tool, { stackable: false, maxStackSize: 1, description: "A simple rod and line for still waters." }), [CraftingItemId.fishingNet]: stub(CraftingItemId.fishingNet, "fishing-net", "Fishing net", ItemCategory.tool, { stackable: false, maxStackSize: 1, description: "A woven net for scooping fish." }), [CraftingItemId.rawFish]: stub(CraftingItemId.rawFish, "raw-fish", "Raw fish", ItemCategory.ingredient, { description: "A fresh catch. Cook at an oven or campfire." }) });