add C++, Typescript and more stuff
This commit is contained in:
@@ -56,6 +56,8 @@ namespace KernelPanic.Run
|
||||
public string RunId { get; private set; }
|
||||
public bool IsSuspended { get; private set; }
|
||||
public RunJourney Journey { get; private set; } = new();
|
||||
public Meta.RunPerformanceSnapshot Performance { get; private set; } = new();
|
||||
public List<CheckpointCard> FinalDeck { get; private set; }
|
||||
public bool CampaignChoicePending => Journey.AtMilestone(_wavesCleared);
|
||||
public bool BuildRewardPending => Journey.pendingRewardWave > 0;
|
||||
public const int BuildRewardBits = 8;
|
||||
@@ -216,6 +218,8 @@ namespace KernelPanic.Run
|
||||
public void StartRun(RunConfig config)
|
||||
{
|
||||
CurrentConfig = config;
|
||||
Performance = new();
|
||||
FinalDeck = null;
|
||||
Journey = RunJourney.NewCampaign();
|
||||
if (config?.IsTutorial == true) Journey = new RunJourney();
|
||||
RunId = Guid.NewGuid().ToString("N");
|
||||
@@ -265,7 +269,7 @@ namespace KernelPanic.Run
|
||||
bandwidth = _accruedBandwidth, entropy = _accruedEntropy,
|
||||
maxUptimeBonus = _maxUptimeBonus, maxCyclesBonus = _maxCyclesBonus, ramBonus = _ramBonus,
|
||||
rerolls = _rerollsThisVisit, shopRandomDraws = _repositoryRandom.Draws,
|
||||
version = 4, journey = Journey.Copy(),
|
||||
version = 5, journey = Journey.Copy(), performance = Performance.Copy(),
|
||||
combat = combat.CaptureBoundaryState()
|
||||
};
|
||||
foreach (PackageInstance package in CurrentConfig.EquippedPackages)
|
||||
@@ -288,6 +292,8 @@ namespace KernelPanic.Run
|
||||
if (resume == null) throw new ArgumentNullException(nameof(resume));
|
||||
RunCheckpoint snapshot = resume.Snapshot;
|
||||
CurrentConfig = resume.Config;
|
||||
Performance = snapshot.performance?.schemaVersion == 1 ? snapshot.performance.Copy() : new Meta.RunPerformanceSnapshot { complete = false };
|
||||
FinalDeck = null;
|
||||
Journey = snapshot.journey?.Copy() ?? new RunJourney();
|
||||
RunId = snapshot.runId;
|
||||
IsSuspended = false;
|
||||
@@ -540,6 +546,7 @@ namespace KernelPanic.Run
|
||||
|
||||
private void HandleRunEnded(RunEndedEvent payload)
|
||||
{
|
||||
FinalDeck = _runDeck.Select(CheckpointCard.Capture).ToList();
|
||||
isRunActive = false;
|
||||
isPlayerDead = payload.PlayerDied;
|
||||
_bits = 0;
|
||||
|
||||
Reference in New Issue
Block a user