Commit Graph

315 Commits

Author SHA1 Message Date
2f1a4940de Unify tunnel build mode into a single Tunnel button
Replace REQ-BLD-TUNNEL-AUTO-SWITCH with REQ-BLD-TUNNEL-MODE: one Tunnel
button whose ghost defaults to Tunnel Entry and auto-switches to Tunnel
Exit based on which end the hovered position would complete (via
REQ-BLD-TUNNEL-PAIR), with a green connection preview and sub-tile
mouse-proximity tie-break. Update REQ-UI-HOTKEYS (3 = Tunnel, 4 unused)
and REQ-UI-BUILD-GRID (shared Tunnel button).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 17:20:25 +02:00
56c691abfe Snap belt-drag end tile to a building's input edge
When a belt drag ends with the cursor over a non-belt building or construction
site, the end tile now snaps to the input-capable adjacent tile closest to the
cursor and points into the target, instead of showing an invalid ghost on the
occupied tile.

Adds BuildingSystem::getInputPorts(id) (reusing computeInputPorts, refactored
into a bodyCells+outputPorts core) as the single source of truth for a target's
input-capable adjacent tiles; works for both operational buildings (stored
inputPorts) and construction sites (mask-derived). GameWorldView tracks the
cursor world position and, in recomputeBeltDragPath, picks the nearest input
port and overrides the end tile's rotation. Ghost preview, resolve, and apply
consume the snapped path unchanged.

Implements REQ-BLD-BELT-DRAG snapping-to-a-building.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 16:19:59 +02:00
77519826b2 Add belt-drag snapping to a building's input edge
Extend REQ-BLD-BELT-DRAG: dragging a belt onto a building/construction site
snaps the end tile to the input-capable adjacent tile closest to the cursor
(geometrically closest, always), with that tile's belt pointing into the
target across the shared input edge, overriding the final-tile orientation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 15:46:59 +02:00
ef9837c722 Document rotate-during-drag in belt drag placement requirement
REQ-BLD-BELT-DRAG now states that rotating the belt with R/Shift+R while a
drag is in progress re-picks the path's primary axis immediately and
re-derives the path, rather than waiting for the next cursor movement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 15:12:54 +02:00
bb3ac61776 Update belt drag L-path immediately on rotate
Pressing R/Shift+R during a belt drag now re-picks the path's primary axis
right away instead of waiting for the next mouse move, so the previewed L
flips as soon as the belt orientation changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 15:03:32 +02:00
42b86785a5 Implement deferred L-shaped belt drag placement
Belts are no longer placed on hover during a drag. Left-press anchors the
drag; as the cursor moves, a rectilinear (L-shaped) path of belt ghosts is
previewed from the anchor to the cursor — first leg parallel to the belt's
current orientation, then orthogonal — with each tile auto-oriented to follow
the path. Construction sites are placed on release: new valid tiles are placed
(subject to cumulative affordability), tiles holding only a belt are re-oriented
in place, and occupied/invalid tiles are skipped. Unaffordable tiles show no
ghost. Right-click during a drag cancels it without leaving belt build mode.

Path geometry is factored into a pure computeBeltDragPath() in lib/core with
Catch2 coverage; GameWorldView owns the classification, affordability, and
rendering against live sim state.

