diff --git a/public/stylesheets/styles.css b/public/stylesheets/styles.css index 65880c8e5c..f33847aa32 100644 --- a/public/stylesheets/styles.css +++ b/public/stylesheets/styles.css @@ -1774,6 +1774,7 @@ br { .o-primary-btn--replicanti-galaxy-toggle { width: 22rem; font-size: 1.2rem; + white-space: pre-line; } .o-primary-btn--time-study-options { diff --git a/src/components/tabs/replicanti/ReplicantiGalaxyButton.vue b/src/components/tabs/replicanti/ReplicantiGalaxyButton.vue index 41565780a8..c1538ca284 100644 --- a/src/components/tabs/replicanti/ReplicantiGalaxyButton.vue +++ b/src/components/tabs/replicanti/ReplicantiGalaxyButton.vue @@ -14,6 +14,7 @@ export default { isAutoUnlocked: false, isAutoActive: false, isAutoEnabled: false, + hasOfflineAutobuyerPenalty: false, isDivideUnlocked: false, boughtGalaxies: 0, extraGalaxies: 0 @@ -37,7 +38,8 @@ export default { autobuyerTextDisplay() { const auto = this.isAutoActive; const disabled = !this.isAutoEnabled; - return `Auto Galaxy ${auto ? "ON" : "OFF"}${disabled ? " (disabled)" : ""}`; + const offlinePenaltyText = this.hasOfflineAutobuyerPenalty ? "\n(disabled while offline)" : ""; + return `Auto Galaxy ${auto ? "ON" : "OFF"}${disabled ? " (disabled)" : ""}${offlinePenaltyText}`; }, }, methods: { @@ -51,6 +53,7 @@ export default { this.isAutoUnlocked = auto.isUnlocked; this.isAutoActive = auto.isActive; this.isAutoEnabled = auto.isEnabled; + this.hasOfflineAutobuyerPenalty = TimeStudy(131).isBought && !Achievement(138).isUnlocked; }, handleAutoToggle(value) { Autobuyer.replicantiGalaxy.isActive = value; diff --git a/src/core/autobuyers/replicanti-galaxy-autobuyer.js b/src/core/autobuyers/replicanti-galaxy-autobuyer.js index ef29cd5b81..983b02c45c 100644 --- a/src/core/autobuyers/replicanti-galaxy-autobuyer.js +++ b/src/core/autobuyers/replicanti-galaxy-autobuyer.js @@ -14,7 +14,7 @@ export class ReplicantiGalaxyAutobuyerState extends AutobuyerState { } get isEnabled() { - return Achievement(138).isUnlocked || !TimeStudy(131).isBought; + return Achievement(138).isUnlocked || !TimeStudy(131).isBought || !GameStorage.isSimulatingOfflineProgress; } get hasUnlimitedBulk() { diff --git a/src/core/secret-formula/eternity/time-studies/normal-time-studies.js b/src/core/secret-formula/eternity/time-studies/normal-time-studies.js index 0b0877e143..21656c9bb5 100644 --- a/src/core/secret-formula/eternity/time-studies/normal-time-studies.js +++ b/src/core/secret-formula/eternity/time-studies/normal-time-studies.js @@ -318,7 +318,8 @@ export const normalTimeStudies = [ requiresST: [132, 133], description: () => (Achievement(138).isUnlocked ? `You can get ${formatPercents(0.5)} more Replicanti Galaxies` - : `Automatic Replicanti Galaxies are disabled, but you can get ${formatPercents(0.5)} more`), + : "Automatic Replicanti Galaxies are disabled while offline, but you can get " + + `${formatPercents(0.5)} more of them`), effect: () => Math.floor(player.replicanti.boughtGalaxyCap / 2) }, { @@ -330,7 +331,7 @@ export const normalTimeStudies = [ requiresST: [131, 133], description: () => (Pelle.isDoomed ? `Replicanti Galaxies are ${formatPercents(0.4)} stronger` - : `Replicanti Galaxies are ${formatPercents(0.4)} stronger and Replicanti are + : `Replicanti Galaxies are ${formatPercents(0.4)} stronger and Replicanti are ${Perk.studyPassive.isBought ? formatX(3) : formatX(1.5, 1, 1)} faster`), effect: 0.4 }, diff --git a/src/core/storage/storage.js b/src/core/storage/storage.js index c2a32a946c..963e4493fb 100644 --- a/src/core/storage/storage.js +++ b/src/core/storage/storage.js @@ -75,6 +75,7 @@ export const GameStorage = { lastCloudSave: Date.now(), offlineEnabled: undefined, offlineTicks: undefined, + isSimulatingOfflineProgress: false, lastUpdateOnLoad: 0, lastBackupTimes: [], oldBackupTimer: 0, @@ -500,6 +501,7 @@ export const GameStorage = { diff = Enslaved.autoStoreRealTime(diff); } if (diff > 10000) { + this.isSimulatingOfflineProgress = true; // The third parameter is a `fast` parameter that we use to only // simulate at most 50 ticks if the player was offline for less // than 50 seconds. @@ -534,6 +536,7 @@ export const GameStorage = { postLoadStuff() { // This is called from simulateTime, if that's called; otherwise, it gets called // manually above + this.isSimulatingOfflineProgress = false; GameIntervals.restart(); GameStorage.ignoreBackupTimer = false; Enslaved.nextTickDiff = player.options.updateRate; diff --git a/src/game.js b/src/game.js index 41a77d0f5e..39940318ca 100644 --- a/src/game.js +++ b/src/game.js @@ -448,6 +448,7 @@ export function gameLoop(passDiff, options = {}) { // simply letting it run through simulateTime seems to result in it using zero if (player.options.hibernationCatchup && passDiff === undefined && realDiff > 6e4) { GameIntervals.gameLoop.stop(); + GameStorage.isSimulatingOfflineProgress = true; simulateTime(realDiff / 1000, true); realTimeMechanics(realDiff); return;