@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,12 +1,11 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../KittenScientists.js";
|
|
3
2
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
4
3
|
import { SpaceSettings } from "../settings/SpaceSettings.js";
|
|
5
|
-
import
|
|
6
|
-
import type { SettingListItemOptions } from "./components/SettingListItem.js";
|
|
4
|
+
import { SettingTriggerListItem } from "./components/SettingTriggerListItem.js";
|
|
7
5
|
import { SettingsPanel } from "./components/SettingsPanel.js";
|
|
8
|
-
|
|
6
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
7
|
+
export declare class SpaceSettingsUi extends SettingsPanel<SpaceSettings, SettingTriggerListItem> {
|
|
9
8
|
private readonly _missionsUi;
|
|
10
|
-
constructor(
|
|
9
|
+
constructor(parent: UiComponent, settings: SpaceSettings, locale: SettingOptions<SupportedLocale>);
|
|
11
10
|
}
|
|
12
11
|
//# sourceMappingURL=SpaceSettingsUi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/SpaceSettingsUi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SpaceSettingsUi.d.ts","sourceRoot":"","sources":["../../source/ui/SpaceSettingsUi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAK7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAEhF,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,EAAE,sBAAsB,CAAC;IACvF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;gBAG9C,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC;CAoG1C"}
|
|
@@ -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 { SpaceSettings } from "../settings/SpaceSettings.js";
|
|
4
3
|
import { BuildSectionTools } from "./BuildSectionTools.js";
|
|
5
4
|
import { MissionSettingsUi } from "./MissionSettingsUi.js";
|
|
@@ -10,75 +9,68 @@ import { SettingsList } from "./components/SettingsList.js";
|
|
|
10
9
|
import { SettingsPanel } from "./components/SettingsPanel.js";
|
|
11
10
|
export class SpaceSettingsUi extends SettingsPanel {
|
|
12
11
|
_missionsUi;
|
|
13
|
-
constructor(
|
|
14
|
-
const label = host.engine.i18n("ui.space");
|
|
15
|
-
super(
|
|
12
|
+
constructor(parent, settings, locale) {
|
|
13
|
+
const label = parent.host.engine.i18n("ui.space");
|
|
14
|
+
super(parent, settings, new SettingTriggerListItem(parent, settings, locale, label, {
|
|
16
15
|
onCheck: (isBatchProcess) => {
|
|
17
|
-
host.engine.imessage("status.auto.enable", [label]);
|
|
18
|
-
this.refreshUi();
|
|
19
|
-
options?.onCheck?.(isBatchProcess);
|
|
16
|
+
parent.host.engine.imessage("status.auto.enable", [label]);
|
|
20
17
|
},
|
|
21
18
|
onUnCheck: (isBatchProcess) => {
|
|
22
|
-
host.engine.imessage("status.auto.disable", [label]);
|
|
23
|
-
this.refreshUi();
|
|
24
|
-
options?.onUnCheck?.(isBatchProcess);
|
|
19
|
+
parent.host.engine.imessage("status.auto.disable", [label]);
|
|
25
20
|
},
|
|
26
|
-
onRefresh:
|
|
27
|
-
|
|
28
|
-
!settings.enabled || settings.trigger === -1;
|
|
21
|
+
onRefresh: () => {
|
|
22
|
+
this.settingItem.triggerButton.inactive = !settings.enabled || settings.trigger === -1;
|
|
29
23
|
},
|
|
30
|
-
onRefreshTrigger
|
|
31
|
-
|
|
24
|
+
onRefreshTrigger() {
|
|
25
|
+
this.triggerButton.element[0].title = parent.host.engine.i18n("ui.trigger.section", [
|
|
32
26
|
settings.trigger < 0
|
|
33
|
-
? host.engine.i18n("ui.trigger.section.inactive")
|
|
34
|
-
: host.renderPercentage(settings.trigger, locale.selected, true),
|
|
27
|
+
? parent.host.engine.i18n("ui.trigger.section.inactive")
|
|
28
|
+
: parent.host.renderPercentage(settings.trigger, locale.selected, true),
|
|
35
29
|
]);
|
|
36
30
|
},
|
|
37
|
-
onSetTrigger: () => {
|
|
38
|
-
Dialog.prompt(
|
|
31
|
+
onSetTrigger: async () => {
|
|
32
|
+
const value = await Dialog.prompt(parent, parent.host.engine.i18n("ui.trigger.prompt.percentage"), parent.host.engine.i18n("ui.trigger.section.prompt", [
|
|
39
33
|
label,
|
|
40
34
|
settings.trigger !== -1
|
|
41
|
-
? host.renderPercentage(settings.trigger, locale.selected, true)
|
|
42
|
-
: host.engine.i18n("ui.infinity"),
|
|
43
|
-
]), settings.trigger !== -1 ? host.renderPercentage(settings.trigger) : "", host.engine.i18n("ui.trigger.section.promptExplainer"))
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
settings.trigger = host.parsePercentage(value);
|
|
53
|
-
})
|
|
54
|
-
.then(() => {
|
|
55
|
-
this.refreshUi();
|
|
56
|
-
})
|
|
57
|
-
.catch(redirectErrorsToConsole(console));
|
|
35
|
+
? parent.host.renderPercentage(settings.trigger, locale.selected, true)
|
|
36
|
+
: parent.host.engine.i18n("ui.infinity"),
|
|
37
|
+
]), settings.trigger !== -1 ? parent.host.renderPercentage(settings.trigger) : "", parent.host.engine.i18n("ui.trigger.section.promptExplainer"));
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (value === "" || value.startsWith("-")) {
|
|
42
|
+
settings.trigger = -1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
settings.trigger = parent.host.parsePercentage(value);
|
|
58
46
|
},
|
|
47
|
+
renderLabelTrigger: false,
|
|
59
48
|
}));
|
|
60
|
-
this.
|
|
61
|
-
children: host.game.space.planets
|
|
62
|
-
.filter(planet => 0 < planet.buildings.length)
|
|
63
|
-
.flatMap((planet, indexPlanet, arrayPlant) => [
|
|
64
|
-
new HeaderListItem(host, host.engine.labelForPlanet(planet.name)),
|
|
65
|
-
...planet.buildings
|
|
66
|
-
.filter(item => !isNil(this.setting.buildings[item.name]))
|
|
67
|
-
.map((building, indexBuilding, arrayBuilding) => BuildSectionTools.getBuildOption(host, this.setting.buildings[building.name], locale, this.setting, building.label, label, indexPlanet < arrayPlant.length - 1 && indexBuilding === arrayBuilding.length - 1)),
|
|
68
|
-
]),
|
|
49
|
+
this.addChildContent(new SettingsList(this, {
|
|
69
50
|
onReset: () => {
|
|
70
51
|
this.setting.load({ buildings: new SpaceSettings().buildings });
|
|
71
|
-
this.
|
|
52
|
+
this.requestRefresh();
|
|
72
53
|
},
|
|
73
|
-
})
|
|
74
|
-
|
|
54
|
+
}).addChildren(this.host.game.space.planets
|
|
55
|
+
.filter(planet => 0 < planet.buildings.length)
|
|
56
|
+
.flatMap((planet, indexPlanet, arrayPlant) => [
|
|
57
|
+
new HeaderListItem(this, this.host.engine.labelForPlanet(planet.name)),
|
|
58
|
+
...planet.buildings
|
|
59
|
+
.filter(item => !isNil(this.setting.buildings[item.name]))
|
|
60
|
+
.map((building, indexBuilding, arrayBuilding) => BuildSectionTools.getBuildOption(this, this.setting.buildings[building.name], locale, this.setting, building.label, label, {
|
|
61
|
+
delimiter: indexPlanet < arrayPlant.length - 1 &&
|
|
62
|
+
indexBuilding === arrayBuilding.length - 1,
|
|
63
|
+
renderLabelTrigger: false,
|
|
64
|
+
})),
|
|
65
|
+
])));
|
|
66
|
+
const listAddition = new SettingsList(this, {
|
|
75
67
|
hasDisableAll: false,
|
|
76
68
|
hasEnableAll: false,
|
|
77
69
|
});
|
|
78
|
-
listAddition.addChild(new HeaderListItem(
|
|
79
|
-
this._missionsUi = new MissionSettingsUi(
|
|
70
|
+
listAddition.addChild(new HeaderListItem(this, this.host.engine.i18n("ui.additional")));
|
|
71
|
+
this._missionsUi = new MissionSettingsUi(this, this.setting.unlockMissions, locale, this.setting);
|
|
80
72
|
listAddition.addChild(this._missionsUi);
|
|
81
|
-
this.
|
|
73
|
+
this.addChildContent(listAddition);
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
//# sourceMappingURL=SpaceSettingsUi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpaceSettingsUi.js","sourceRoot":"","sources":["../../source/ui/SpaceSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"SpaceSettingsUi.js","sourceRoot":"","sources":["../../source/ui/SpaceSettingsUi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,MAAM,OAAO,eAAgB,SAAQ,aAAoD;IACtE,WAAW,CAAoB;IAEhD,YACE,MAAmB,EACnB,QAAuB,EACvB,MAAuC;QAEvC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAClD,KAAK,CACH,MAAM,EACN,QAAQ,EACR,IAAI,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;YAC1D,OAAO,EAAE,CAAC,cAAwB,EAAE,EAAE;gBACpC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;YAC7D,CAAC;YACD,SAAS,EAAE,CAAC,cAAwB,EAAE,EAAE;gBACtC,MAAM,CAAC,IAAI,CAAC,M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AAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;iBACzD,GAAG,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,CAC9C,iBAAiB,CAAC,cAAc,CAC9B,IAAI,EACJ,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,EACrC,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,QAAQ,CAAC,KAAK,EACd,KAAK,EACL;gBACE,SAAS,EACP,WAAW,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC;oBACnC,aAAa,KAAK,aAAa,CAAC,MAAM,GAAG,CAAC;gBAC5C,kBAAkB,EAAE,KAAK;aAC1B,CACF,CACF;SACJ,CAAC,CACL,CACF,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,EAAE;YAC1C,aAAa,EAAE,KAAK;YACpB,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QACH,YAAY,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAExF,IAAI,CAAC,WAAW,GAAG,IAAI,iBAAiB,CACtC,IAAI,EACJ,IAAI,CAAC,OAAO,CAAC,cAAc,EAC3B,MAAM,EACN,IAAI,CAAC,OAAO,CACb,CAAC;QACF,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type Locale } from "date-fns/locale";
|
|
2
2
|
import { type EngineState, type SupportedLocale } from "../Engine.js";
|
|
3
|
-
import { KittenScientists } from "../KittenScientists.js";
|
|
4
3
|
import type { SettingOptions } from "../settings/Settings.js";
|
|
5
4
|
import type { StateSettings } from "../settings/StateSettings.js";
|
|
6
5
|
import { Unique } from "../tools/Entries.js";
|
|
7
6
|
import type { KGSaveData } from "../types/_save.js";
|
|
8
7
|
import { SettingsList } from "./components/SettingsList.js";
|
|
9
8
|
import { SettingsPanel } from "./components/SettingsPanel.js";
|
|
9
|
+
import type { UiComponent } from "./components/UiComponent.js";
|
|
10
10
|
export type StoredGame = {
|
|
11
11
|
label: string;
|
|
12
12
|
game: KGSaveData;
|
|
@@ -28,7 +28,7 @@ export declare class StateManagementUi extends SettingsPanel<StateSettings> {
|
|
|
28
28
|
readonly gameList: SettingsList;
|
|
29
29
|
readonly stateList: SettingsList;
|
|
30
30
|
readonly locale: Locale;
|
|
31
|
-
constructor(
|
|
31
|
+
constructor(parent: UiComponent, settings: StateSettings, locale: SettingOptions<SupportedLocale>);
|
|
32
32
|
private _loadGames;
|
|
33
33
|
private _storeGames;
|
|
34
34
|
private _loadStates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StateManagementUi.d.ts","sourceRoot":"","sources":["../../source/ui/StateManagementUi.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"StateManagementUi.d.ts","sourceRoot":"","sources":["../../source/ui/StateManagementUi.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAU,KAAK,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA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