This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
forked from cameroncondry/cbc-kitten-scientists
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): Move most settings to real classes
Part 1 of a series of refactorings to create a more useful, decoupled settings landscape. We no longer want to rely on object hashes and a global settings object.
- Loading branch information
1 parent
cf97e04
commit d17034c
Showing
39 changed files
with
1,415 additions
and
1,294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
packages/userscript/source/options/BuildingUpgradeSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { StagedBuilding } from "../types"; | ||
import { SettingsSection, SettingToggle } from "./SettingsSection"; | ||
import { Setting } from "./Settings"; | ||
import { SettingsSection } from "./SettingsSection"; | ||
|
||
export type BuildingUpgradeSettingsItem = SettingToggle; | ||
export class BuildingUpgradeSettings extends SettingsSection { | ||
items: { | ||
[item in StagedBuilding]: BuildingUpgradeSettingsItem; | ||
[item in StagedBuilding]: Setting; | ||
} = { | ||
broadcasttower: { enabled: true }, | ||
dataCenter: { enabled: true }, | ||
hydroplant: { enabled: true }, | ||
solarfarm: { enabled: true }, | ||
broadcasttower: new Setting(true), | ||
dataCenter: new Setting(true), | ||
hydroplant: new Setting(true), | ||
solarfarm: new Setting(true), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.