@wayward/types 2.14.4-beta.dev.20241230.1 → 2.14.4-beta.dev.20250101.1

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.
Files changed (65) hide show
  1. package/definitions/{devserver → core}/middleware/E404.d.ts +1 -1
  2. package/definitions/{devserver → core}/middleware/Static.d.ts +1 -1
  3. package/definitions/{devserver → core}/middleware/Validate.d.ts +1 -1
  4. package/definitions/{devserver/middleware → core}/util/SendFile.d.ts +1 -1
  5. package/definitions/{devserver → dev}/middleware/CustomInternalMods.d.ts +1 -1
  6. package/definitions/{devserver → dev}/middleware/SaveFolder.d.ts +1 -1
  7. package/definitions/error/Router.d.ts +13 -0
  8. package/definitions/error/index.d.ts +11 -0
  9. package/definitions/error/middleware/ReportError.d.ts +13 -0
  10. package/definitions/game/game/doodad/Doodad.d.ts +1 -1
  11. package/definitions/game/game/entity/player/quest/quest/IQuest.d.ts +1 -0
  12. package/definitions/game/game/inspection/infoProviders/LevelValue.d.ts +3 -1
  13. package/definitions/game/game/inspection/infoProviders/MagicalDamageReduction.d.ts +1 -1
  14. package/definitions/game/game/inspection/infoProviders/MagicalDamageRegeneration.d.ts +1 -1
  15. package/definitions/game/game/inspection/infoProviders/MagicalPropertyValue.d.ts +3 -2
  16. package/definitions/game/game/inspection/infoProviders/item/MagicalSourceTooltip.d.ts +2 -1
  17. package/definitions/game/game/inspection/infoProviders/item/use/ItemBuildInfo.d.ts +1 -1
  18. package/definitions/game/game/inspection/infoProviders/item/use/ItemEquipInfo.d.ts +1 -1
  19. package/definitions/game/game/inspection/inspections/MagicInspection.d.ts +2 -2
  20. package/definitions/game/game/item/IItem.d.ts +1 -1
  21. package/definitions/game/game/item/Item.d.ts +2 -1
  22. package/definitions/game/game/magic/IMagicalProperty.d.ts +85 -0
  23. package/definitions/game/game/magic/MagicalPropertyManager.d.ts +5 -73
  24. package/definitions/game/game/magic/MagicalPropertyType.d.ts +1 -1
  25. package/definitions/game/game/meta/prompt/IPrompt.d.ts +27 -26
  26. package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +1 -0
  27. package/definitions/game/game/reference/IReferenceManager.d.ts +1 -1
  28. package/definitions/game/language/Dictionary.d.ts +58 -57
  29. package/definitions/game/language/DictionaryMap.d.ts +116 -114
  30. package/definitions/game/language/Translation.d.ts +1 -2
  31. package/definitions/game/language/dictionary/Message.d.ts +511 -510
  32. package/definitions/game/language/dictionary/UiTranslation.d.ts +924 -910
  33. package/definitions/game/language/english/item/MagicalSubPropertyAffixes.d.ts +13 -0
  34. package/definitions/game/save/data/ISaveData.d.ts +23 -0
  35. package/definitions/game/save/data/ISaveDataGlobal.d.ts +2 -0
  36. package/definitions/game/save/data/SaveData.d.ts +10 -1
  37. package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +4 -0
  38. package/definitions/game/save/upgrade/versions/beta2.14.4/beta2.14.4-dev20241231.d.ts +12 -0
  39. package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
  40. package/definitions/game/steamworks/Steamworks.d.ts +6 -2
  41. package/definitions/game/ui/{screen/screens/splash → component}/Notice.d.ts +4 -2
  42. package/definitions/game/ui/component/dropdown/MagicalPropertyDropdown.d.ts +1 -2
  43. package/definitions/game/ui/screen/screens/SplashScreen.d.ts +1 -1
  44. package/definitions/game/ui/screen/screens/game/DialogManager.d.ts +8 -3
  45. package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +1 -0
  46. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +2 -1
  47. package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +1 -0
  48. package/definitions/game/ui/screen/screens/game/dialog/unlockables/UnlockablesDialog.d.ts +1 -0
  49. package/definitions/game/ui/screen/screens/menu/menus/options/ErrorReportingNotice.d.ts +14 -0
  50. package/definitions/game/ui/screen/screens/menu/menus/options/TabDeveloper.d.ts +3 -1
  51. package/definitions/game/ui/screen/screens/menu/menus/options/TabSaveData.d.ts +1 -0
  52. package/definitions/game/ui/screen/screens/splash/DevelopmentBranchNotice.d.ts +1 -1
  53. package/definitions/game/ui/util/HighlightManager.d.ts +11 -1
  54. package/definitions/game/ui/util/IHighlight.d.ts +1 -0
  55. package/definitions/game/utilities/Version.d.ts +1 -1
  56. package/definitions/lint/condition-complexity.d.mts +26 -0
  57. package/definitions/test/core/applicationDom.d.ts +3 -1
  58. package/definitions/utilities/Log.d.ts +3 -2
  59. package/definitions/utilities/event/EventEmitter.d.ts +12 -7
  60. package/package.json +1 -1
  61. /package/definitions/{devserver/middleware/util → core}/Middleware.d.ts +0 -0
  62. /package/definitions/{devserver/middleware → core}/util/GameLogFilter.d.ts +0 -0
  63. /package/definitions/{devserver → core}/util/Log.d.ts +0 -0
  64. /package/definitions/{devserver → dev}/Router.d.ts +0 -0
  65. /package/definitions/{devserver → dev}/index.d.ts +0 -0
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import Middleware from "@wayward/devserver/middleware/util/Middleware";
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
12
  declare const _default: Middleware<[message?: string]>;
