import { SkillId } from "./skills.js"; /** Placeable or fixed world stations that gate recipes (blocks / ground objects later). */ export const CraftingStationId = Object.freeze({ furnace: "furnace", spinningWheel: "spinning-wheel", loom: "loom", anvil: "anvil", leatherworkingStation: "leatherworking-station", craftingBench: "crafting-bench", woodworkingBench: "woodworking-bench", oven: "oven", fireplace: "fireplace" }); /** How long a player-lit campfire stays usable (ms). */ export const FIREPLACE_DURATION_MS = 10 * 60 * 1000; /** Fixed craft action duration at any station (ms). */ export const CRAFT_DURATION_MS = 2000; export const CRAFTING_STATION_DEFINITIONS = Object.freeze({ [CraftingStationId.furnace]: Object.freeze({ stationId: CraftingStationId.furnace, displayName: "Furnace", skillId: SkillId.smithing, description: "Smelt gathered ore into metal bars." }), [CraftingStationId.spinningWheel]: Object.freeze({ stationId: CraftingStationId.spinningWheel, displayName: "Spinning wheel", skillId: SkillId.tailoring, description: "Spin wool (from shorn sheep) into thread." }), [CraftingStationId.loom]: Object.freeze({ stationId: CraftingStationId.loom, displayName: "Loom", skillId: SkillId.tailoring, description: "Weave cloth garments." }), [CraftingStationId.anvil]: Object.freeze({ stationId: CraftingStationId.anvil, displayName: "Anvil", skillId: SkillId.smithing, description: "Smith metal items from bars." }), [CraftingStationId.leatherworkingStation]: Object.freeze({ stationId: CraftingStationId.leatherworkingStation, displayName: "Leatherworking station", skillId: SkillId.leatherworking, description: "Craft leather armour and goods." }), [CraftingStationId.craftingBench]: Object.freeze({ stationId: CraftingStationId.craftingBench, displayName: "Crafting bench", skillId: SkillId.crafting, description: "General crafting (e.g. fletching arrows from smithed tips)." }), [CraftingStationId.woodworkingBench]: Object.freeze({ stationId: CraftingStationId.woodworkingBench, displayName: "Woodworking bench", skillId: SkillId.crafting, description: "Shape logs into handles and assemble hafted tools." }), [CraftingStationId.oven]: Object.freeze({ stationId: CraftingStationId.oven, displayName: "Oven", skillId: SkillId.cooking, description: "Cook raw meat; low Cooking risks burning the food." }), [CraftingStationId.fireplace]: Object.freeze({ stationId: CraftingStationId.fireplace, displayName: "Campfire", skillId: SkillId.cooking, description: "Portable cooking like an oven but a higher burn chance.", portable: true, maxPerTile: 1, durationMs: FIREPLACE_DURATION_MS }) }); export function craftingStationDefinition (stationId) { return CRAFTING_STATION_DEFINITIONS[stationId] ?? null; }