Implements REQ-BLD-BELT-DRAG.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 12:59:21 +02:00
333b72e3b7 Rework belt drag placement requirements
Deferred, L-shaped drag placement for belts: ghosts along the path,
placement on mouse release, auto-oriented tiles, right-click cancels
the drag without exiting belt build mode. Occupied belt cells are
re-oriented in place; unaffordable tiles show no ghost.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
2026-07-21 12:29:47 +02:00
1cbc695bc5 Add building status light 2026-07-20 22:19:58 +02:00
c7ecce6ac4 make empty layout cells pulse while module is selected 2026-07-20 22:15:26 +02:00
be475e2836 allow multi-select for ships/stations, mixable with scrap 2026-07-20 21:03:11 +02:00
9622fa4345 Use std::optional instead of sentinel values for absent data 2026-07-20 20:27:20 +02:00
1cdafb7bcd draw glyph for output port at the target tile during build mode 2026-07-19 22:30:03 +02:00
f205136e21 show tooltip for artifacts in the header bar 2026-07-19 22:16:04 +02:00
b708e1b29d Add demolish-mode vignette 2026-07-19 21:51:12 +02:00
c76ba07bc7 Correct top game speed step to 10x in requirements 2026-07-19 21:37:47 +02:00
b2e7e4897a Add paused-state vignette border to game world view 2026-07-19 21:34:56 +02:00
c21af63e84 deselect build tool when it becomes unaffordable and fix stale enabled button 2026-07-19 21:20:59 +02:00
a4267a4760 Fix bug where restart fast-forwarded the new run by the time spent in a modal dialog 2026-07-19 21:19:36 +02:00
d412c69f82 Prefix all getters with "get" 2026-07-19 21:17:38 +02:00
08752aeced fix building blocks tooltip 2026-07-19 21:14:31 +02:00
d465671cfc draw beam wider at the source than at the target 0.1.1 2026-07-14 21:52:05 +02:00
76812ba0c5 show "+ installed modules" in ship selection dialog tooltip 2026-07-14 21:23:05 +02:00
9c1e948ab4 show selected ship's current behavior in sidebar panel 2026-07-14 21:19:14 +02:00
23ff406101 display faction in selected object name for hq and defence stations 2026-07-14 21:00:02 +02:00
2ea0cb815d fix issue where items on building's output port were not counted to output display in building panel 2026-07-14 20:50:43 +02:00
876b344b20 fix issue where splitters were draggable during placement like belts 2026-07-14 20:35:47 +02:00
cd75492796 Reveal port items in a thin margin at machine edges 2026-07-14 20:32:27 +02:00
486296feee Allow direct output-to-input port coupling between adjacent buildings 2026-07-14 20:23:24 +02:00
c9f14970a1 Animate items entering building input ports 2026-07-14 20:21:25 +02:00
6a8c456aa1 Animate items emerging from building output ports 2026-07-14 20:18:47 +02:00
af8a2224c0 fix issue where items were accepted by a belt from opposite travel direction 2026-07-14 20:15:39 +02:00
4b149d97a7 dim the game behind dialogs and escape menu 2026-07-13 22:11:21 +02:00
6a8b6acd3b make panning faster 2026-07-13 21:44:12 +02:00
3ce6e6d599 Tint not-yet-buildable asteroid area 2026-07-13 21:42:59 +02:00
80a2622267 Redefine camera scroll as view center 2026-07-13 21:31:52 +02:00
535d4f8f24 allow to (multi) select scrap 2026-07-13 21:09:01 +02:00
8c4fb78fc9 Allow creating blueprints from construction sites 2026-07-13 20:50:13 +02:00
698dd4d13d auto-open layout dialog on manual schematic change 2026-07-13 20:47:37 +02:00
9d28175b17 Always show shipyard layout preview and Configure button, disabled until schematic selected 2026-07-13 20:45:03 +02:00
ac4d56764c Draw a thin border around each right-sidebar panel 2026-07-13 20:44:47 +02:00
69fe607157 Show total building block cost in multi-selection panel (relevant for temporary blueprint) 2026-07-13 20:31:40 +02:00
92e896b973 fix tooltip text rendering issue 2026-07-12 21:56:59 +02:00
dd7c997816 Auto-process smelter and reprocessing plant (no recipe selection) 2026-07-12 21:35:23 +02:00
ad3e73fdd8 Add tooltip for building blocks in header bar 2026-07-12 21:24:11 +02:00
177809fe1a Add tooltips for building buttons and module selection buttons 2026-07-12 21:21:14 +02:00
69f655d179 Rename UI "Blocks" labels to "Building Blocks" 2026-07-12 21:17:10 +02:00
271855781c add tag based version info to exe 0.1.0 2026-07-12 09:16:49 +02:00
5f6ecbf6c8 implement visual feedback for copy building settings with shift + click gesture 2026-07-09 21:33:24 +02:00
cd966daba9 fix issue where shipyard produces ships with modules without requiring items for the modules if the ship's layout was never changed 2026-07-09 21:29:04 +02:00
88bc4f2170 fix bug where selecting the same ship again in a shipyard clears the layout and resets the progress 2026-07-09 21:05:01 +02:00