13
13
  export default _default;
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import Middleware from "@wayward/devserver/middleware/util/Middleware";
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
12
  declare const _default: Middleware<[]>;
13
13
  export default _default;
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import Middleware from "@wayward/devserver/middleware/util/Middleware";
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
12
  declare const _default: Middleware<[]>;
13
13
  export default _default;
@@ -9,5 +9,5 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { ServerResponse } from "http";
12
- import type { IncomingMessage } from "@wayward/devserver/middleware/util/Middleware";
12
+ import type { IncomingMessage } from "@wayward/coreserver/Middleware";
13
13
  export default function (req: IncomingMessage, res: ServerResponse, filePath: string): Promise<ServerResponse | void | undefined>;
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import Middleware from "@wayward/devserver/middleware/util/Middleware";
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
12
  declare const _default: Middleware<[]>;
13
13
  export default _default;
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import Middleware from "@wayward/devserver/middleware/util/Middleware";
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
12
  declare const _default: Middleware<[]>;
13
13
  export default _default;
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2024 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
8
+ * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type { RequestListener } from "http";
12
+ declare const Router: RequestListener;
13
+ export default Router;
@@ -0,0 +1,11 @@
1
+ /*!
2
+ * Copyright 2011-2024 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
8
+ * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import "../hosts/node/nodeLoader";
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2024 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
8
+ * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import Middleware from "@wayward/coreserver/Middleware";
12
+ declare const _default: Middleware<[message?: string]>;
13
+ export default _default;
@@ -30,7 +30,7 @@ import { LiquidType } from "@wayward/game/game/island/IIsland";
30
30
  import type { ContainerSort, DisplayableItemType, IContainer, IItemVehicle, ILiquidGather, IUncastableContainer, ItemTypeExtra } from "@wayward/game/game/item/IItem";
31
31
  import { ItemType } from "@wayward/game/game/item/IItem";
32
32
  import type Item from "@wayward/game/game/item/Item";
33
- import type { IHasMagic } from "@wayward/game/game/magic/MagicalPropertyManager";
33
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
34
34
  import MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
35
35
  import type { Reference, ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
36
36
  import type { IHasInsulation, TempType } from "@wayward/game/game/temperature/ITemperature";
@@ -16,5 +16,6 @@ export interface IQuest {
16
16
  type: QuestType;
17
17
  requirements: IQuestRequirement[];
18
18
  complete: boolean;
19
+ skipped: boolean;
19
20
  reset?(): void;
20
21
  }
@@ -9,7 +9,9 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
12
- import type { IHasMagic, MagicalNormalPropertyTypes, MagicalSubPropertyTypes } from "@wayward/game/game/magic/MagicalPropertyManager";
12
+ import type { MagicalNormalPropertyTypes } from "@wayward/game/game/magic/IMagicalProperty";
13
+ import type { MagicalSubPropertyTypes } from "@wayward/game/game/magic/IMagicalProperty";
14
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
13
15
  import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
14
16
  import type { DictionaryEnum } from "@wayward/game/language/DictionaryMap";
15
17
  import type { TextContext } from "@wayward/game/language/ITranslation";
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { IHasMagic } from "@wayward/game/game/magic/MagicalPropertyManager";
11
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
12
12
  import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
13
13
  export default function (magicalThingy: IHasMagic): TranslationImpl | undefined;
@@ -8,6 +8,6 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { IHasMagic } from "@wayward/game/game/magic/MagicalPropertyManager";
11
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
12
12
  import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
13
13
  export default function (magicalThingy: IHasMagic): TranslationImpl | undefined;
@@ -11,8 +11,9 @@
11
11
  import type { SkillType } from "@wayward/game/game/entity/IHuman";
12
12
  import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
13
13
  import type { Quality } from "@wayward/game/game/IObject";
14
- import type { IHasMagic, MagicalNormalPropertyTypes, MagicalSubPropertyTypes } from "@wayward/game/game/magic/MagicalPropertyManager";
15
- import { MagicalPropertyIdentity } from "@wayward/game/game/magic/MagicalPropertyManager";
14
+ import type { MagicalNormalPropertyTypes, MagicalSubPropertyTypes } from "@wayward/game/game/magic/IMagicalProperty";
15
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
16
+ import { MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
16
17
  import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
17
18
  import Translation from "@wayward/game/language/Translation";
18
19
  import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
@@ -8,7 +8,8 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { MagicalNormalPropertyTypes, MagicalPropertyIdentity, MagicalSubPropertyTypes } from "@wayward/game/game/magic/MagicalPropertyManager";
11
+ import type { MagicalNormalPropertyTypes, MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
12
+ import type { MagicalSubPropertyTypes } from "@wayward/game/game/magic/IMagicalProperty";
12
13
  import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
13
14
  import Translation from "@wayward/game/language/Translation";
14
15
  declare function MagicalSourceTooltip(type: MagicalNormalPropertyTypes): Translation;
@@ -12,7 +12,7 @@ import { ActionType } from "@wayward/game/game/entity/action/IAction";
12
12
  import LabelledValue from "@wayward/game/game/inspection/infoProviders/LabelledValue";
13
13
  import UseInfo from "@wayward/game/game/inspection/infoProviders/UseInfo";
14
14
  import type Item from "@wayward/game/game/item/Item";
15
- import { MagicalPropertyEntry } from "@wayward/game/game/magic/MagicalPropertyManager";
15
+ import { MagicalPropertyEntry } from "@wayward/game/game/magic/IMagicalProperty";
16
16
  import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
17
17
  import { TempType } from "@wayward/game/game/temperature/ITemperature";
18
18
  declare const _default: UseInfo<{
@@ -11,7 +11,7 @@
11
11
  import { ActionType } from "@wayward/game/game/entity/action/IAction";
12
12
  import UseInfo from "@wayward/game/game/inspection/infoProviders/UseInfo";
13
13
  import type Item from "@wayward/game/game/item/Item";
14
- import { MagicalPropertyEntry } from "@wayward/game/game/magic/MagicalPropertyManager";
14
+ import { MagicalPropertyEntry } from "@wayward/game/game/magic/IMagicalProperty";
15
15
  import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
16
16
  import { TempType } from "@wayward/game/game/temperature/ITemperature";
17
17
  import UiTranslation from "@wayward/game/language/dictionary/UiTranslation";
@@ -13,8 +13,8 @@ import type { SimpleInfoProvider } from "@wayward/game/game/inspection/InfoProvi
13
13
  import { InfoProvider } from "@wayward/game/game/inspection/InfoProvider";
14
14
  import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
15
15
  import Inspection from "@wayward/game/game/inspection/Inspection";
16
- import type { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/MagicalPropertyManager";
17
- import { MagicalPropertyIdentity } from "@wayward/game/game/magic/MagicalPropertyManager";
16
+ import type { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/IMagicalProperty";
17
+ import { MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
18
18
  import Translation from "@wayward/game/language/Translation";
19
19
  import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
20
20
  export default class MagicInspection extends Inspection<MagicalPropertyIdentityHash> {
@@ -30,7 +30,7 @@ import type { IMoveItemOptions } from "@wayward/game/game/item/IItemManager";
30
30
  import type Item from "@wayward/game/game/item/Item";
31
31
  import type Recipe from "@wayward/game/game/item/recipe/Recipe";
32
32
  import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
33
- import type { MagicalSubPropertySubTypes } from "@wayward/game/game/magic/MagicalPropertyManager";
33
+ import type { MagicalSubPropertySubTypes } from "@wayward/game/game/magic/IMagicalProperty";
34
34
  import type MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
35
35
  import type { IInsulationDescription, ITemperatureDescription } from "@wayward/game/game/temperature/ITemperature";
36
36
  import type { TerrainType } from "@wayward/game/game/tile/ITerrain";
@@ -34,7 +34,8 @@ import { ItemTypeExtra } from "@wayward/game/game/item/IItem";
34
34
  import { BookType, ContainerSort, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "@wayward/game/game/item/IItem";
35
35
  import type { IPlaceOnTileOptions } from "@wayward/game/game/item/IItemManager";
36
36
  import ItemMapManager from "@wayward/game/game/item/ItemMapManager";
37
- import type { IHasMagic, MagicalSubPropertySubTypes } from "@wayward/game/game/magic/MagicalPropertyManager";
37
+ import type { MagicalSubPropertySubTypes } from "@wayward/game/game/magic/IMagicalProperty";
38
+ import type { IHasMagic } from "@wayward/game/game/magic/IMagicalProperty";
38
39
  import MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
39
40
  import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
40
41
  import type { Reference, ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
@@ -0,0 +1,85 @@
1
+ /*!
2
+ * Copyright 2011-2024 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
8
+ * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
12
+ import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
13
+ import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
14
+ export interface IHasMagic {
15
+ magic?: MagicalPropertyManager;
16
+ }
17
+ export interface IMagicalProperty {
18
+ value: number;
19
+ }
20
+ export declare const SYMBOL_MAGIC_SUB_PROPERTY_TYPES: unique symbol;
21
+ export declare const SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES: unique symbol;
22
+ export interface IMagicalSubProperty<T extends number> {
23
+ subPropertyCount: number;
24
+ subProperties: Partial<Record<T, number>>;
25
+ [SYMBOL_MAGIC_SUB_PROPERTY_TYPES]: readonly T[];
26
+ [SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES]: ReadonlyArray<{
27
+ type: T;
28
+ value: number;
29
+ }>;
30
+ }
31
+ export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends Record<T, any> ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
32
+ export interface MagicalNormalPropertyEntry {
33
+ type: MagicalNormalPropertyTypes;
34
+ value: number;
35
+ }
36
+ export type MagicalSubPropertyEntry = {
37
+ [K in MagicalSubPropertyTypes]: {
38
+ type: K;
39
+ subType: MagicalPropertyTypeSubTypeMap[K];
40
+ value: number;
41
+ };
42
+ }[MagicalSubPropertyTypes];
43
+ export type MagicalPropertyEntry = MagicalNormalPropertyEntry | MagicalSubPropertyEntry;
44
+ export declare namespace MagicalPropertyEntry {
45
+ function isSubType(entry: MagicalPropertyEntry): entry is MagicalSubPropertyEntry;
46
+ function identity(entry: MagicalPropertyEntry): MagicalPropertyIdentity;
47
+ }
48
+ export interface MagicalPropertyEntryIntersection {
49
+ type: MagicalPropertyType;
50
+ subType?: MagicalSubPropertySubTypes;
51
+ value: number;
52
+ }
53
+ export type AnyMagicalProperty = Partial<IMagicalProperty> & PartialValues<{
54
+ [K in MagicalSubPropertyTypes]: IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[K]>;
55
+ }>;
56
+ export type MagicalSubPropertyTypes = keyof MagicalPropertyTypeSubTypeMap;
57
+ export type MagicalNormalPropertyTypes = Exclude<MagicalPropertyType, MagicalSubPropertyTypes>;
58
+ export type MagicalSubPropertySubTypes = MagicalPropertyTypeSubTypeMap[MagicalSubPropertyTypes];
59
+ export type MagicalSubPropertyTypesResult = {
60
+ [K in MagicalSubPropertyTypes]: {
61
+ type: K;
62
+ subTypes: ReadonlyArray<MagicalPropertyTypeSubTypeMap[K]>;
63
+ };
64
+ }[MagicalSubPropertyTypes];
65
+ export type MagicalNormalPropertyIdentity<A extends any[] = []> = [MagicalNormalPropertyTypes, ...A];
66
+ export type MagicalSubPropertyIdentity<A extends any[] = []> = {
67
+ [Key in MagicalSubPropertyTypes]: [Key, MagicalPropertyTypeSubTypeMap[Key], ...A];
68
+ }[MagicalSubPropertyTypes];
69
+ export type MagicalSubPropertyIdentitySimple<A extends any[] = []> = [MagicalSubPropertyTypes, MagicalSubPropertySubTypes, ...A];
70
+ export type MagicalPropertyIdentity<A extends any[] = []> = [MagicalPropertyType, ...A] | MagicalSubPropertyIdentity<A>;
71
+ export type MagicalPropertyIdentityFlat = MagicalNormalPropertyTypes | MagicalSubPropertyTypes | {
72
+ [Key in MagicalSubPropertyTypes]: [Key, MagicalPropertyTypeSubTypeMap[Key]];
73
+ }[MagicalSubPropertyTypes];
74
+ export type MagicalPropertyIdentityHash = `${MagicalNormalPropertyTypes}` | {
75
+ [Key in MagicalSubPropertyTypes]: `${Key}:${MagicalPropertyTypeSubTypeMap[Key]}`;
76
+ }[MagicalSubPropertyTypes];
77
+ export declare namespace MagicalPropertyIdentity {
78
+ function isNormalProperty(identity: MagicalPropertyIdentity): identity is MagicalNormalPropertyIdentity;
79
+ function isSubProperty(identity: MagicalPropertyIdentity): identity is MagicalSubPropertyIdentity;
80
+ function hash(...[type, subType]: MagicalPropertyIdentity): MagicalPropertyIdentityHash;
81
+ function hash(type: MagicalSubPropertyTypes, subType: MagicalSubPropertySubTypes): MagicalPropertyIdentityHash;
82
+ function translationHash(...identity: MagicalPropertyIdentity): string;
83
+ function unhash(hash: MagicalPropertyIdentityHash): MagicalPropertyIdentity | undefined;
84
+ function equals(...identities: MagicalPropertyIdentity[]): boolean;
85
+ }
@@ -8,84 +8,17 @@
8
8
  * Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
+ import type { IHasMagic, AnyMagicalProperty, MagicalSubPropertyTypes, MagicalSubPropertyTypesResult, MagicalPropertyIdentityFlat, MagicalNormalPropertyTypes, MagicalPropertyEntryIntersection } from "@wayward/game/game/magic/IMagicalProperty";
12
+ import { MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
13
+ import { MagicalPropertyEntry } from "@wayward/game/game/magic/IMagicalProperty";
11
14
  import type { MagicalPropertyTypeSubTypeMap } from "@wayward/game/game/magic/MagicalPropertyType";
12
15
  import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
13
16
  import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
14
17
  import type { ListEnder } from "@wayward/game/language/ITranslation";
15
18
  import Translation from "@wayward/game/language/Translation";
19
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
16
20
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
17
- export interface IHasMagic {
18
- magic?: MagicalPropertyManager;
19
- }
20
- export interface IMagicalProperty {
21
- value: number;
22
- }
23
- export declare const SYMBOL_MAGIC_SUB_PROPERTY_TYPES: unique symbol;
24
- export declare const SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES: unique symbol;
25
- export interface IMagicalSubProperty<T extends number> {
26
- subPropertyCount: number;
27
- subProperties: Partial<Record<T, number>>;
28
- [SYMBOL_MAGIC_SUB_PROPERTY_TYPES]: readonly T[];
29
- [SYMBOL_MAGIC_SUB_PROPERTY_ENTRIES]: ReadonlyArray<{
30
- type: T;
31
- value: number;
32
- }>;
33
- }
34
- export type MagicalProperty<T extends MagicalPropertyType> = MagicalPropertyTypeSubTypeMap extends Record<T, any> ? IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[T]> : IMagicalProperty;
35
- type MagicalNormalPropertyEntry = {
36
- type: MagicalNormalPropertyTypes;
37
- value: number;
38
- };
39
- type MagicalSubPropertyEntry = {
40
- [K in MagicalSubPropertyTypes]: {
41
- type: K;
42
- subType: MagicalPropertyTypeSubTypeMap[K];
43
- value: number;
44
- };
45
- }[MagicalSubPropertyTypes];
46
- export type MagicalPropertyEntry = MagicalNormalPropertyEntry | MagicalSubPropertyEntry;
47
- export declare namespace MagicalPropertyEntry {
48
- function isSubType(entry: MagicalPropertyEntry): entry is MagicalSubPropertyEntry;
49
- function identity(entry: MagicalPropertyEntry): MagicalPropertyIdentity;
50
- }
51
- export type MagicalPropertyEntryIntersection = {
52
- type: MagicalPropertyType;
53
- subType?: MagicalSubPropertySubTypes;
54
- value: number;
55
- };
56
- export type AnyMagicalProperty = Partial<IMagicalProperty> & PartialValues<{
57
- [K in MagicalSubPropertyTypes]: IMagicalSubProperty<MagicalPropertyTypeSubTypeMap[K]>;
58
- }>;
59
- export type MagicalSubPropertyTypes = keyof MagicalPropertyTypeSubTypeMap;
60
- export type MagicalNormalPropertyTypes = Exclude<MagicalPropertyType, MagicalSubPropertyTypes>;
61
- export type MagicalSubPropertySubTypes = MagicalPropertyTypeSubTypeMap[MagicalSubPropertyTypes];
62
- type MagicalSubPropertyTypesResult = {
63
- [K in MagicalSubPropertyTypes]: {
64
- type: K;
65
- subTypes: ReadonlyArray<MagicalPropertyTypeSubTypeMap[K]>;
66
- };
67
- }[MagicalSubPropertyTypes];
68
- export type MagicalNormalPropertyIdentity<A extends any[] = []> = [MagicalNormalPropertyTypes, ...A];
69
- export type MagicalSubPropertyIdentity<A extends any[] = []> = {
70
- [Key in MagicalSubPropertyTypes]: [Key, MagicalPropertyTypeSubTypeMap[Key], ...A];
71
- }[MagicalSubPropertyTypes];
72
- export type MagicalSubPropertyIdentitySimple<A extends any[] = []> = [MagicalSubPropertyTypes, MagicalSubPropertySubTypes, ...A];
73
- export type MagicalPropertyIdentity<A extends any[] = []> = [MagicalPropertyType, ...A] | MagicalSubPropertyIdentity<A>;
74
- export type MagicalPropertyIdentityFlat = MagicalNormalPropertyTypes | MagicalSubPropertyTypes | {
75
- [Key in MagicalSubPropertyTypes]: [Key, MagicalPropertyTypeSubTypeMap[Key]];
76
- }[MagicalSubPropertyTypes];
77
- export type MagicalPropertyIdentityHash = `${MagicalNormalPropertyTypes}` | {
78
- [Key in MagicalSubPropertyTypes]: `${Key}:${MagicalPropertyTypeSubTypeMap[Key]}`;
79
- }[MagicalSubPropertyTypes];
80
- export declare namespace MagicalPropertyIdentity {
81
- function isNormalProperty(identity: MagicalPropertyIdentity): identity is MagicalNormalPropertyIdentity;
82
- function isSubProperty(identity: MagicalPropertyIdentity): identity is MagicalSubPropertyIdentity;
83
- function hash(...[type, subType]: MagicalPropertyIdentity): MagicalPropertyIdentityHash;
84
- function hash(type: MagicalSubPropertyTypes, subType: MagicalSubPropertySubTypes): MagicalPropertyIdentityHash;
85
- function unhash(hash: MagicalPropertyIdentityHash): MagicalPropertyIdentity | undefined;
86
- function equals(...identities: MagicalPropertyIdentity[]): boolean;
87
- }
88
- export interface IMagicalPropertyManagerEvents {
21
+ export interface IMagicalPropertyManagerEvents extends IEventSubscriberEvents {
89
22
  /**
90
23
  * Emitted when a property was removed
91
24
  */
