Skip to content

Commit

Permalink
Merge pull request #24538 from smoogipoo/temp-optional-difficulty-att…
Browse files Browse the repository at this point in the history
…ribs

Temporarily allow new difficulty attributes to not exist
  • Loading branch information
peppy authored Aug 14, 2023
2 parents d2baffa + d1a4a46 commit fd3f5d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions osu.Game/Rulesets/Difficulty/DifficultyAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ public DifficultyAttributes(Mod[] mods, double starRating)
public virtual void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values, IBeatmapOnlineInfo onlineInfo)
{
MaxCombo = (int)values[ATTRIB_ID_MAX_COMBO];
LegacyAccuracyScore = (int)values[ATTRIB_ID_LEGACY_ACCURACY_SCORE];
LegacyComboScore = (int)values[ATTRIB_ID_LEGACY_COMBO_SCORE];
LegacyBonusScoreRatio = (int)values[ATTRIB_ID_LEGACY_BONUS_SCORE_RATIO];

// Temporarily allow these attributes to not exist so as to not block releases of server-side components while these attributes aren't populated/used yet.
LegacyAccuracyScore = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_ACCURACY_SCORE);
LegacyComboScore = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_COMBO_SCORE);
LegacyBonusScoreRatio = (int)values.GetValueOrDefault(ATTRIB_ID_LEGACY_BONUS_SCORE_RATIO);
}
}
}

0 comments on commit fd3f5d8

Please sign in to comment.