Skip to content

Commit

Permalink
Fix SOH issue
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Nov 28, 2024
1 parent b86c09a commit c4070c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Alpha/Gui/Windows/ExcelWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ILogger<ExcelWindow> logger
this.config = config;
this.GameData = gameData;
this.logger = logger;
this.excel.GameData = gameData;
this.excel.SetGameData(gameData);
this.InitialSize = new Vector2(800, 600);
}

Expand Down
7 changes: 4 additions & 3 deletions Alpha/Services/Excel/ExcelService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ public class ExcelService(WindowManagerService windowManager, ILogger<ExcelServi
public AlphaGameData? GameData;
public readonly Dictionary<string, IAlphaSheet?> SheetsCache = new();
public readonly Dictionary<string, SheetDefinition?> SheetDefinitions = new();
public string[] Sheets => (this.GameData?.GameData.Excel.SheetNames.ToArray()
.OrderBy(s => s)
.ToArray()) ?? [];
public string[] Sheets = [];

private readonly HttpClient httpClient = new();
private readonly List<string> resolvingDefinitions = new();
Expand All @@ -29,6 +27,9 @@ public void SetGameData(AlphaGameData gameData) {
this.SheetsCache.Clear();
this.SheetDefinitions.Clear();
this.resolvingDefinitions.Clear();
this.Sheets = this.GameData?.GameData.Excel.SheetNames.ToArray()
.OrderBy(s => s)
.ToArray() ?? [];
}

public IAlphaSheet? GetSheet(string name, bool skipCache = false, bool resolveDefinition = true) {
Expand Down

0 comments on commit c4070c5

Please sign in to comment.