From 35516cee39333f4edb3ef608232fe4e66574a9d9 Mon Sep 17 00:00:00 2001 From: Ryan Barlow <7389646+ryanbarlow97@users.noreply.github.com> Date: Sat, 3 Oct 2026 22:37:33 +0000 Subject: [PATCH] docs(advancedcrafting): document recorded alloy scrap inputs Move the scrap provenance note out of the AdvancedCrafting README into the architecture guide, verified against AlloyForger and ScrapProvenance. Co-Authored-By: Claude Opus 5.5 (1M context) --- projects/AdvancedCrafting/architecture.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/projects/AdvancedCrafting/architecture.md b/projects/AdvancedCrafting/architecture.md index f2c122c..c93af2d 100644 --- a/projects/AdvancedCrafting/architecture.md +++ b/projects/AdvancedCrafting/architecture.md @@ -24,9 +24,15 @@ Stations are JSON files under `data/stations`; alloy state is under `data/alloys alloy recipes are under `data/alloy-recipes`. `data/revisions.json` tracks item configuration revisions. `data/forged-alloys/.json` tracks each player's discovered/forged alloys. Crafted items also retain tags and provenance -in their persistent data containers. Scrap from a failed alloy forge carries the -base ingredient id (`ac_scrap_base`, read with `objects.data.ScrapProvenance`) so -Recycler can return that base metal. +in their persistent data containers. + +A failed alloy forge drops one scrap item that records what the forge consumed, +for [Recycler](../Recycler/docs/SYSTEM.md#advancedcrafting-alloy-scrap) recovery. +`objects.data.ScrapProvenance` writes the base ingredient id (`ac_scrap_base`) +and the quantity of each consumed ingredient, base and catalysts, keyed by +ingredient id (`ac_scrap_inputs`). `readInputs` returns those quantities. Scrap +forged before the quantities were recorded has only the base tag, so `readInputs` +returns one unit of its base; its catalyst history cannot be recovered. On disable the plugin flushes revisions, clears saved station files, and rewrites stations from the in-memory manager. Use a clean stop for backups and restores;