add iron/gold smelting + disambiguate workbench-vs-recipe

Q: iron_smelt (iron_ore + wood → iron_ingot) and gold_smelt
(gold + wood → gold_ingot) recipes added at Smelter, using the
existing ingredient2 buffer mechanism. New TYPE_IRON_INGOT and
TYPE_GOLD_INGOT item types (procedural hue-hash draw for now).

R: new Recipe.target_workbench field (StringName, empty = any matching
skill) round-trips through to_dict/from_dict. Workbench bill picker
filters by both required_skill AND target_workbench vs lower-cased
label_text. plank → carpenter, stone_block/iron_smelt/gold_smelt →
smelter, flour → millstone. Cooking-only recipes (bread, meal) stay
unrestricted since Hearth is the only cooking workbench.

9 recipes total now, 4 distinct workbench routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-16 18:45:11 +01:00
parent 57e1f0f389
commit 6789ca739f
5 changed files with 77 additions and 5 deletions

View file

@ -64,6 +64,12 @@ const TYPE_BREAD: StringName = &"bread"
# Phase 14 — cremation output. One ash item drops per cremated corpse.
const TYPE_ASH: StringName = &"ash"
# Phase 19 — smelted ingots (iron_ore → iron_ingot, gold → gold_ingot).
# No dedicated atlas sprite; on-floor visual uses the procedural hue-hashed
# square fallback in _draw() and the matching shape is in draw_item_shape().
const TYPE_IRON_INGOT: StringName = &"iron_ingot"
const TYPE_GOLD_INGOT: StringName = &"gold_ingot"
const ALL_TYPES: Array[StringName] = [
TYPE_WOOD, TYPE_STONE, TYPE_IRON_ORE, TYPE_COPPER_ORE,
TYPE_SILVER, TYPE_GOLD, TYPE_CLOTH, TYPE_VEGETABLE,
@ -72,6 +78,7 @@ const ALL_TYPES: Array[StringName] = [
TYPE_PLANK, TYPE_STONE_BLOCK,
TYPE_FLOUR, TYPE_BREAD,
TYPE_ASH,
TYPE_IRON_INGOT, TYPE_GOLD_INGOT,
]
# ── quality system (docs/architecture.md "Quality system") ───────────────────