bind the temporary blueprint to C and V
Follows f9c654b, which rekeyed REQ-UI-BLUEPRINT-TEMP: C captures a
temporary blueprint from the selection and enters its placement mode, V
re-enters that mode later without capturing anything, and T is unbound.
The plain keys are now the throwaway counterparts of Ctrl+C / Ctrl+V.
V forces the blueprint to outlive its placement mode, so
BlueprintModeExitedEvent no longer drops it -- it now clears only the
saved-blueprint index. BlueprintLibrary holds the one temporary blueprint
in an optional beside the saved list, which keeps it out of the selection
dialog and out of blueprints.toml by construction.
Restarting must discard it, and nothing announced a restart. GameResetEvent
does, emitted from GameWorldView::resetForNewGame(): the escape menu, game
over and win dialogs only enqueue a ResetCommand, so that is the single
point where a restart has actually been applied. The alternative, calling
into the library from all three dialogs, would triplicate the call and
couple MainWindow to the library's internals.
TemporaryBlueprintRequestedEvent is renamed to
TemporaryBlueprintCaptureRequestedEvent -- with two temp-blueprint requests
the old name no longer says which. Also drops a dead include of it from
GameWorldView, unused since the library was split out of BlueprintPanel.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JcReq7hVk4KUPhTDKWAG7K
This commit is contained in:
13
src/lib/eventsystem/event/GameResetEvent.h
Normal file
13
src/lib/eventsystem/event/GameResetEvent.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "Event.h"
|
||||
|
||||
// Emitted once per restart, after a queued ResetCommand has been applied and the view has
|
||||
// been reset for the new run (REQ-UI-GAME-MENU). It lets presentation state that does not
|
||||
// live in the simulation -- e.g. the temporary blueprint, REQ-UI-BLUEPRINT-TEMP -- be
|
||||
// dropped for the fresh run. Sent from GameWorldView::resetForNewGame(), which is where a
|
||||
// restart actually lands: the escape menu, game over, and win dialogs only enqueue the
|
||||
// command.
|
||||
class GameResetEvent : public Event
|
||||
{
|
||||
};
|
||||
Reference in New Issue
Block a user