Commit Graph

444 Commits

Author SHA1 Message Date
b2148f00ac stop hovering when the cursor points at no tile
A cursor resting on a panel or outside the window kept whatever it last
pointed at: the ghost, the tunnel preview, the deconstruct tint all stayed
put, because "not hovering" was not a state the build mode could hold. Make
both ghost tiles optional, clear the hover with them, and re-derive it when
the cursor comes back or a mode is entered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 15:19:22 +02:00
9490a96e12 let the hover follow a view that scrolls under a still cursor
Only the selection box was refreshed while the camera panned, so the ghost,
its validity, the resolved tunnel end and the deconstruct hover all kept the
tile of the last mouse move. Give the whole hover update one entry point and
run it from the pan step as well, for a cursor that is over the world.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 14:54:34 +02:00
fd0c246bc0 show the tunnel end the click would actually place
The controls panel header read the type builder mode was entered with, so
tunnel mode always said Tunnel Entry even where the ghost had resolved to an
exit. Feed the header the same effective type the ghost and placement already
use.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 13:26:50 +02:00
9c275e283c give every recipe one shape: a list of output groups
Implements REQ-MAT-OUTPUT-GROUP. A recipe had two shapes -- outputs produced
together, or outputs of which exactly one happened -- and every rule over them
was written twice, selected by `building == ReprocessingPlant`: sizing a
buffer, deciding whether a cycle fits, resolving what a cycle makes, costing an
item. RecipeDef now holds output groups, each a weight and a list of items, and
a cycle yields exactly one group. One group is the ordinary recipe, so the old
two cases are the same shape with one and with several, and all four rules
collapse to one expression apiece with no building-type test left.

rollReprocessingOutput becomes rollOutputGroup, where a single group returns
without drawing or testing eligibility. That early-out is load-bearing twice
over. Drawing there would consume entropy for every ordinary recipe and shift
every later random outcome; and eligibility must not apply either, since
implicit unlocking is demand-derived, so an ordinary recipe's output can be
producible while nothing yet calls for it -- testing it would stop the building
producing rather than gate a drop. Past the early-out a group is eligible only
when all of its items are unlocked, being produced whole.

Threat follows the recipe's shape rather than the building, and the per-unit
value now divides by the group's amount as well as its odds. That moves no
number today: every item resolved through this path has amount 1, which is why
the threat expectations are untouched.

Config keeps `outputs = [...]` as the single-group form, so only the two
reprocessing recipes change shape. The recipe summary gains "/" between groups
and keeps "+" within one, which also fixes the plant reading as though a cycle
produced all of its items at once.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 12:47:09 +02:00
41c45d73ce cut the reprocessing plant entry back to what is still its own
Everything it used to specify moved out as the output-group merge generalised
it: the pick is REQ-MAT-OUTPUT-GROUP, the all-outcomes gate REQ-MAT-CYCLE, the
buffers REQ-MAT-OUTPUT-BUFFER, the eligible set REQ-LOCK-OUTPUT-POOL, the
recipe control REQ-BLD-AUTO-RECIPE. Restating them here only invited the two
to drift apart.

What is left is what config cannot say: why the building exists -- the
value-preserving counterpart to smelting scrap down, and the only path to
voidsteel -- plus the one rule that really is specific to it, that reprocessing
recipes take no part in the implicit unlock traversal, which until now was only
implied by REQ-LOCK-IMPLICIT naming the other three building types.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 10:51:54 +02:00
f39e4f3506 name the output pool restriction for what it restricts
It is no longer about reprocessing: any recipe with several output groups is
subject to it, and the plant is only the building that happens to have one
(REQ-MAT-OUTPUT-GROUP). REQ-LOCK-REPROCESSING-POOL becomes REQ-LOCK-OUTPUT-POOL.
Four citations, all in docs -- no code cites it.

Also corrects a line REQ-LOCK-IMPLICIT still carried from before smelters had a
recipe control: their recipes are not "never shown in any UI dropdown" any more,
they are simply never gated, so the dialog offers all of them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 10:32:30 +02:00
3c63205c6c make every recipe one shape: a list of output groups
Deterministic recipes could have several outputs produced together; a
probabilistic one could have several outputs of which exactly one happened.
Two shapes meant two rules everywhere -- sizing a buffer, deciding whether a
cycle fits, resolving what a cycle makes -- each written as a branch on
whether the building was a reprocessing plant.

New REQ-MAT-OUTPUT-GROUP merges them. A recipe has one or more output groups,
each with a weight and a list of items; a cycle produces exactly one group,
and the items within it together. One group is the ordinary recipe and is
always chosen, so the old deterministic and probabilistic cases are the same
shape with one group and with several -- and every rule downstream is written
over groups, needing no branch at all. Config keeps outputs = [...] as the
single-group form, so only the two reprocessing recipes change shape.

It also lets an outcome yield several items, which was unrepresentable, and
fixes a display bug on the way: the recipe summary drew all outputs as one
combined yield, so a plant read as if a cycle made all four items. Groups are
now separated by "/" and the items within one by "+".

