fixes the regression commit B introduced: coins and skills lived in the
Attempt ledger, but nothing discarded it, because LivesStateHandler still
called the old store and HandlePlayerDeath was never invoked. Dying kept
everything earned that level. Discard-on-death is the ledger's purpose,
so it could not be separated from it.
new AttemptFailed(remaining, runOver) event, raised after the life is
spent and the ledger discarded. DeathScreen and GameOverScreen react to
that instead of being wired to HealthComponent.Death by scene connections
which fired *before* the life was charged - on the last life game-over
saw one life left and showed nothing, then the death screen saw zero and
refused to reload. 18 scene connections deleted; the race is now
unrepresentable rather than fixed.
DeathScreen also had two read paths for lives - a signal and a direct
store read - because neither was reliable alone. Now one.
Hud reads both facts from signals; only health still polls, and that
belongs to the component rather than to progression. GameManager no
longer touches GameStateStore or SaveSystem at all.
narrowest safe step: only level identity and progression move. Coins,
lives, skills and death stay entirely on GameStateStore and behave as
before, so nothing is tracked in two places.
GameManager addresses levels by stable LevelId via the catalogue;
LevelScenes is gone, so reordering levels no longer invalidates saves.
Every level entry goes through EnterLevel, which fixes LevelStarted never
firing on the first level or after Continue - ghost recording and splits
have been dead outside mid-campaign.
GoTo announces after a frame, once the incoming scene is actually
current. ChangeSceneToPacked is deferred, so the old code handed
GhostEventHandler the scene being torn down.
FinishLevel takes LevelTime? - GetCurrentLevelTime can legitimately be 0
and inventing a value is exactly the bad data LevelTime refuses.
Continue distinguishes absent from corrupt and refuses to overwrite a
corrupt save. Statistics move to the Profile. 69 tests.
ProgressionRoot autoload builds the JSON stores from
GlobalizePath("user://"), loads the Profile, reads the authored upgrade
tables into a SkillCatalogue, and owns the ProgressionService. Every
mutating operation is wrapped so draining and republishing cannot be
forgotten - the one risk of the DrainEvents design, now confined to one
file.
ProgressionEventRepublisher turns domain records into EventBus signals
(ADR-0004), so existing subscribers and scene wiring keep working. New
RunEnded signal: GameOverScreen reads Lives directly today, which is the
last-life soft-lock.
Registered after SkillManager, since the skill catalogue is built from
AvailableSkills. GameStateStore stays until slice 10 moves the callers.
Transitional: LevelStarted is republished with a catalogue index because
GhostManager names files ghost_level_{index}.json.
* Add GridMovementAbility and PacXonGridInteractor for grid-based movement; integrate with PlayerController and PacXonLevel
* Add GhostMovementComponent and PacXonTrailComponent; integrate ghost movement and trail features in PacXonLevel
* Update main menu button focus and add new movement abilities; adjust player and ghost initialization in PacXonLevel
* Refactor collectable components to C# and update resource scripts for consistency
* Update resource paths and refactor properties for consistency
* Refactor UI components to inherit from Control and update node paths for consistency
* Update node paths and group assignments for consistency across scenes
* Refactor GameManager and PlayerDeathComponent for improved state management and logging; update scene connections for player death handling
* Add PhantomCamera components and UI elements for improved scene management; refactor existing components for better integration
* Refactor skill components and update resource paths for consistency; enhance skill management in scenes
* Add new UID files and update scene configurations for dialogue components; refactor skill management and input handling
* Add next level command and refactor player retrieval in GameManager; update scene files for consistency
* Add skill upgrade system and refactor skill components for enhanced functionality; update resource paths and configurations
* Enhance ChargeProgressBar and Marketplace functionality; add owner exit handling and update skill button states
* Refactor ChargeProgressBar and SkillManager; update skill handling and improve component interactions
* Refactor player and level configurations; streamline FlipPlayerComponent and reposition Spaceship Enter