From af603e4040890f018deb5054936ce738a475b283 Mon Sep 17 00:00:00 2001 From: mlangkabel Date: Tue, 21 Apr 2026 20:47:37 +0200 Subject: [PATCH] add requirements for escape menu --- docs/requirements.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/requirements.md b/docs/requirements.md index e3b019b..24bc379 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -54,7 +54,7 @@ Output port indicators are not building tiles themselves. A building may have mo - REQ-BLD-COST: The player places buildings from a build menu. Placement costs building blocks from the global stock. The cost per building type is read from `buildings.toml [[building]].cost`. - REQ-BLD-QUEUE: Placed buildings enter a construction queue and are built one at a time. Each building takes a duration defined in `buildings.toml [[building]].construction_time_seconds` to construct. - REQ-BLD-ASTEROID-ONLY: Buildings can only be placed on asteroid tiles (per surface_mask; tiles marked `S` may extend into space). -- REQ-BLD-BUILDER-MODE: Clicking a build button activates builder mode for that building type. Builder mode is exited by pressing Escape, right-clicking in the game world, or clicking the same build button again. +- REQ-BLD-BUILDER-MODE: Clicking a build button activates builder mode for that building type. Builder mode is exited by right-clicking in the game world or clicking the same build button again. - REQ-BLD-GHOST: While in builder mode, a ghost of the building is rendered at the tile under the cursor, showing where it would be placed. - REQ-BLD-ROTATE: While in builder mode, pressing E rotates the ghost 90° clockwise and Q rotates it 90° counter-clockwise. Rotation affects the direction of the output port. - REQ-BLD-PLACE: Clicking a valid tile in builder mode places a construction site and adds it to the build queue, consuming building blocks from the global stock. @@ -182,9 +182,17 @@ The screen is divided into three vertical sections: - **Space** — toggles pause. Pressing Space pauses (sets speed to 0×) and stores the previously selected non-zero speed; pressing Space again restores that speed. - **W** — increases game speed by one step in the sequence 0×, 0.5×, 1×, 2×, 4× (no wrap-around past 4×). - **S** — decreases game speed by one step in the same sequence (no wrap-around past 0×). - - **Backspace** — activates demolish mode; Escape or Backspace again exits it. + - **Backspace** — activates demolish mode; Backspace again exits it. - **Q / E** — in builder mode, rotate the ghost counter-clockwise / clockwise (REQ-BLD-ROTATE). - - **Escape** — exits builder mode or demolish mode. + - **Escape** — opens the escape menu (REQ-UI-GAME-MENU). + +### Escape Menu + +- REQ-UI-GAME-MENU: Pressing Escape at any time opens the escape menu as a modal dialog and pauses the simulation (sets speed to 0×). On close, the simulation speed is restored to what it was before the menu was opened — so if the game was already paused, it remains paused. The menu contains three buttons: + - **Continue** — closes the menu and returns to the game. + - **Restart** — resets the simulation to its initial state and closes the menu at 1× speed. + - **Quit** — closes the application. + Pressing Escape while the escape menu is open is equivalent to clicking Continue. ### Selected Building Panel