REQ-LOCK-REPROCESSING-POOL now restricts the choice between groups rather
than the pool of output items, and says why that distinction is load-bearing:
implicit unlocking is demand-derived, so an ordinary recipe's output can be
producible while nothing yet calls for it. Testing eligibility there would not
gate a drop, it would stop the building producing at all -- so a recipe with
one group, having no choice to restrict, is never tested. A group is eligible
only if all of its items are unlocked, since they are produced together.

Requirements only; the implementation follows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
2026-08-17 09:46:31 +02:00
a1c567715e make selection box sub-tile aware 2026-08-14 22:51:05 +02:00
1cf7c264c1 draw selection rect only if mouse has moved 2026-08-14 22:20:35 +02:00
d36e59fd26 make selection box use the selection or deconstruct color to indicate the mode 2026-08-14 21:49:55 +02:00
9bbade2420 make recipe selection and buffers of smelter and reprocessing plant behave like other buildings, except that a recipe may be chosen automatically 0.1.2 2026-08-12 23:24:31 +02:00
4ee6438405 allow the probabilistic recipe output of the reprocessing plant to yield more than 1 item of a type per cycle 2026-08-12 22:10:29 +02:00
0b859bd1a4 start the next production cycle in the tick the last one completed 2026-08-12 21:27:25 +02:00
dd061082fb fix issue where status light was flickering to yellow for one tick between cycles 2026-08-12 21:26:09 +02:00
b6b6acb99c ask the icon cache for the inline block icon 2026-08-12 21:22:40 +02:00
7e670fc01c state the debris scrap value with the item icon, not the word 2026-08-12 21:21:47 +02:00
28656bea7e name recipes after their process, not their product 2026-08-12 21:14:33 +02:00
bd8fe5157e add border around recipes where several of them stack 2026-08-12 08:30:10 +02:00
a3fddf63cc give a recipe line its own row for its identity 2026-08-11 22:07:15 +02:00
1ddd830476 fix requirements: let the layout preview state that it shows color alone 2026-08-11 22:07:02 +02:00
f255224ccd show recipes visually instead of describing them in text 2026-08-11 21:47:35 +02:00
3274df91d4 open selection panel modals on the panel 2026-08-11 21:21:12 +02:00
d1da4b2937 color item icon backgrounds in the UI from visuals.toml 2026-08-11 21:18:52 +02:00
37378e3c1b allow to move the selection panel via mouse drag 2026-08-09 22:09:41 +02:00
37a7a7499a update item box color to yield better contrast 2026-08-09 21:34:31 +02:00
5794a51c9a draw boxes around item icons 2026-08-09 21:20:47 +02:00
09858f4b62 keep an auto-recipe building's summary between its cycles 2026-08-09 20:41:48 +02:00
ca49b9dbec let the world renderer hold the simulation by const reference 2026-08-09 20:37:15 +02:00
79650ae211 make EntityAdmin::hasAll const 2026-08-09 20:37:09 +02:00
c0b009c548 place the selection panel beside what it describes 2026-08-09 20:36:58 +02:00
7ae5f8c4dc fix selection panel contents 2026-08-07 22:01:10 +02:00
9f574fa05e fix issue where the selection panel sometimes collapses to very small size 2026-08-07 21:17:53 +02:00
e5d689c8d8 document the player-input design in architecture.md 2026-08-07 20:43:12 +02:00
0b8f5eccd6 scroll the controls panel's rows instead of clipping them 2026-08-07 20:42:56 +02:00
40415e663b put the controls panel in the corner and let it step around the build bar 2026-08-07 20:42:41 +02:00
7a098edf72 mark the exit row of the controls panel red on its chips instead of its label 2026-08-07 19:52:51 +02:00
365641feb7 size the controls panel to the rows it is actually showing 2026-08-07 19:38:10 +02:00
4b5e288632 record that additive selection is offered only once something is selected 2026-08-07 19:10:26 +02:00
cab7244b00 divide the always-available rows in the General context too 2026-08-07 19:10:04 +02:00
980fad272f show the available controls in a panel over the world 2026-08-07 18:48:01 +02:00
68a43a7d98 resolve mouse gestures through the action table too 2026-08-07 18:47:43 +02:00
1f754de431 resolve keyboard shortcuts through one action table instead of a switch 2026-08-07 18:47:29 +02:00
f61f0bf761 add requirements for a context-sensitive controls panel floating over the game world 2026-08-07 18:47:15 +02:00
075e44d295 give the selection cards their own parts instead of label blobs 2026-08-07 18:43:23 +02:00
2289277e12 split the selection panel into one card per kind of selection 2026-08-07 18:38:55 +02:00
cc0ef856e3 make asteroid smaller 2026-08-06 22:14:02 +02:00
603f8063e9 float the selection panel over the game world instead of a side column 2026-08-06 22:06:42 +02:00
3b37b0ecf8 target single-building transfers by hovering, not by footprint coincidence 2026-08-06 20:31:51 +02:00
98deab932a let any blueprint transfer configuration, not just single-building ones (if the orientation matches) 2026-08-06 20:29:20 +02:00
08d8b0dd90 re-cover copy-settings through single-building blueprints 2026-08-06 19:44:55 +02:00