@@ -258,4 +191,3 @@ export default class MagicalPropertyManager extends EventEmitter.Host<IMagicalPr
258
191
  hash(): string;
259
192
  private clearCachedArrays;
260
193
  }
261
- export {};
@@ -14,7 +14,7 @@ import { SkillType } from "@wayward/game/game/entity/IHuman";
14
14
  import { Stat } from "@wayward/game/game/entity/IStats";
15
15
  import type { IItemDescription, IMagicalPropertyInfo, ItemType } from "@wayward/game/game/item/IItem";
16
16
  import type Item from "@wayward/game/game/item/Item";
17
- import type { MagicalPropertyIdentity } from "@wayward/game/game/magic/MagicalPropertyManager";
17
+ import type { MagicalPropertyIdentity } from "@wayward/game/game/magic/IMagicalProperty";
18
18
  import type { TranslationArg } from "@wayward/game/language/ITranslation";
19
19
  declare enum MagicalPropertyType {
20
20
  /** Increases attack value (for weapons and ammo) */
@@ -104,32 +104,33 @@ export declare enum Prompt {
104
104
  MenuOptionsConfirmUnlockRecipes = 87,
105
105
  MenuOptionsSaveDataClearAll = 88,
106
106
  MenuOptionsSaveDataClearCharacters = 89,
107
- MenuOptionsSaveDataClearHighscores = 90,
108
- MenuOptionsSaveDataClearMilestones = 91,
109
- MenuOptionsSaveDataClearOptions = 92,
110
- MenuOptionsSaveDataClearSaves = 93,
111
- MenuOptionsSaveDataClearCraftingRecipes = 94,
112
- MenuOptionsSaveDataClearBindings = 95,
113
- MenuOptionsConfirmImportGlobalData = 96,
114
- MenuPauseGhostKeepSave = 97,
115
- MenuPauseReturnToTitleScreen = 98,
116
- MenuPauseReturnToTitleScreenChallenge = 99,
117
- MenuPauseReturnToTitleScreenChallengeMultiplayer = 100,
118
- MenuPauseReturnToTitleScreenMultiplayer = 101,
119
- MultiplayerFailedToConnect = 102,
120
- MultiplayerRestartServerAfterLoadingSave = 103,
121
- MultiplayerDisconnect = 104,
122
- MultiplayerDisconnectRejoin = 105,
123
- MultiplayerServerHasUnpublishedMods = 106,
124
- SteamworksURLOpenedInBrowser = 107,
125
- SteamworksWorkshopOpenedInBrowser = 108,
126
- SteamworksModWithNameAlreadyExists = 109,
127
- SteamworksModImportSaveGameFailure = 110,
128
- SteamworksModImportedSaveGame = 111,
129
- SteamworksOpenFolderFailure = 112,
130
- SteamworksModPublishModJsonUpdateFailed = 113,
131
- SteamworksNotAvailableOnSteamDeck = 114,
132
- UiSaveDrop = 115
107
+ MenuOptionsSaveDataClearUI = 90,
108
+ MenuOptionsSaveDataClearHighscores = 91,
109
+ MenuOptionsSaveDataClearMilestones = 92,
110
+ MenuOptionsSaveDataClearOptions = 93,
111
+ MenuOptionsSaveDataClearSaves = 94,
112
+ MenuOptionsSaveDataClearCraftingRecipes = 95,
113
+ MenuOptionsSaveDataClearBindings = 96,
114
+ MenuOptionsConfirmImportGlobalData = 97,
115
+ MenuPauseGhostKeepSave = 98,
116
+ MenuPauseReturnToTitleScreen = 99,
117
+ MenuPauseReturnToTitleScreenChallenge = 100,
118
+ MenuPauseReturnToTitleScreenChallengeMultiplayer = 101,
119
+ MenuPauseReturnToTitleScreenMultiplayer = 102,
120
+ MultiplayerFailedToConnect = 103,
121
+ MultiplayerRestartServerAfterLoadingSave = 104,
122
+ MultiplayerDisconnect = 105,
123
+ MultiplayerDisconnectRejoin = 106,
124
+ MultiplayerServerHasUnpublishedMods = 107,
125
+ SteamworksURLOpenedInBrowser = 108,
126
+ SteamworksWorkshopOpenedInBrowser = 109,
127
+ SteamworksModWithNameAlreadyExists = 110,
128
+ SteamworksModImportSaveGameFailure = 111,
129
+ SteamworksModImportedSaveGame = 112,
130
+ SteamworksOpenFolderFailure = 113,
131
+ SteamworksModPublishModJsonUpdateFailed = 114,
132
+ SteamworksNotAvailableOnSteamDeck = 115,
133
+ UiSaveDrop = 116
133
134
  }
134
135
  export declare enum PromptType {
135
136
  Info = 0,
@@ -111,6 +111,7 @@ export declare const promptMenuOptionsConfirmDiscoverActions: import("@wayward/g
111
111
  export declare const promptMenuOptionsConfirmUnlockRecipes: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
112
112
  export declare const promptMenuOptionsSaveDataClearAll: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
113
113
  export declare const promptMenuOptionsSaveDataClearCharacters: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
114
+ export declare const promptMenuOptionsSaveDataClearUI: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
114
115
  export declare const promptMenuOptionsSaveDataClearHighscores: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
115
116
  export declare const promptMenuOptionsSaveDataClearMilestones: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
116
117
  export declare const promptMenuOptionsSaveDataClearOptions: import("@wayward/game/game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
@@ -24,7 +24,7 @@ import type { IslandId } from "@wayward/game/game/island/IIsland";
24
24
  import type Island from "@wayward/game/game/island/Island";
25
25
  import { ItemType, ItemTypeExtra } from "@wayward/game/game/item/IItem";
26
26
  import type Item from "@wayward/game/game/item/Item";
27
- import type { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/MagicalPropertyManager";
27
+ import type { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/IMagicalProperty";
28
28
  import { Milestone } from "@wayward/game/game/milestones/IMilestone";
29
29
  import type TileEvent from "@wayward/game/game/tile/TileEvent";
30
30
  import type Translation from "@wayward/game/language/Translation";
@@ -83,62 +83,63 @@ declare enum Dictionary {
83
83
  Macro = 71,
84
84
  MagicalPropertyAffix = 72,
85
85
  MagicalPropertyType = 73,
86
- MapQuality = 74,
87
- MenuBarButton = 75,
88
- Message = 76,
89
- MessagesDefaultFilter = 77,
90
- MessagesTimestampMode = 78,
91
- Milestone = 79,
92
- MilestoneModifierGroup = 80,
93
- MilestoneSort = 81,
94
- Misc = 82,
95
- ModLoadError = 83,
96
- ModLoadFailureReason = 84,
97
- ModProvide = 85,
98
- ModSort = 86,
99
- ModType = 87,
100
- MultiplayerCompatibility = 88,
101
- MultiplayerDisconnectReason = 89,
102
- MusicPlaylist = 90,
103
- Note = 91,
104
- Npc = 92,
105
- Number = 93,
106
- PartOfDay = 94,
107
- Prompt = 95,
108
- QuadrantComponent = 96,
109
- QuadrantComponentContextMenuAction = 97,
110
- Quality = 98,
111
- Quest = 99,
112
- QuestRequirement = 100,
113
- RecipeLevel = 101,
114
- Region = 102,
115
- Riddle = 103,
116
- RunekeeperDomain = 104,
117
- RunekeeperDomainEvent = 105,
118
- SaveImportErrorReason = 106,
119
- SaveSlotSort = 107,
120
- Skill = 108,
121
- SkillsSort = 109,
122
- Source = 110,
123
- Stat = 111,
124
- Status = 112,
125
- StatusEffect = 113,
126
- StatusThreatLevel = 114,
127
- SteamInputKeyboardPosition = 115,
128
- TeamMemberResponsibility = 116,
129
- TemperatureType = 117,
130
- Term = 118,
131
- Terrain = 119,
132
- ThirstLevel = 120,
133
- TileEvent = 121,
134
- TooltipVisibilityOption = 122,
135
- Ui = 123,
136
- UiQuadrant = 124,
137
- UnableToJoinReason = 125,
138
- UnlockedRecipesStrategy = 126,
139
- UsableActionType = 127,
140
- Website = 128,
141
- WeightStatus = 129,
142
- WorldLayer = 130
86
+ MagicalSubPropertyAffix = 74,
87
+ MapQuality = 75,
88
+ MenuBarButton = 76,
89
+ Message = 77,
90
+ MessagesDefaultFilter = 78,
91
+ MessagesTimestampMode = 79,
92
+ Milestone = 80,
93
+ MilestoneModifierGroup = 81,
94
+ MilestoneSort = 82,
95
+ Misc = 83,
96
+ ModLoadError = 84,
97
+ ModLoadFailureReason = 85,
98
+ ModProvide = 86,
99
+ ModSort = 87,
100
+ ModType = 88,
101
+ MultiplayerCompatibility = 89,
102
+ MultiplayerDisconnectReason = 90,
103
+ MusicPlaylist = 91,
104
+ Note = 92,
105
+ Npc = 93,
106
+ Number = 94,
107
+ PartOfDay = 95,
108
+ Prompt = 96,
109
+ QuadrantComponent = 97,
110
+ QuadrantComponentContextMenuAction = 98,
111
+ Quality = 99,
112
+ Quest = 100,
113
+ QuestRequirement = 101,
114
+ RecipeLevel = 102,
115
+ Region = 103,
116
+ Riddle = 104,
117
+ RunekeeperDomain = 105,
118
+ RunekeeperDomainEvent = 106,
119
+ SaveImportErrorReason = 107,
120
+ SaveSlotSort = 108,
121
+ Skill = 109,
122
+ SkillsSort = 110,
123
+ Source = 111,
124
+ Stat = 112,
125
+ Status = 113,
126
+ StatusEffect = 114,
127
+ StatusThreatLevel = 115,
128
+ SteamInputKeyboardPosition = 116,
129
+ TeamMemberResponsibility = 117,
130
+ TemperatureType = 118,
131
+ Term = 119,
132
+ Terrain = 120,
133
+ ThirstLevel = 121,
134
+ TileEvent = 122,
135
+ TooltipVisibilityOption = 123,
136
+ Ui = 124,
137
+ UiQuadrant = 125,
138
+ UnableToJoinReason = 126,
139
+ UnlockedRecipesStrategy = 127,
140
+ UsableActionType = 128,
141
+ Website = 129,
142
+ WeightStatus = 130,
143
+ WorldLayer = 131
143
144
  }
144
145
  export default Dictionary;