Skip to content

Commit

Permalink
feat(time): Remove Chrono Furnace automation
Browse files Browse the repository at this point in the history
Always turning on Chrono Furnaces is counter-productive in most scenarios. This is superseded by better automations in the Time Control section.

Closes: #113
  • Loading branch information
oliversalzburg committed Nov 8, 2024
1 parent 045c328 commit 6b65326
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 41 deletions.
14 changes: 0 additions & 14 deletions packages/kitten-scientists/source/TimeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ export class TimeManager {
if (this.settings.fixCryochambers.enabled) {
this.fixCryochambers();
}
if (this.settings.turnOnChronoFurnace.enabled) {
this.turnOnChronoFurnace();
}
}

/**
Expand Down Expand Up @@ -200,15 +197,4 @@ export class TimeManager {
this._host.engine.storeForSummary("fix.cry", fixed);
}
}

turnOnChronoFurnace() {
const chronoFurnace = this._host.game.time.getCFU("blastFurnace");
if (!mustExist(chronoFurnace.isAutomationEnabled)) {
const button = this.getBuildButton("blastFurnace", TimeItemVariant.Chronoforge);
if (isNil(button?.model)) {
return;
}
button.controller.handleToggleAutomationLinkClick(button.model);
}
}
}
1 change: 0 additions & 1 deletion packages/kitten-scientists/source/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"option.accelerate": "Tempus Fugit",
"option.autofeed": "Feed Leviathans",
"option.catnip": "Gather Catnip",
"option.chronofurnace": "Turn on Chrono Furnaces",
"option.crypto": "Trade Blackcoin",
"option.elect.job.any": "Any",
"option.elect.job": "Job",
Expand Down
10 changes: 1 addition & 9 deletions packages/kitten-scientists/source/settings/TimeSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,11 @@ export class TimeSettings extends SettingTrigger {
buildings: TimeBuildingsSettings;

fixCryochambers: Setting;
turnOnChronoFurnace: Setting;

constructor(
enabled = false,
trigger = -1,
fixCryochambers = new Setting(false),
turnOnChronoFurnace = new Setting(false),
) {
constructor(enabled = false, trigger = -1, fixCryochambers = new Setting(false)) {
super(enabled, trigger);
this.buildings = this.initBuildings();
this.fixCryochambers = fixCryochambers;
this.turnOnChronoFurnace = turnOnChronoFurnace;
}

private initBuildings(): TimeBuildingsSettings {
Expand Down Expand Up @@ -78,6 +71,5 @@ export class TimeSettings extends SettingTrigger {
});

this.fixCryochambers.load(settings.fixCryochambers);
this.turnOnChronoFurnace.load(settings.turnOnChronoFurnace);
}
}
17 changes: 0 additions & 17 deletions packages/kitten-scientists/source/ui/TimeSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,6 @@ export class TimeSettingsUi extends SettingsPanel<TimeSettings> {
},
},
),
new SettingListItem(
this._host,
this._host.engine.i18n("option.chronofurnace"),
this.setting.turnOnChronoFurnace,
{
onCheck: () => {
this._host.engine.imessage("status.sub.enable", [
this._host.engine.i18n("option.chronofurnace"),
]);
},
onUnCheck: () => {
this._host.engine.imessage("status.sub.disable", [
this._host.engine.i18n("option.chronofurnace"),
]);
},
},
),
],
hasDisableAll: false,
hasEnableAll: false,
Expand Down

0 comments on commit 6b65326

Please sign in to comment.