Revamp UI a whole lot

This commit is contained in:
2026-11-18 19:42:44 +01:00
parent 260abc2c98
commit fdde7f9d80
57 changed files with 2667 additions and 935 deletions
+21 -1
View File
@@ -16,7 +16,7 @@ namespace KernelPanic.Meta
public sealed class SaveService
{
private const string SaveFileName = "kernel-panic-save.json";
public const int CurrentSchemaVersion = 10;
public const int CurrentSchemaVersion = 11;
private static readonly object FileLock = new();
public string SavePath { get; }
@@ -300,6 +300,8 @@ namespace KernelPanic.Meta
public List<string> bannerPoolIds = new();
public GachaBannerState beginnerBannerState = new(GachaService.BeginnerBannerId);
public GachaBannerState standardBannerState = new(GachaService.StandardBannerId);
public GachaBannerState limitedBannerState = new(GachaService.LimitedBannerId);
public List<GachaPullHistoryEntry> gachaPullHistory = new();
public LastRunLoadoutSaveEntry lastRunLoadout = new();
public List<RunBuildDraftSaveEntry> runBuildDrafts = new();
public string lastSetupDistroId;
@@ -344,6 +346,24 @@ namespace KernelPanic.Meta
standardBannerState ??= new GachaBannerState(GachaService.StandardBannerId);
standardBannerState.bannerId = GachaService.StandardBannerId;
standardBannerState.EnsureLists();
limitedBannerState ??= new GachaBannerState(GachaService.LimitedBannerId);
limitedBannerState.bannerId = GachaService.LimitedBannerId;
limitedBannerState.EnsureLists();
gachaPullHistory ??= new List<GachaPullHistoryEntry>();
for (int i = gachaPullHistory.Count - 1; i >= 0; i--)
{
GachaPullHistoryEntry entry = gachaPullHistory[i];
if (entry == null || string.IsNullOrWhiteSpace(entry.bannerId))
{
gachaPullHistory.RemoveAt(i);
continue;
}
entry.EnsureLists();
}
if (gachaPullHistory.Count > GachaService.MaxPullHistoryEntries)
gachaPullHistory.RemoveRange(GachaService.MaxPullHistoryEntries,
gachaPullHistory.Count - GachaService.MaxPullHistoryEntries);
lastRunLoadout ??= new LastRunLoadoutSaveEntry();
lastRunLoadout.EnsureLists();
runBuildDrafts ??= new List<RunBuildDraftSaveEntry>();