Fix C, more enemies and less scaling for enemies.

This commit is contained in:
2026-07-09 20:02:37 +02:00
parent 1e53968c36
commit e3ea42c93e
24 changed files with 1582 additions and 1113 deletions
+11 -11
View File
@@ -10,34 +10,34 @@ namespace KernelPanic.Meta
/// </summary>
public static class GachaPullContext
{
private static PendingGachaPull pendingPull;
private static CompletedGachaPull completedPull;
private static PendingGachaPull _pendingPull;
private static CompletedGachaPull _completedPull;
public static bool HasPendingPull => pendingPull != null;
public static bool HasCompletedPull => completedPull != null;
public static bool HasPendingPull => _pendingPull != null;
public static bool HasCompletedPull => _completedPull != null;
public static void SetPending(string bannerId, int pullCount, int entropyTokenCount, DistroDatabase distroDatabase, PackageDatabase packageDatabase, string focusUnitId)
{
pendingPull = new PendingGachaPull(bannerId, pullCount, entropyTokenCount, distroDatabase, packageDatabase, focusUnitId);
completedPull = null;
_pendingPull = new PendingGachaPull(bannerId, pullCount, entropyTokenCount, distroDatabase, packageDatabase, focusUnitId);
_completedPull = null;
}
public static bool TryConsumePending(out PendingGachaPull pull)
{
pull = pendingPull;
pendingPull = null;
pull = _pendingPull;
_pendingPull = null;
return pull != null;
}
public static void SetCompleted(CompletedGachaPull pull)
{
completedPull = pull;
_completedPull = pull;
}
public static bool TryConsumeCompleted(out CompletedGachaPull pull)
{
pull = completedPull;
completedPull = null;
pull = _completedPull;
_completedPull = null;
return pull != null;
}
}
+3 -3
View File
@@ -90,7 +90,7 @@ namespace KernelPanic.Meta
// with access to PackageDatabase) consumes this once per load to grant Cache for the extras,
// then clears it. See MainMenuController.LoadMetaState.
[NonSerialized]
public List<CollapsedPackageDuplicate> collapsedPackageDuplicates = new();
public List<CollapsedPackageDuplicate> CollapsedPackageDuplicates = new();
public static SaveData CreateDefault()
{
@@ -236,7 +236,7 @@ namespace KernelPanic.Meta
private void NormalizeOwnedPackages()
{
collapsedPackageDuplicates.Clear();
CollapsedPackageDuplicates.Clear();
Dictionary<string, OwnedPackageSaveEntry> highestById = new(StringComparer.OrdinalIgnoreCase);
Dictionary<string, int> extraCountById = new(StringComparer.OrdinalIgnoreCase);
for (int i = 0; i < ownedPackages.Count; i++)
@@ -265,7 +265,7 @@ namespace KernelPanic.Meta
ownedPackages = new List<OwnedPackageSaveEntry>(highestById.Values);
foreach (KeyValuePair<string, int> extra in extraCountById)
{
collapsedPackageDuplicates.Add(new CollapsedPackageDuplicate(extra.Key, extra.Value));
CollapsedPackageDuplicates.Add(new CollapsedPackageDuplicate(extra.Key, extra.Value));
}
ownedPackageIds.Clear();