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
+13 -2
View File
@@ -34,6 +34,7 @@ namespace KernelPanic.Run
private int _wavesCleared;
private int _accruedBandwidth;
private int _accruedEntropy;
private int _accruedCommits;
private bool _repositoryVisitActive;
private bool _rewardsSettled;
@@ -52,6 +53,7 @@ namespace KernelPanic.Run
public int WavesCleared => _wavesCleared;
public int AccruedBandwidth => _accruedBandwidth;
public int AccruedEntropy => _accruedEntropy;
public int AccruedCommits => _accruedCommits;
public bool RewardsSettled => _rewardsSettled;
public string RunId { get; private set; }
public bool IsSuspended { get; private set; }
@@ -242,6 +244,7 @@ namespace KernelPanic.Run
_wavesCleared = 0;
_accruedBandwidth = 0;
_accruedEntropy = 0;
_accruedCommits = 0;
_rewardsSettled = false;
ApplyKernelPackageBonuses(config);
InitializeRunDeck(config);
@@ -266,7 +269,7 @@ namespace KernelPanic.Run
startingCards = CurrentConfig.StartingDeck.Select(card => card.Id).ToList(),
deck = _runDeck.Select(CheckpointCard.Capture).ToList(), soldKeys = _soldOfferKeys.ToList(),
wave = currentWaveNumber, wavesCleared = _wavesCleared, bits = _bits,
bandwidth = _accruedBandwidth, entropy = _accruedEntropy,
bandwidth = _accruedBandwidth, entropy = _accruedEntropy, commits = _accruedCommits,
maxUptimeBonus = _maxUptimeBonus, maxCyclesBonus = _maxCyclesBonus, ramBonus = _ramBonus,
rerolls = _rerollsThisVisit, shopRandomDraws = _repositoryRandom.Draws,
version = 6, journey = Journey.Copy(), performance = Performance.Copy(),
@@ -307,6 +310,7 @@ namespace KernelPanic.Run
_bits = snapshot.bits;
_accruedBandwidth = snapshot.bandwidth;
_accruedEntropy = snapshot.entropy;
_accruedCommits = snapshot.commits;
_maxUptimeBonus = snapshot.maxUptimeBonus;
_maxCyclesBonus = snapshot.maxCyclesBonus;
_ramBonus = snapshot.ramBonus;
@@ -493,7 +497,7 @@ namespace KernelPanic.Run
}
_rewardsSettled = true;
return bandwidth > 0 || entropy > 0;
return bandwidth > 0 || entropy > 0 || _accruedCommits > 0;
}
public void MarkRunRewardsSettled()
@@ -536,6 +540,7 @@ namespace KernelPanic.Run
{
_accruedBandwidth += CalculateBandwidthReward(clearedWave);
_accruedEntropy += CalculateEntropyReward(clearedWave);
_accruedCommits += CalculateCommitReward(clearedWave);
}
currentWaveNumber = Mathf.Max(currentWaveNumber + 1, payload.WaveNumber + 1);
EnsureRouteSelection();
@@ -572,6 +577,12 @@ namespace KernelPanic.Run
return waveNumber >= CombatTuning.EntropyStartWave ? Mathf.Max(0, CombatTuning.EntropyPerWave) : 0;
}
private static int CalculateCommitReward(int waveNumber)
{
if (waveNumber <= 0 || waveNumber % 5 != 0) return 0;
return waveNumber == RunJourney.BossWave ? 2 : 1;
}
private void InitializeRunDeck(RunConfig config)
{
_runDeck.Clear();