@kitten-science/kitten-scientists 2.0.0-beta.10-20250402-4e11d20 → 2.0.0-beta.10-dev-2a02d77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/KittenScientists.d.ts +1 -1
- package/lib/KittenScientists.d.ts.map +1 -1
- package/lib/KittenScientists.js +6 -6
- package/lib/KittenScientists.js.map +1 -1
- package/lib/ReligionManager.js +1 -1
- package/lib/ReligionManager.js.map +1 -1
- package/lib/TimeControlManager.js +2 -2
- package/lib/TimeControlManager.js.map +1 -1
- package/lib/TradeManager.d.ts.map +1 -1
- package/lib/TradeManager.js.map +1 -1
- package/lib/tools/Log.d.ts +1 -1
- package/lib/tools/Log.d.ts.map +1 -1
- package/lib/tools/Log.js +4 -1
- package/lib/tools/Log.js.map +1 -1
- package/lib/ui/BonfireSettingsUi.d.ts +4 -5
- package/lib/ui/BonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.js +109 -90
- package/lib/ui/BonfireSettingsUi.js.map +1 -1
- package/lib/ui/BuildSectionTools.d.ts +3 -13
- package/lib/ui/BuildSectionTools.d.ts.map +1 -1
- package/lib/ui/BuildSectionTools.js +52 -59
- package/lib/ui/BuildSectionTools.js.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts +2 -4
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.js +13 -20
- package/lib/ui/BuildingUpgradeSettingsUi.js.map +1 -1
- package/lib/ui/EmbassySettingsUi.d.ts +4 -5
- package/lib/ui/EmbassySettingsUi.d.ts.map +1 -1
- package/lib/ui/EmbassySettingsUi.js +48 -61
- package/lib/ui/EmbassySettingsUi.js.map +1 -1
- package/lib/ui/EngineSettingsUi.d.ts +2 -2
- package/lib/ui/EngineSettingsUi.d.ts.map +1 -1
- package/lib/ui/EngineSettingsUi.js +10 -8
- package/lib/ui/EngineSettingsUi.js.map +1 -1
- package/lib/ui/InternalsUi.d.ts +2 -2
- package/lib/ui/InternalsUi.d.ts.map +1 -1
- package/lib/ui/InternalsUi.js +43 -53
- package/lib/ui/InternalsUi.js.map +1 -1
- package/lib/ui/LogFilterSettingsUi.d.ts +2 -4
- package/lib/ui/LogFilterSettingsUi.d.ts.map +1 -1
- package/lib/ui/LogFilterSettingsUi.js +24 -32
- package/lib/ui/LogFilterSettingsUi.js.map +1 -1
- package/lib/ui/MissionSettingsUi.d.ts +2 -4
- package/lib/ui/MissionSettingsUi.d.ts.map +1 -1
- package/lib/ui/MissionSettingsUi.js +13 -18
- package/lib/ui/MissionSettingsUi.js.map +1 -1
- package/lib/ui/PolicySettingsUi.d.ts +2 -4
- package/lib/ui/PolicySettingsUi.d.ts.map +1 -1
- package/lib/ui/PolicySettingsUi.js +13 -20
- package/lib/ui/PolicySettingsUi.js.map +1 -1
- package/lib/ui/ReligionSettingsUi.d.ts +4 -5
- package/lib/ui/ReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ReligionSettingsUi.js +108 -132
- package/lib/ui/ReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.d.ts +2 -2
- package/lib/ui/ResetBonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.js +30 -36
- package/lib/ui/ResetBonfireSettingsUi.js.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.d.ts +2 -2
- package/lib/ui/ResetReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.js +42 -51
- package/lib/ui/ResetReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.js +24 -31
- package/lib/ui/ResetResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ResetSettingsUi.d.ts +2 -4
- package/lib/ui/ResetSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSettingsUi.js +14 -19
- package/lib/ui/ResetSettingsUi.js.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.d.ts +2 -2
- package/lib/ui/ResetSpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.js +30 -39
- package/lib/ui/ResetSpaceSettingsUi.js.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.d.ts +2 -2
- package/lib/ui/ResetTimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.js +32 -41
- package/lib/ui/ResetTimeSettingsUi.js.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetUpgradesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.js +12 -12
- package/lib/ui/ResetUpgradesSettingsUi.js.map +1 -1
- package/lib/ui/ResourcesSettingsUi.d.ts +2 -4
- package/lib/ui/ResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResourcesSettingsUi.js +16 -20
- package/lib/ui/ResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ScienceSettingsUi.d.ts +2 -4
- package/lib/ui/ScienceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ScienceSettingsUi.js +16 -35
- package/lib/ui/ScienceSettingsUi.js.map +1 -1
- package/lib/ui/SpaceSettingsUi.d.ts +4 -5
- package/lib/ui/SpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/SpaceSettingsUi.js +43 -51
- package/lib/ui/SpaceSettingsUi.js.map +1 -1
- package/lib/ui/StateManagementUi.d.ts +2 -2
- package/lib/ui/StateManagementUi.d.ts.map +1 -1
- package/lib/ui/StateManagementUi.js +162 -169
- package/lib/ui/StateManagementUi.js.map +1 -1
- package/lib/ui/TechSettingsUi.d.ts +4 -5
- package/lib/ui/TechSettingsUi.d.ts.map +1 -1
- package/lib/ui/TechSettingsUi.js +51 -69
- package/lib/ui/TechSettingsUi.js.map +1 -1
- package/lib/ui/TimeControlSettingsUi.d.ts +3 -4
- package/lib/ui/TimeControlSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeControlSettingsUi.js +22 -34
- package/lib/ui/TimeControlSettingsUi.js.map +1 -1
- package/lib/ui/TimeSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSettingsUi.js +55 -62
- package/lib/ui/TimeSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.js +28 -44
- package/lib/ui/TimeSkipHeatSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.d.ts +2 -4
- package/lib/ui/TimeSkipSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.js +75 -103
- package/lib/ui/TimeSkipSettingsUi.js.map +1 -1
- package/lib/ui/TradeSettingsUi.d.ts +4 -5
- package/lib/ui/TradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TradeSettingsUi.js +102 -115
- package/lib/ui/TradeSettingsUi.js.map +1 -1
- package/lib/ui/UpgradeSettingsUi.d.ts +4 -5
- package/lib/ui/UpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/UpgradeSettingsUi.js +50 -66
- package/lib/ui/UpgradeSettingsUi.js.map +1 -1
- package/lib/ui/UserInterface.d.ts +3 -0
- package/lib/ui/UserInterface.d.ts.map +1 -1
- package/lib/ui/UserInterface.js +37 -19
- package/lib/ui/UserInterface.js.map +1 -1
- package/lib/ui/VillageSettingsUi.d.ts +2 -4
- package/lib/ui/VillageSettingsUi.d.ts.map +1 -1
- package/lib/ui/VillageSettingsUi.js +87 -105
- package/lib/ui/VillageSettingsUi.js.map +1 -1
- package/lib/ui/WorkshopSettingsUi.d.ts +4 -5
- package/lib/ui/WorkshopSettingsUi.d.ts.map +1 -1
- package/lib/ui/WorkshopSettingsUi.js +82 -103
- package/lib/ui/WorkshopSettingsUi.js.map +1 -1
- package/lib/ui/components/Button.d.ts +9 -8
- package/lib/ui/components/Button.d.ts.map +1 -1
- package/lib/ui/components/Button.js +8 -6
- package/lib/ui/components/Button.js.map +1 -1
- package/lib/ui/components/ButtonListItem.d.ts +4 -4
- package/lib/ui/components/ButtonListItem.d.ts.map +1 -1
- package/lib/ui/components/ButtonListItem.js +2 -7
- package/lib/ui/components/ButtonListItem.js.map +1 -1
- package/lib/ui/components/CollapsiblePanel.d.ts +15 -11
- package/lib/ui/components/CollapsiblePanel.d.ts.map +1 -1
- package/lib/ui/components/CollapsiblePanel.js +42 -25
- package/lib/ui/components/CollapsiblePanel.js.map +1 -1
- package/lib/ui/components/Container.d.ts +7 -2
- package/lib/ui/components/Container.d.ts.map +1 -1
- package/lib/ui/components/Container.js +6 -3
- package/lib/ui/components/Container.js.map +1 -1
- package/lib/ui/components/CyclesList.d.ts +7 -8
- package/lib/ui/components/CyclesList.d.ts.map +1 -1
- package/lib/ui/components/CyclesList.js +34 -27
- package/lib/ui/components/CyclesList.js.map +1 -1
- package/lib/ui/components/Delimiter.d.ts +3 -2
- package/lib/ui/components/Delimiter.d.ts.map +1 -1
- package/lib/ui/components/Delimiter.js +6 -2
- package/lib/ui/components/Delimiter.js.map +1 -1
- package/lib/ui/components/Dialog.d.ts +14 -6
- package/lib/ui/components/Dialog.d.ts.map +1 -1
- package/lib/ui/components/Dialog.js +66 -40
- package/lib/ui/components/Dialog.js.map +1 -1
- package/lib/ui/components/ExplainerListItem.d.ts +5 -2
- package/lib/ui/components/ExplainerListItem.d.ts.map +1 -1
- package/lib/ui/components/ExplainerListItem.js +7 -4
- package/lib/ui/components/ExplainerListItem.js.map +1 -1
- package/lib/ui/components/Fieldset.d.ts +6 -4
- package/lib/ui/components/Fieldset.d.ts.map +1 -1
- package/lib/ui/components/Fieldset.js +6 -3
- package/lib/ui/components/Fieldset.js.map +1 -1
- package/lib/ui/components/HeaderListItem.d.ts +6 -3
- package/lib/ui/components/HeaderListItem.d.ts.map +1 -1
- package/lib/ui/components/HeaderListItem.js +6 -3
- package/lib/ui/components/HeaderListItem.js.map +1 -1
- package/lib/ui/components/IconButton.d.ts +8 -6
- package/lib/ui/components/IconButton.d.ts.map +1 -1
- package/lib/ui/components/IconButton.js +6 -5
- package/lib/ui/components/IconButton.js.map +1 -1
- package/lib/ui/components/IconSettingsPanel.d.ts +5 -4
- package/lib/ui/components/IconSettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/IconSettingsPanel.js +4 -2
- package/lib/ui/components/IconSettingsPanel.js.map +1 -1
- package/lib/ui/components/Input.d.ts +6 -3
- package/lib/ui/components/Input.d.ts.map +1 -1
- package/lib/ui/components/Input.js +6 -3
- package/lib/ui/components/Input.js.map +1 -1
- package/lib/ui/components/LabelListItem.d.ts +10 -7
- package/lib/ui/components/LabelListItem.d.ts.map +1 -1
- package/lib/ui/components/LabelListItem.js +21 -10
- package/lib/ui/components/LabelListItem.js.map +1 -1
- package/lib/ui/components/ListItem.d.ts +9 -6
- package/lib/ui/components/ListItem.d.ts.map +1 -1
- package/lib/ui/components/ListItem.js +6 -3
- package/lib/ui/components/ListItem.js.map +1 -1
- package/lib/ui/components/OptionsListItem.d.ts +6 -5
- package/lib/ui/components/OptionsListItem.d.ts.map +1 -1
- package/lib/ui/components/OptionsListItem.js +7 -5
- package/lib/ui/components/OptionsListItem.js.map +1 -1
- package/lib/ui/components/Paragraph.d.ts +7 -2
- package/lib/ui/components/Paragraph.d.ts.map +1 -1
- package/lib/ui/components/Paragraph.js +6 -3
- package/lib/ui/components/Paragraph.js.map +1 -1
- package/lib/ui/components/RadioItem.d.ts +9 -7
- package/lib/ui/components/RadioItem.d.ts.map +1 -1
- package/lib/ui/components/RadioItem.js +9 -7
- package/lib/ui/components/RadioItem.js.map +1 -1
- package/lib/ui/components/SeasonsList.d.ts +7 -6
- package/lib/ui/components/SeasonsList.d.ts.map +1 -1
- package/lib/ui/components/SeasonsList.js +20 -13
- package/lib/ui/components/SeasonsList.js.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.d.ts +7 -7
- package/lib/ui/components/SettingLimitedListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.js +7 -8
- package/lib/ui/components/SettingLimitedListItem.js.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts +7 -6
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.js +12 -11
- package/lib/ui/components/SettingLimitedTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingListItem.d.ts +11 -11
- package/lib/ui/components/SettingListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingListItem.js +16 -20
- package/lib/ui/components/SettingListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxListItem.d.ts +7 -7
- package/lib/ui/components/SettingMaxListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxListItem.js +12 -10
- package/lib/ui/components/SettingMaxListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts +9 -6
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.js +19 -14
- package/lib/ui/components/SettingMaxTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.d.ts +8 -7
- package/lib/ui/components/SettingTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.js +15 -12
- package/lib/ui/components/SettingTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingsList.d.ts +13 -11
- package/lib/ui/components/SettingsList.d.ts.map +1 -1
- package/lib/ui/components/SettingsList.js +15 -16
- package/lib/ui/components/SettingsList.js.map +1 -1
- package/lib/ui/components/SettingsPanel.d.ts +9 -8
- package/lib/ui/components/SettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/SettingsPanel.js +10 -10
- package/lib/ui/components/SettingsPanel.js.map +1 -1
- package/lib/ui/components/TextButton.d.ts +7 -6
- package/lib/ui/components/TextButton.d.ts.map +1 -1
- package/lib/ui/components/TextButton.js +7 -5
- package/lib/ui/components/TextButton.js.map +1 -1
- package/lib/ui/components/ToolbarListItem.d.ts +6 -5
- package/lib/ui/components/ToolbarListItem.d.ts.map +1 -1
- package/lib/ui/components/ToolbarListItem.js +7 -12
- package/lib/ui/components/ToolbarListItem.js.map +1 -1
- package/lib/ui/components/UiComponent.d.ts +32 -18
- package/lib/ui/components/UiComponent.d.ts.map +1 -1
- package/lib/ui/components/UiComponent.js +50 -19
- package/lib/ui/components/UiComponent.js.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.d.ts +8 -7
- package/lib/ui/components/WorkshopCraftListItem.d.ts.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.js +17 -18
- package/lib/ui/components/WorkshopCraftListItem.js.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.d.ts +5 -2
- package/lib/ui/components/buttons/ConsumeButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.js +19 -26
- package/lib/ui/components/buttons/ConsumeButton.js.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.d.ts +6 -2
- package/lib/ui/components/buttons/ExpandoButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.js +10 -9
- package/lib/ui/components/buttons/ExpandoButton.js.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.d.ts +8 -7
- package/lib/ui/components/buttons/LimitedButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.js +20 -13
- package/lib/ui/components/buttons/LimitedButton.js.map +1 -1
- package/lib/ui/components/buttons/MaxButton.d.ts +5 -5
- package/lib/ui/components/buttons/MaxButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/MaxButton.js +5 -7
- package/lib/ui/components/buttons/MaxButton.js.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.d.ts +5 -2
- package/lib/ui/components/buttons/PaddingButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.js +6 -3
- package/lib/ui/components/buttons/PaddingButton.js.map +1 -1
- package/lib/ui/components/buttons/StockButton.d.ts +5 -2
- package/lib/ui/components/buttons/StockButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/StockButton.js +25 -32
- package/lib/ui/components/buttons/StockButton.js.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.d.ts +6 -5
- package/lib/ui/components/buttons/TriggerButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.js +11 -12
- package/lib/ui/components/buttons/TriggerButton.js.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/BuyButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.js +19 -26
- package/lib/ui/components/buttons-text/BuyButton.js.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/SellButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.js +19 -28
- package/lib/ui/components/buttons-text/SellButton.js.map +1 -1
- package/output/kitten-scientists.inject.js +2441 -2516
- package/package.json +6 -6
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isNil } from "@oliversalzburg/js-utils/data/nil.js";
|
|
2
|
-
import { redirectErrorsToConsole } from "@oliversalzburg/js-utils/errors/console.js";
|
|
3
2
|
import { Icons } from "../images/Icons.js";
|
|
4
3
|
import stylesButton from "./components/Button.module.css";
|
|
5
4
|
import { Container } from "./components/Container.js";
|
|
@@ -12,73 +11,68 @@ import { SettingTriggerListItem } from "./components/SettingTriggerListItem.js";
|
|
|
12
11
|
import { SettingsList } from "./components/SettingsList.js";
|
|
13
12
|
export class ResetBonfireSettingsUi extends IconSettingsPanel {
|
|
14
13
|
_buildings;
|
|
15
|
-
constructor(
|
|
16
|
-
const label = host.engine.i18n("ui.build");
|
|
17
|
-
super(
|
|
18
|
-
childrenHead: [new Container(host, { classes: [stylesLabelListItem.fillSpace] })],
|
|
14
|
+
constructor(parent, settings, locale) {
|
|
15
|
+
const label = parent.host.engine.i18n("ui.build");
|
|
16
|
+
super(parent, label, settings, {
|
|
19
17
|
icon: Icons.Bonfire,
|
|
20
18
|
});
|
|
19
|
+
this.addChildrenHead([new Container(parent, { classes: [stylesLabelListItem.fillSpace] })]);
|
|
21
20
|
this._buildings = [];
|
|
22
|
-
for (const buildingGroup of host.game.bld.buildingGroups) {
|
|
23
|
-
this._buildings.push(new HeaderListItem(
|
|
21
|
+
for (const buildingGroup of this.host.game.bld.buildingGroups) {
|
|
22
|
+
this._buildings.push(new HeaderListItem(this, buildingGroup.title));
|
|
24
23
|
for (const building of buildingGroup.buildings) {
|
|
25
24
|
if (building === "unicornPasture" || isNil(this.setting.buildings[building])) {
|
|
26
25
|
continue;
|
|
27
26
|
}
|
|
28
|
-
const meta = host.game.bld.getBuildingExt(building).meta;
|
|
27
|
+
const meta = this.host.game.bld.getBuildingExt(building).meta;
|
|
29
28
|
if (!isNil(meta.stages)) {
|
|
30
29
|
const name = Object.values(this.setting.buildings).find(item => item.baseBuilding === building)?.building;
|
|
31
|
-
this._buildings.push(this._getResetOption(
|
|
30
|
+
this._buildings.push(this._getResetOption(this, this.setting.buildings[building], locale, settings, meta.stages[0].label), this._getResetOption(this, this.setting.buildings[name], locale, settings, meta.stages[1].label, false, true));
|
|
32
31
|
}
|
|
33
32
|
else if (!isNil(meta.label)) {
|
|
34
|
-
this._buildings.push(this._getResetOption(
|
|
33
|
+
this._buildings.push(this._getResetOption(this, this.setting.buildings[building], locale, settings, meta.label));
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
// Add padding after each group. Except for the last group, which ends the list.
|
|
38
|
-
if (buildingGroup !==
|
|
37
|
+
if (buildingGroup !==
|
|
38
|
+
this.host.game.bld.buildingGroups[this.host.game.bld.buildingGroups.length - 1]) {
|
|
39
39
|
this._buildings.at(-1)?.element.addClass(stylesDelimiter.delimiter);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
const listBuildings = new SettingsList(
|
|
42
|
+
const listBuildings = new SettingsList(this);
|
|
43
43
|
listBuildings.addChildren(this._buildings);
|
|
44
44
|
this.addChild(listBuildings);
|
|
45
45
|
}
|
|
46
|
-
_getResetOption(
|
|
47
|
-
const element = new SettingTriggerListItem(
|
|
46
|
+
_getResetOption(parent, option, locale, sectionSetting, label, delimiter = false, upgradeIndicator = false) {
|
|
47
|
+
const element = new SettingTriggerListItem(parent, option, locale, label, {
|
|
48
48
|
delimiter,
|
|
49
49
|
onCheck: () => {
|
|
50
|
-
host.engine.imessage("status.reset.check.enable", [label]);
|
|
50
|
+
parent.host.engine.imessage("status.reset.check.enable", [label]);
|
|
51
51
|
},
|
|
52
52
|
onUnCheck: () => {
|
|
53
|
-
host.engine.imessage("status.reset.check.disable", [label]);
|
|
53
|
+
parent.host.engine.imessage("status.reset.check.disable", [label]);
|
|
54
54
|
},
|
|
55
55
|
onRefresh: () => {
|
|
56
56
|
element.triggerButton.inactive = !option.enabled || option.trigger === -1;
|
|
57
57
|
element.triggerButton.ineffective =
|
|
58
58
|
sectionSetting.enabled && option.enabled && option.trigger === -1;
|
|
59
59
|
},
|
|
60
|
-
onSetTrigger: () => {
|
|
61
|
-
Dialog.prompt(
|
|
60
|
+
onSetTrigger: async () => {
|
|
61
|
+
const value = await Dialog.prompt(parent, parent.host.engine.i18n("ui.trigger.prompt.absolute"), parent.host.engine.i18n("ui.trigger.build.prompt", [
|
|
62
62
|
label,
|
|
63
63
|
option.trigger !== -1
|
|
64
|
-
? host.renderAbsolute(option.trigger, locale.selected)
|
|
65
|
-
: host.engine.i18n("ui.trigger.inactive"),
|
|
66
|
-
]), option.trigger !== -1 ? host.renderAbsolute(option.trigger) : "", host.engine.i18n("ui.trigger.reset.promptExplainer"))
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
option.trigger = Number(value);
|
|
77
|
-
})
|
|
78
|
-
.then(() => {
|
|
79
|
-
element.refreshUi();
|
|
80
|
-
})
|
|
81
|
-
.catch(redirectErrorsToConsole(console));
|
|
64
|
+
? parent.host.renderAbsolute(option.trigger, locale.selected)
|
|
65
|
+
: parent.host.engine.i18n("ui.trigger.inactive"),
|
|
66
|
+
]), option.trigger !== -1 ? parent.host.renderAbsolute(option.trigger) : "", parent.host.engine.i18n("ui.trigger.reset.promptExplainer"));
|
|
67
|
+
if (value === undefined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (value === "" || value.startsWith("-")) {
|
|
71
|
+
option.trigger = -1;
|
|
72
|
+
option.enabled = false;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
option.trigger = Number(value);
|
|
82
76
|
},
|
|
83
77
|
upgradeIndicator,
|
|
84
78
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetBonfireSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetBonfireSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"ResetBonfireSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetBonfireSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,OAAO,YAAY,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,mBAA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D,KAAK;oBACL,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;wBACnB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC;wBAC7D,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;iBACnD,CAAC,EACF,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EACvE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAC5D,CAAC;gBAEF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACxB,OAAO;gBACT,CAAC;gBAED,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC1C,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;oBACpB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;oBACvB,OAAO;gBACT,CAAC;gBAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,gBAAgB;SACjB,CAAC,CAAC;QACH,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../KittenScientists.js";
|
|
3
2
|
import type { ResetReligionSettings } from "../settings/ResetReligionSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
5
4
|
import { IconSettingsPanel } from "./components/IconSettingsPanel.js";
|
|
5
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
6
6
|
export declare class ResetReligionSettingsUi extends IconSettingsPanel<ResetReligionSettings> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(parent: UiComponent, settings: ResetReligionSettings, locale: SettingOptions<SupportedLocale>);
|
|
8
8
|
private _getResetOption;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=ResetReligionSettingsUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetReligionSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetReligionSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetReligionSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetReligionSettingsUi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,yBAAyB,CAAC;AAO9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,uBAAwB,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;gBAEjF,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,qBAAqB,EAC/B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC;IAkFzC,OAAO,CAAC,eAAe;CAqDxB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isNil } from "@oliversalzburg/js-utils/data/nil.js";
|
|
2
|
-
import { redirectErrorsToConsole } from "@oliversalzburg/js-utils/errors/console.js";
|
|
3
2
|
import { Icons } from "../images/Icons.js";
|
|
4
3
|
import { UnicornItems } from "../types/index.js";
|
|
5
4
|
import stylesButton from "./components/Button.module.css";
|
|
@@ -12,72 +11,64 @@ import stylesLabelListItem from "./components/LabelListItem.module.css";
|
|
|
12
11
|
import { SettingTriggerListItem } from "./components/SettingTriggerListItem.js";
|
|
13
12
|
import { SettingsList } from "./components/SettingsList.js";
|
|
14
13
|
export class ResetReligionSettingsUi extends IconSettingsPanel {
|
|
15
|
-
constructor(
|
|
16
|
-
const label = host.engine.i18n("ui.faith");
|
|
17
|
-
super(
|
|
18
|
-
childrenHead: [new Container(host, { classes: [stylesLabelListItem.fillSpace] })],
|
|
14
|
+
constructor(parent, settings, locale) {
|
|
15
|
+
const label = parent.host.engine.i18n("ui.faith");
|
|
16
|
+
super(parent, label, settings, {
|
|
19
17
|
icon: Icons.Religion,
|
|
20
18
|
});
|
|
19
|
+
this.addChildrenHead([new Container(parent, { classes: [stylesLabelListItem.fillSpace] })]);
|
|
21
20
|
const unicornsArray = [...UnicornItems];
|
|
22
|
-
this.addChild(new SettingsList(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
],
|
|
43
|
-
}));
|
|
21
|
+
this.addChild(new SettingsList(this).addChildren([
|
|
22
|
+
new HeaderListItem(this, this.host.engine.i18n("$religion.panel.ziggurat.label")),
|
|
23
|
+
this._getResetOption(this, this.setting.buildings.unicornPasture, locale, settings, this.host.engine.i18n("$buildings.unicornPasture.label")),
|
|
24
|
+
...this.host.game.religion.zigguratUpgrades
|
|
25
|
+
.filter(item => unicornsArray.includes(item.name) && !isNil(this.setting.buildings[item.name]))
|
|
26
|
+
.map(zigguratUpgrade => this._getResetOption(this, this.setting.buildings[zigguratUpgrade.name], locale, settings, zigguratUpgrade.label)),
|
|
27
|
+
new Delimiter(this),
|
|
28
|
+
...this.host.game.religion.zigguratUpgrades
|
|
29
|
+
.filter(item => !unicornsArray.includes(item.name) && !isNil(this.setting.buildings[item.name]))
|
|
30
|
+
.map(upgrade => this._getResetOption(this, this.setting.buildings[upgrade.name], locale, settings, upgrade.label)),
|
|
31
|
+
new Delimiter(this),
|
|
32
|
+
new HeaderListItem(this, this.host.engine.i18n("$religion.panel.orderOfTheSun.label")),
|
|
33
|
+
...this.host.game.religion.religionUpgrades
|
|
34
|
+
.filter(item => !isNil(this.setting.buildings[item.name]))
|
|
35
|
+
.map(upgrade => this._getResetOption(this, this.setting.buildings[upgrade.name], locale, settings, upgrade.label, upgrade.name === this.host.game.religion.religionUpgrades.at(-1)?.name)),
|
|
36
|
+
new HeaderListItem(this, this.host.engine.i18n("$religion.panel.cryptotheology.label")),
|
|
37
|
+
...this.host.game.religion.transcendenceUpgrades
|
|
38
|
+
.filter(item => !isNil(this.setting.buildings[item.name]))
|
|
39
|
+
.map(upgrade => this._getResetOption(this, this.setting.buildings[upgrade.name], locale, settings, upgrade.label)),
|
|
40
|
+
]));
|
|
44
41
|
}
|
|
45
|
-
_getResetOption(
|
|
46
|
-
const element = new SettingTriggerListItem(
|
|
42
|
+
_getResetOption(parent, option, locale, sectionSetting, label, delimiter = false, upgradeIndicator = false) {
|
|
43
|
+
const element = new SettingTriggerListItem(parent, option, locale, label, {
|
|
47
44
|
delimiter,
|
|
48
45
|
onCheck: () => {
|
|
49
|
-
host.engine.imessage("status.reset.check.enable", [label]);
|
|
46
|
+
parent.host.engine.imessage("status.reset.check.enable", [label]);
|
|
50
47
|
},
|
|
51
48
|
onUnCheck: () => {
|
|
52
|
-
host.engine.imessage("status.reset.check.disable", [label]);
|
|
49
|
+
parent.host.engine.imessage("status.reset.check.disable", [label]);
|
|
53
50
|
},
|
|
54
51
|
onRefresh: () => {
|
|
55
52
|
element.triggerButton.inactive = !option.enabled || option.trigger === -1;
|
|
56
53
|
element.triggerButton.ineffective =
|
|
57
54
|
sectionSetting.enabled && option.enabled && option.trigger === -1;
|
|
58
55
|
},
|
|
59
|
-
onSetTrigger: () => {
|
|
60
|
-
Dialog.prompt(
|
|
56
|
+
onSetTrigger: async () => {
|
|
57
|
+
const value = await Dialog.prompt(parent, parent.host.engine.i18n("ui.trigger.prompt.absolute"), parent.host.engine.i18n("ui.trigger.build.prompt", [
|
|
61
58
|
label,
|
|
62
59
|
option.trigger !== -1
|
|
63
|
-
? host.renderAbsolute(option.trigger, locale.selected)
|
|
64
|
-
: host.engine.i18n("ui.trigger.inactive"),
|
|
65
|
-
]), option.trigger !== -1 ? host.renderAbsolute(option.trigger) : "", host.engine.i18n("ui.trigger.reset.promptExplainer"))
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
option.trigger = Number(value);
|
|
76
|
-
})
|
|
77
|
-
.then(() => {
|
|
78
|
-
element.refreshUi();
|
|
79
|
-
})
|
|
80
|
-
.catch(redirectErrorsToConsole(console));
|
|
60
|
+
? parent.host.renderAbsolute(option.trigger, locale.selected)
|
|
61
|
+
: parent.host.engine.i18n("ui.trigger.inactive"),
|
|
62
|
+
]), option.trigger !== -1 ? parent.host.renderAbsolute(option.trigger) : "", parent.host.engine.i18n("ui.trigger.reset.promptExplainer"));
|
|
63
|
+
if (value === undefined) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (value === "" || value.startsWith("-")) {
|
|
67
|
+
option.trigger = -1;
|
|
68
|
+
option.enabled = false;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
option.trigger = Number(value);
|
|
81
72
|
},
|
|
82
73
|
upgradeIndicator,
|
|
83
74
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetReligionSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetReligionSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
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,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC;iBACnD,CAAC,EACF,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EACvE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAC5D,CAAC;gBAEF,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;oBACxB,OAAO;gBACT,CAAC;gBAED,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC1C,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC;oBACpB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;oBACvB,OAAO;gBACT,CAAC;gBAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,gBAAgB;SACjB,CAAC,CAAC;QACH,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../KittenScientists.js";
|
|
3
2
|
import type { ResetResourcesSettings } from "../settings/ResetResourcesSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
5
4
|
import { IconSettingsPanel } from "./components/IconSettingsPanel.js";
|
|
5
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
6
6
|
export declare class ResetResourcesSettingsUi extends IconSettingsPanel<ResetResourcesSettings> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(parent: UiComponent, settings: ResetResourcesSettings, locale: SettingOptions<SupportedLocale>);
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=ResetResourcesSettingsUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetResourcesSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetResourcesSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetResourcesSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetResourcesSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,wBAAyB,SAAQ,iBAAiB,CAAC,sBAAsB,CAAC;gBAEnF,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,sBAAsB,EAChC,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC;CAwE1C"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { redirectErrorsToConsole } from "@oliversalzburg/js-utils/errors/console.js";
|
|
2
1
|
import { Icons } from "../images/Icons.js";
|
|
3
2
|
import { ucfirst } from "../tools/Format.js";
|
|
4
3
|
import stylesButton from "./components/Button.module.css";
|
|
@@ -9,55 +8,49 @@ import stylesLabelListItem from "./components/LabelListItem.module.css";
|
|
|
9
8
|
import { SettingTriggerListItem } from "./components/SettingTriggerListItem.js";
|
|
10
9
|
import { SettingsList } from "./components/SettingsList.js";
|
|
11
10
|
export class ResetResourcesSettingsUi extends IconSettingsPanel {
|
|
12
|
-
constructor(
|
|
13
|
-
const label = host.engine.i18n("ui.resources");
|
|
14
|
-
super(
|
|
15
|
-
childrenHead: [new Container(host, { classes: [stylesLabelListItem.fillSpace] })],
|
|
11
|
+
constructor(parent, settings, locale) {
|
|
12
|
+
const label = parent.host.engine.i18n("ui.resources");
|
|
13
|
+
super(parent, label, settings, {
|
|
16
14
|
icon: Icons.Resources,
|
|
17
15
|
});
|
|
18
|
-
|
|
16
|
+
this.addChildrenHead([new Container(parent, { classes: [stylesLabelListItem.fillSpace] })]);
|
|
17
|
+
const resources = this.host.game.resPool.resources;
|
|
19
18
|
const items = [];
|
|
20
19
|
let lastLabel = resources[0].title;
|
|
21
20
|
for (const resource of [...resources].sort((a, b) => a.title.localeCompare(b.title, locale.selected))) {
|
|
22
21
|
const option = this.setting.resources[resource.name];
|
|
23
|
-
const element = new SettingTriggerListItem(
|
|
22
|
+
const element = new SettingTriggerListItem(this, option, locale, ucfirst(resource.title), {
|
|
24
23
|
onCheck: () => {
|
|
25
|
-
host.engine.imessage("status.sub.enable", [resource.title]);
|
|
24
|
+
this.host.engine.imessage("status.sub.enable", [resource.title]);
|
|
26
25
|
},
|
|
27
26
|
onUnCheck: () => {
|
|
28
|
-
host.engine.imessage("status.sub.disable", [resource.title]);
|
|
27
|
+
this.host.engine.imessage("status.sub.disable", [resource.title]);
|
|
29
28
|
},
|
|
30
29
|
onRefresh: () => {
|
|
31
30
|
element.triggerButton.inactive = !option.enabled || option.trigger === -1;
|
|
32
31
|
element.triggerButton.ineffective =
|
|
33
32
|
settings.enabled && option.enabled && option.trigger === -1;
|
|
34
33
|
},
|
|
35
|
-
onSetTrigger: () => {
|
|
36
|
-
Dialog.prompt(
|
|
34
|
+
onSetTrigger: async () => {
|
|
35
|
+
const value = await Dialog.prompt(this, this.host.engine.i18n("ui.trigger.prompt.float"), this.host.engine.i18n("ui.trigger.build.prompt", [
|
|
37
36
|
resource.title,
|
|
38
37
|
option.trigger !== -1
|
|
39
|
-
? host.renderAbsolute(option.trigger, locale.selected)
|
|
40
|
-
: host.engine.i18n("ui.trigger.inactive"),
|
|
41
|
-
]), option.trigger !== -1 ? host.renderAbsolute(option.trigger) : "", host.engine.i18n("ui.trigger.reset.promptExplainer"))
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
option.trigger = Number(value);
|
|
52
|
-
})
|
|
53
|
-
.then(() => {
|
|
54
|
-
element.refreshUi();
|
|
55
|
-
})
|
|
56
|
-
.catch(redirectErrorsToConsole(console));
|
|
38
|
+
? this.host.renderAbsolute(option.trigger, locale.selected)
|
|
39
|
+
: this.host.engine.i18n("ui.trigger.inactive"),
|
|
40
|
+
]), option.trigger !== -1 ? this.host.renderAbsolute(option.trigger) : "", this.host.engine.i18n("ui.trigger.reset.promptExplainer"));
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (value === "" || value.startsWith("-")) {
|
|
45
|
+
option.trigger = -1;
|
|
46
|
+
option.enabled = false;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
option.trigger = Number(value);
|
|
57
50
|
},
|
|
58
51
|
});
|
|
59
52
|
element.triggerButton.element.addClass(stylesButton.lastHeadAction);
|
|
60
|
-
if (host.engine.localeSupportsFirstLetterSplits(locale.selected)) {
|
|
53
|
+
if (this.host.engine.localeSupportsFirstLetterSplits(locale.selected)) {
|
|
61
54
|
if (lastLabel[0] !== resource.title[0]) {
|
|
62
55
|
element.element.addClass(stylesLabelListItem.splitter);
|
|
63
56
|
}
|
|
@@ -65,7 +58,7 @@ export class ResetResourcesSettingsUi extends IconSettingsPanel {
|
|
|
65
58
|
items.push(element);
|
|
66
59
|
lastLabel = resource.title;
|
|
67
60
|
}
|
|
68
|
-
this.addChild(new SettingsList(
|
|
61
|
+
this.addChild(new SettingsList(this).addChildren(items));
|
|
69
62
|
}
|
|
70
63
|
}
|
|
71
64
|
//# sourceMappingURL=ResetResourcesSettingsUi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetResourcesSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetResourcesSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetResourcesSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetResourcesSettingsUi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,YAAY,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,mBAAmB,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,MAAM,OAAO,wBAAyB,SAAQ,iBAAyC;IACrF,YACE,MAAmB,EACnB,QAAgC,EAChC,MAAuC;QAEvC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACtD,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE;YAC7B,IAAI,EAAE,KAAK,CAAC,SAAS;SACtB,CAAC,CAAC;QAEH,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,SAAS,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAE5F,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAEnD,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,IAAI,SAAS,GAAG,SAAS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AO,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;gBACzD,CAAC;YACH,CAAC;YAED,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEpB,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../KittenScientists.js";
|
|
3
2
|
import type { ResetSettings } from "../settings/ResetSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
5
|
-
import type { PanelOptions } from "./components/CollapsiblePanel.js";
|
|
6
|
-
import { type SettingListItemOptions } from "./components/SettingListItem.js";
|
|
7
4
|
import { SettingsPanel } from "./components/SettingsPanel.js";
|
|
5
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
8
6
|
export declare class ResetSettingsUi extends SettingsPanel<ResetSettings> {
|
|
9
7
|
private readonly _bonfireUi;
|
|
10
8
|
private readonly _religionUi;
|
|
@@ -12,6 +10,6 @@ export declare class ResetSettingsUi extends SettingsPanel<ResetSettings> {
|
|
|
12
10
|
private readonly _spaceUi;
|
|
13
11
|
private readonly _timeUi;
|
|
14
12
|
private readonly _upgradesUi;
|
|
15
|
-
constructor(
|
|
13
|
+
constructor(parent: UiComponent, settings: ResetSettings, locale: SettingOptions<SupportedLocale>);
|
|
16
14
|
}
|
|
17
15
|
//# sourceMappingURL=ResetSettingsUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ResetSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAW9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,eAAgB,SAAQ,aAAa,CAAC,aAAa,CAAC;IAC/D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyB;IACpD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;IACtD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA2B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA0B;gBAGpD,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC;CAqC1C"}
|
|
@@ -16,31 +16,26 @@ export class ResetSettingsUi extends SettingsPanel {
|
|
|
16
16
|
_spaceUi;
|
|
17
17
|
_timeUi;
|
|
18
18
|
_upgradesUi;
|
|
19
|
-
constructor(
|
|
20
|
-
const label = host.engine.i18n("option.time.reset");
|
|
21
|
-
super(
|
|
22
|
-
childrenHead: [new Container(host, { classes: [stylesLabelListItem.fillSpace] })],
|
|
19
|
+
constructor(parent, settings, locale) {
|
|
20
|
+
const label = parent.host.engine.i18n("option.time.reset");
|
|
21
|
+
super(parent, settings, new SettingListItem(parent, settings, label, {
|
|
23
22
|
onCheck: (isBatchProcess) => {
|
|
24
|
-
host.engine.imessage("status.auto.enable", [label]);
|
|
25
|
-
this.refreshUi();
|
|
26
|
-
options?.onCheck?.(isBatchProcess);
|
|
23
|
+
parent.host.engine.imessage("status.auto.enable", [label]);
|
|
27
24
|
},
|
|
28
25
|
onUnCheck: (isBatchProcess) => {
|
|
29
|
-
host.engine.imessage("status.auto.disable", [label]);
|
|
30
|
-
this.refreshUi();
|
|
31
|
-
options?.onUnCheck?.(isBatchProcess);
|
|
26
|
+
parent.host.engine.imessage("status.auto.disable", [label]);
|
|
32
27
|
},
|
|
33
|
-
}),
|
|
34
|
-
const list = new SettingsList(
|
|
28
|
+
}).addChildrenHead([new Container(parent, { classes: [stylesLabelListItem.fillSpace] })]));
|
|
29
|
+
const list = new SettingsList(this, {
|
|
35
30
|
hasDisableAll: false,
|
|
36
31
|
hasEnableAll: false,
|
|
37
32
|
});
|
|
38
|
-
this._bonfireUi = new ResetBonfireSettingsUi(
|
|
39
|
-
this._religionUi = new ResetReligionSettingsUi(
|
|
40
|
-
this._resourcesUi = new ResetResourcesSettingsUi(
|
|
41
|
-
this._spaceUi = new ResetSpaceSettingsUi(
|
|
42
|
-
this._timeUi = new ResetTimeSettingsUi(
|
|
43
|
-
this._upgradesUi = new ResetUpgradesSettingsUi(
|
|
33
|
+
this._bonfireUi = new ResetBonfireSettingsUi(this, this.setting.bonfire, locale);
|
|
34
|
+
this._religionUi = new ResetReligionSettingsUi(this, this.setting.religion, locale);
|
|
35
|
+
this._resourcesUi = new ResetResourcesSettingsUi(this, this.setting.resources, locale);
|
|
36
|
+
this._spaceUi = new ResetSpaceSettingsUi(this, this.setting.space, locale);
|
|
37
|
+
this._timeUi = new ResetTimeSettingsUi(this, this.setting.time, locale);
|
|
38
|
+
this._upgradesUi = new ResetUpgradesSettingsUi(this, this.setting.upgrades, locale);
|
|
44
39
|
list.addChildren([
|
|
45
40
|
this._bonfireUi,
|
|
46
41
|
this._religionUi,
|
|
@@ -49,7 +44,7 @@ export class ResetSettingsUi extends SettingsPanel {
|
|
|
49
44
|
this._timeUi,
|
|
50
45
|
this._upgradesUi,
|
|
51
46
|
]);
|
|
52
|
-
this.
|
|
47
|
+
this.addChildContent(list);
|
|
53
48
|
}
|
|
54
49
|
}
|
|
55
50
|
//# sourceMappingURL=ResetSettingsUi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetSettingsUi.js","sourceRoot":"","sources":["../../source/ui/ResetSettingsUi.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,mBAAmB,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,MAAM,OAAO,eAAgB,SAAQ,aAA4B;IAC9C,UAAU,CAAyB;IACnC,WAAW,CAA0B;IACrC,YAAY,CAA2B;IACvC,QAAQ,CAAuB;IAC/B,OAAO,CAAsB;IAC7B,WAAW,CAA0B;IAEtD,YACE,MAAmB,EACnB,QAAuB,EACvB,MAAuC;QAEvC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CA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I,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACxE,IAAI,CAAC,WAAW,GAAG,IAAI,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEpF,IAAI,CAAC,WAAW,CAAC;YACf,IAAI,CAAC,UAAU;YACf,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,QAAQ;YACb,IAAI,CAAC,OAAO;YACZ,IAAI,CAAC,WAAW;SACjB,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../KittenScientists.js";
|
|
3
2
|
import type { ResetSpaceSettings } from "../settings/ResetSpaceSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
5
4
|
import { IconSettingsPanel } from "./components/IconSettingsPanel.js";
|
|
5
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
6
6
|
export declare class ResetSpaceSettingsUi extends IconSettingsPanel<ResetSpaceSettings> {
|
|
7
|
-
constructor(
|
|
7
|
+
constructor(parent: UiComponent, settings: ResetSpaceSettings, locale: SettingOptions<SupportedLocale>);
|
|
8
8
|
private _getResetOption;
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=ResetSpaceSettingsUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetSpaceSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetSpaceSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResetSpaceSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/ResetSpaceSettingsUi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,yBAAyB,CAAC;AAK9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAItE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,qBAAa,oBAAqB,SAAQ,iBAAiB,CAAC,kBAAkB,CAAC;gBAE3E,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC;IAgCzC,OAAO,CAAC,eAAe;CAqDxB"}
|