AchievementProgress14.1
Class in Unbroken.LaunchBox.Plugins.Components.Achievements
public sealed class AchievementProgressContains progress for exactly one game, account, and mode.
Constructors
AchievementProgressCreates a progress observation.
AchievementProgress
public AchievementProgress(
string gameId,
AchievementProgressContext context,
IReadOnlyCollection<AchievementProgressObservation> achievements,
bool isSnapshotComplete = true
)Creates a progress observation.
gameId- Source-local game ID.
context- The context actually used, which must match the request.
achievements- Explicit observations. Missing items imply locked only when the snapshot is complete.
isSnapshotComplete- Whether progress is authoritative for the entire game catalog, regardless of how many achievements the player has unlocked.
Properties
AchievementsGets explicit progress observations.BeatenAtGets or initializes the provider-reported time the game was beaten in this account and mode; null means unknown.CompletedAtGets or initializes the provider-reported time full game completion was achieved in this account and mode; null means unknown.ContextGets the actual account and mode.EarnedPointsGets or initializes the observed achievement points earned for this game and context; null means unknown.GameIdGets the source-local game ID.IsBeatenGets or initializes whether the provider confirms the game has been beaten in this account and mode; null means unknown.IsCompletedGets or initializes whether the provider confirms full game completion in this account and mode; null means unknown.IsSnapshotCompleteGets whether this snapshot is authoritative for the entire game catalog and context. Missing achievements remain unknown when false; this does not indicate player completion.TotalAchievementsGets or initializes the observed total achievement count for this game and context; null means unknown.TotalPointsGets or initializes the observed total achievement points available for this game and context; null means unknown.UnlockedAchievementsGets or initializes the observed unlocked count for this game and context; null means unknown.
Achievements
public IReadOnlyCollection<AchievementProgressObservation> Achievements { get; }Gets explicit progress observations.
BeatenAt
public DateTimeOffset? BeatenAt { get; init; }Gets or initializes the provider-reported time the game was beaten in this account and mode; null means unknown.
Remarks
A timestamp requires AchievementProgress.IsBeaten to be true. An unknown timestamp preserves a saved date unless the provider explicitly reports that the game is no longer beaten. Dates from another mode, completion, or individual unlocks do not establish this timestamp.CompletedAt
public DateTimeOffset? CompletedAt { get; init; }Gets or initializes the provider-reported time full game completion was achieved in this account and mode; null means unknown.
Remarks
A timestamp requires AchievementProgress.IsCompleted to be true. An unknown timestamp preserves a saved date unless the provider explicitly reports that the game is no longer completed. Dates from another mode, beaten state, or individual unlocks do not establish this timestamp.Context
public AchievementProgressContext Context { get; }Gets the actual account and mode.
EarnedPoints
public decimal? EarnedPoints { get; init; }Gets or initializes the observed achievement points earned for this game and context; null means unknown.
Remarks
This value does not identify which achievements are unlocked or make the snapshot complete. It must be nonnegative and must not exceed AchievementProgress.TotalPoints when both values are known.GameId
public string GameId { get; }Gets the source-local game ID.
IsBeaten
public bool? IsBeaten { get; init; }Gets or initializes whether the provider confirms the game has been beaten in this account and mode; null means unknown.
Remarks
This is supplied by the provider, not inferred from achievement counts. An unknown value does not clear saved completion state.IsCompleted
public bool? IsCompleted { get; init; }Gets or initializes whether the provider confirms full game completion in this account and mode; null means unknown.
Remarks
This is independent of AchievementProgress.IsSnapshotComplete and is not inferred from achievement counts. An unknown value does not clear saved completion state.IsSnapshotComplete
public bool IsSnapshotComplete { get; }Gets whether this snapshot is authoritative for the entire game catalog and context. Missing achievements remain unknown when false; this does not indicate player completion.
TotalAchievements
public int? TotalAchievements { get; init; }Gets or initializes the observed total achievement count for this game and context; null means unknown.
Remarks
This count can describe the whole game even when individual observations are incomplete. It must be nonnegative.TotalPoints
public decimal? TotalPoints { get; init; }Gets or initializes the observed total achievement points available for this game and context; null means unknown.
Remarks
This value can describe the whole game even when individual observations are incomplete. It must be nonnegative and use the same units as AchievementDefinition.Points.UnlockedAchievements
public int? UnlockedAchievements { get; init; }Gets or initializes the observed unlocked count for this game and context; null means unknown.