Skip to content

Commit

Permalink
fix(time): Maximum amount of time allowed to be skipped during active…
Browse files Browse the repository at this point in the history
… HeatTransfer
  • Loading branch information
hyx3179 authored and oliversalzburg committed Jun 13, 2024
1 parent dbe6027 commit e979be0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/kitten-scientists/source/TimeControlManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ export class TimeControlManager {
}
}

let maxSkipsActiveHeatTransfer = Number.POSITIVE_INFINITY;
// Active Heat Transfer
if (
!this.settings.timeSkip.ignoreOverheat.enabled &&
Expand Down Expand Up @@ -472,11 +473,15 @@ export class TimeControlManager {
fluxEnabled &&
flux
) {
maxSkipsActiveHeatTransfer =
(SecondPerYear * this._host.game.ticksPerSecond) / temporalFluxProduction;
this._host.engine.iactivity("act.time.getTemporalFlux", [], "ks-timeSkip");
this._host.engine.storeForSummary("time.getTemporalFlux", 1);
} else if (this.settings.timeSkip.activeHeatTransfer.cycles[Cycles[currentCycle]].enabled) {
// Heat Transfer during selected cycles
return;
} else {
maxSkipsActiveHeatTransfer = this._host.game.calendar.yearsPerCycle;
}
} else if (heatNow >= heatMax - heatPerSecond * 10) {
this.activeHeatTransferStatus = true;
Expand All @@ -497,6 +502,7 @@ export class TimeControlManager {
? Number.POSITIVE_INFINITY
: (heatMax - heatNow) / factor,
maxSkips,
maxSkipsActiveHeatTransfer,
timeCrystalsAvailable / (1 + shatterCostIncreaseChallenge),
0 < shatterVoidCost ? voidAvailable / shatterVoidCost : Number.POSITIVE_INFINITY,
),
Expand Down

0 comments on commit e979be0

Please sign in to comment.