feat(progression): use cases (slice 6)
ProgressionService holds the loaded Profile, active Playthrough and active Attempt, so "exactly one active Attempt" has a testable home. EnterLevel always announces LevelStarted - the reason ghost recording and splits never worked on level 1 or after a Continue. Refuses unreachable levels. Does not touch campaign position, so a Replay leaves it alone. SkillCatalogue returns null for a skill with no authored upgrades, killing the Upgrades[0].Cost overrun. PurchaseSkill reads the current level from the ledger first, so one Attempt can unlock then upgrade. HandlePlayerDeath now persists - death was free if you quit. SkillLevel.First/Next driven out here by a real caller. 53 tests.
This commit is contained in:
@@ -15,3 +15,10 @@ public sealed record RunEnded : ProgressionEvent;
|
||||
/// popup or pushes to Steam cannot fire twice however often it is told.
|
||||
/// </summary>
|
||||
public sealed record AchievementUnlocked(AchievementId Achievement) : ProgressionEvent;
|
||||
|
||||
/// <summary>
|
||||
/// Raised whenever a Level is entered — every time, including the first Level of a new Playthrough
|
||||
/// and the first Level after resuming one. Ghost recording and the speedrun timer both start from
|
||||
/// this, so an entry path that does not announce is an entry path where neither works.
|
||||
/// </summary>
|
||||
public sealed record LevelStarted(LevelId Level) : ProgressionEvent;
|
||||
|
||||
Reference in New Issue
Block a user