Implement unified tunnel build mode (REQ-BLD-TUNNEL-MODE)
Collapse the two tunnel buttons into a single Tunnel button whose ghost resolves between Tunnel Entry and Tunnel Exit based on the hovered position, with a green connection preview. - Add pure core helper TunnelCompletion (firstTunnelFacing + resolveTunnelCompletion): the entry/exit completion scans and the sub-tile cursor tie-break, unit-tested in TunnelCompletionTest. - Dedup BeltSystem::reevaluateTunnelPairing onto firstTunnelFacing so the pairing scan rule lives in one place. - GameWorldView: resolve the ghost type on hover/rotate (matching built tunnels and construction sites), place the resolved type (drop the old auto-switch), and draw the matched partner + between-tiles in green. Hotkey 3 = Tunnel, 4 unused. - BuildButtonGrid: one "Tunnel" button; tunnel_exit stays player-placeable so blueprints and cost totals still account for exits. - Add the green tunnel_preview overlay color (VisualsConfig/Loader/toml). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
This commit is contained in:
@@ -16,7 +16,7 @@ surface_mask = ["<A>"]
|
||||
|
||||
[[building]]
|
||||
id = "tunnel_entry"
|
||||
tooltip = "Sends items underground to a matching tunnel exit, letting belts cross."
|
||||
tooltip = "Sends items underground so belts can cross. Places an entry, or an exit when it would connect to a matching entry under the cursor."
|
||||
cost = 5
|
||||
player_placeable = true
|
||||
construction_time_seconds = 0.5
|
||||
|
||||
@@ -351,6 +351,7 @@ selected_outline = "#ffff00" # outline drawn around currently-selected buildin
|
||||
copy_config = "#33ccff66" # copy-settings eligible-target tint + copy/paste flash (REQ-BLD-COPY-CONFIG-FEEDBACK)
|
||||
locked_asteroid = "#0000007f" # tint over the asteroid left of the buildable edge (not yet unlocked by expansion)
|
||||
modal_dim = "#00000099" # semi-transparent black dim behind modal dialogs/menus (REQ-UI-MODAL-DIM)
|
||||
tunnel_preview = "#00ff0055" # tunnel connection preview: matched end + tiles between (REQ-BLD-TUNNEL-MODE)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Schematic-drop toasts (REQ-UI-SCHEMATIC-TOAST)
|
||||
|
||||
Reference in New Issue
Block a user