diff --git a/fktry/src/ui/palette.ts b/fktry/src/ui/palette.ts index 8ba5e40..b3c4ccb 100644 --- a/fktry/src/ui/palette.ts +++ b/fktry/src/ui/palette.ts @@ -52,7 +52,10 @@ export function machineChassis(def: MachineDef): string { export type AccentFn = (def: MachineDef) => string; /** - * Accent lookup: the colour of the first thing the machine makes, else the codex table. + * Accent lookup, in the precedence LANE-RENDER uses (v4 — confirmed identical in NOTES): + * 1. `MachineDef.accent` — art direction wins outright. + * 2. the colour of the first item the machine outputs — the documented derivation. + * 3. the codex id/kind tables below, for machines that output nothing. * Curried over GameData because the derivation needs recipes + items. */ export function createAccentLookup(data: GameData): AccentFn { @@ -60,6 +63,8 @@ export function createAccentLookup(data: GameData): AccentFn { const items = new Map(data.items.map((i) => [i.id, i])); return (def) => { + if (def.accent) return def.accent; + for (const rid of def.recipes) { const r = recipes.get(rid); if (!r) continue;