Their buffers were unioned over every recipe of their type, so a single smelter
accepted all four ores at once, held three kinds of ingot, and ran whichever
recipe happened to be satisfiable. Four recipes coexisted in one building.
They now hold exactly one recipe, sized and cleared like any other building's,
with one addition: while none is set, the first material offered at an input
port that one of their recipes consumes selects it. That hook sits at both
intake paths -- the belt pull and the direct coupling -- because a building
that accepts nothing would otherwise leave a coupled producer stuck at its port
for good. Ports are walked in order and config order breaks a tie, so the
choice is deterministic.
Once set the recipe never changes on its own, so a material belonging to
another of its recipes is simply refused. Changing it is the player's, through
the ordinary dialog, which clears the buffers and thereby also frees a building
left holding part of a cycle nothing feeds any more; the dialog's clearing
option reads (Auto) there, since it returns the building to selecting its own.
Falling out of this: gatherCandidateRecipes collapses to getSelectedRecipe, so
tickProduction loses its candidate loop; initAutoBuffers and its union are
gone; these buildings can now be grey; and AutoProductionContent is deleted,
its two reasons for existing (the buffer-chip union and the "recipe it ran
last" fallback) having been artefacts of holding no recipe.
Also makes them configurable for blueprint purposes -- they carry a recipe now,
so a blueprint of one has something to transfer.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
A building has one output buffer per item it can produce, so the singular
caption no longer matches what the section lists -- and the input side, which
has always had one buffer per material, already read "Input buffers".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
Implements the requirements from 8401b20. OutputBuffer's type-blind `capacity`
becomes a `caps` map keyed by item, mirroring InputBuffer. The items stay in
one production-ordered vector, because that order is what the output port hands
out (REQ-MAT-OUTPUT-EMERGE); only the capacity is now per type, so one item's
backlog no longer occupies another's room.
The cycle gate moves ahead of the roll in tickProduction: recipeOutputsFit()
requires every output a cycle could produce to fit, which for a deterministic
recipe is just its own outputs and for the Reprocessing Plant is every possible
roll. That is what denies the reroll the old one-item cap was there for -- a
full buffer for one item stops the plant entirely rather than letting it keep
producing the others -- while letting it hold two cycles' worth per outcome and
produce amounts above one.
getCycleOutputItemCount(), which judged the plant by the smallest amount any
roll could yield, is gone: it only existed because the classifier could not know
the roll, and the all-outcomes rule needs no such approximation. Its unlock
caveat goes with it, since a locked item is never produced and so never fills.
The Salvage Bay's config-defined capacity becomes its single scrap cap, and the
shipyard simply has no caps at all. The checksum hashes the map the way the
input caps are hashed, so determinism is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
The three block-icon call sites each spelled out the same expression that
ItemIconCache::getInlineIcon() now is: the bare icon at the line's text
height, null when the file is missing. They call the helper instead, and
HeaderBar::blockIcon() -- which was that expression and nothing else --
is gone along with its stale "loaded once on first use" comment.
Each site still passes its own widget font, so nothing about the sizing
changes; the rule now lives in one place rather than four.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
The debris card's row now reads "Remaining" with the amount and the bare
scrap icon after it, and the count summary's indented sub-row states its
total the same way; both fall back to naming the item in words when no
scrap icon file exists.
StatRow gained the value-plus-icon form: a label draws either text or a
pixmap, so the two are composed into one via renderCaptionWithIcon, with
the color passed in because a pixmap does not follow the palette. That
also closes a gap in the building multi-selection, whose "Total cost" was
specified to carry the building_block icon and showed the bare number.
ItemIconCache::getInlineIcon() packages the sizing rule of the bare inline
icon. It sits on the cache rather than in IconCaption so StatRow keeps
pulling in nothing but the caption helper: StatRow.cpp is compiled into
DotaFactory_balancing, which links neither the ui library nor QtSvg, and
that target now compiles IconCaption.cpp along with it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x