When a dialog appears, no command should work and the game physics should be paused as long as the message is not acknowledged #128
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Done in
1e89780.While a line is on the banner the whole tree is paused - the fleet, the enemies, and GameState's own production and wave clocks all stop, and input stops reaching every node except the banner. So a press while a dialog is up acknowledges it and does nothing else; it cannot also steer the fleet or open a menu on the way through.
The pause is owned by
NarrationBannerrather than by its callers. What must not get out of step is "a line is showing" and "the game is stopped", and the banner is the only code that knows the first. It releases on the last line, onclear(), and on leaving the tree - a scene swapped out mid-line must not leave the game stopped with nothing left alive to start it again.Two knock-on effects worth recording:
_processon the first frame - and that frame no longer comes, because the prologue opens ON a dialog.BuildControllerandWorldMapnow apply it at_readytoo, where it does not depend on the game running.Covered by
tests/test_dialog_pause.gd, which pushes presses through the viewport rather than calling handlers, so the engine's own routing is what decides whether they arrive. Measured: the fleet holds still for a full second under a standing movement order, the wave clock does not advance, and the build button - which fires on a press with nothing in the way - fires zero times while a line is up.