Skip to content

Commit

Permalink
fix: missing properties on fresh install
Browse files Browse the repository at this point in the history
Values is needed before we add a new default leaderboard.
  • Loading branch information
kaiusl committed Apr 30, 2024
1 parent a73812b commit 415cae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugin/LeaderboardPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ public void Init(PluginManager pluginManager) {
LogInfo("Starting plugin");

GameDataPath = $@"{Settings.PluginDataLocation}\{gameName}";
// _values is needed by SettingsControl on first time initialization, even if the game is not ACC
this._values = new Values();
if (Settings.DynLeaderboardConfigs.Count == 0) {
this.AddNewLeaderboard(new DynLeaderboardConfig("Dynamic"));
}
// _values is needed by SettingsControl on first time initialization, even if the game is not ACC
this._values = new Values();
if (!Game.IsAcc) {
return;
}
Expand Down

0 comments on commit 415cae8

Please sign in to comment.