@wayward/types 2.14.2-beta.dev.20241222.1 → 2.14.3-beta

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 (95) hide show
  1. package/definitions/game/IGlobal.d.ts +3 -0
  2. package/definitions/game/event/EventBuses.d.ts +18 -10
  3. package/definitions/game/event/EventManager.d.ts +7 -5
  4. package/definitions/game/game/Game.d.ts +2 -0
  5. package/definitions/game/game/IGame.d.ts +2 -1
  6. package/definitions/game/game/entity/Entity.d.ts +11 -9
  7. package/definitions/game/game/entity/EntityWithStats.d.ts +2 -1
  8. package/definitions/game/game/entity/IEntity.d.ts +2 -1
  9. package/definitions/game/game/entity/action/ActionsRegistration.d.ts +1 -1
  10. package/definitions/game/game/entity/action/actions/StokeFire.d.ts +1 -1
  11. package/definitions/game/game/entity/action/actions/moveItem/MoveItemFilterArgument.d.ts +3 -0
  12. package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +18 -2
  13. package/definitions/game/game/entity/action/usable/UsableAction.d.ts +19 -2
  14. package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +7 -1
  15. package/definitions/game/game/entity/ai/AI.d.ts +4 -0
  16. package/definitions/game/game/entity/ai/AiManager.d.ts +2 -2
  17. package/definitions/game/game/entity/creature/Creature.d.ts +3 -3
  18. package/definitions/game/game/entity/creature/CreatureManager.d.ts +1 -1
  19. package/definitions/game/game/entity/npc/NPC.d.ts +5 -6
  20. package/definitions/game/game/entity/player/Player.d.ts +2 -2
  21. package/definitions/game/game/inspection/IInspection.d.ts +1 -4
  22. package/definitions/game/game/inspection/InfoProvider.d.ts +2 -1
  23. package/definitions/game/game/inspection/InspectionsHandler.d.ts +2 -1
  24. package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +1 -0
  25. package/definitions/game/game/inspection/inspections/action/IActionInspection.d.ts +26 -0
  26. package/definitions/game/game/island/Island.d.ts +3 -0
  27. package/definitions/game/game/item/Item.d.ts +0 -1
  28. package/definitions/game/game/item/ItemFinder.d.ts +1 -1
  29. package/definitions/game/game/meta/SaveLoad.d.ts +1 -1
  30. package/definitions/game/game/options/IGameOptions.d.ts +6 -1
  31. package/definitions/game/language/Dictionary.d.ts +128 -127
  32. package/definitions/game/language/DictionaryMap.d.ts +252 -249
  33. package/definitions/game/language/Translation.d.ts +2 -2
  34. package/definitions/game/language/english/ui/ActionSlotItemMethods.d.ts +1 -1
  35. package/definitions/game/language/english/ui/ActionSlotTypes.d.ts +13 -0
  36. package/definitions/game/language/segment/BindSegment.d.ts +2 -2
  37. package/definitions/game/language/segment/InterpolateArgumentSegment.d.ts +2 -2
  38. package/definitions/game/language/segment/NumberSegment.d.ts +4 -4
  39. package/definitions/game/language/segment/ReferenceSegment.d.ts +2 -2
  40. package/definitions/game/language/segment/ReformatSegment.d.ts +2 -2
  41. package/definitions/game/language/segment/Segments.d.ts +1 -1
  42. package/definitions/game/language/segment/TranslationSegment.d.ts +4 -4
  43. package/definitions/game/mod/IMod.d.ts +2 -1
  44. package/definitions/game/renderer/RenderersNotifiers.d.ts +1 -1
  45. package/definitions/game/renderer/notifier/Notifier.d.ts +4 -1
  46. package/definitions/game/renderer/world/WorldRenderer.d.ts +4 -0
  47. package/definitions/game/resource/IResourceLoader.d.ts +51 -48
  48. package/definitions/game/save/data/SaveData.d.ts +2 -0
  49. package/definitions/game/save/data/SaveDataGlobal.d.ts +2 -0
  50. package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +6 -0
  51. package/definitions/game/save/upgrade/UpgradeVersion.d.ts +6 -1
  52. package/definitions/game/save/upgrade/versions/beta2.14.0/_beta.2.14.0-dev20240828.d.ts +1 -1
  53. package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev1.d.ts → beta2.14.0-dev00000001.d.ts} +1 -1
  54. package/definitions/game/save/upgrade/versions/beta2.14.0/{beta2.14.0-dev2.d.ts → beta2.14.0-dev00000002.d.ts} +1 -1
  55. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240827.d.ts +1 -1
  56. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240828.d.ts +1 -1
  57. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240829.d.ts +1 -1
  58. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240901.d.ts +1 -1
  59. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20240905.d.ts +1 -1
  60. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241024.d.ts +1 -1
  61. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0-dev20241129.d.ts +1 -1
  62. package/definitions/game/save/upgrade/versions/beta2.14.3/beta2.14.3-dev20241223.d.ts +12 -0
  63. package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
  64. package/definitions/game/steamworks/Steamworks.d.ts +15 -0
  65. package/definitions/game/ui/component/Component.d.ts +2 -0
  66. package/definitions/game/ui/component/ContextMenu.d.ts +1 -1
  67. package/definitions/game/ui/component/IComponent.d.ts +2 -1
  68. package/definitions/game/ui/old/OldUi.d.ts +1 -1
  69. package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +3 -99
  70. package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +6 -7
  71. package/definitions/game/ui/screen/screens/game/component/item/IItemComponent.d.ts +65 -0
  72. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +39 -0
  73. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentHandler.d.ts +46 -0
  74. package/definitions/game/ui/screen/screens/game/component/item/ItemComponentTradeManager.d.ts +32 -0
  75. package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -2
  76. package/definitions/game/ui/screen/screens/game/static/actions/ActionSlot.d.ts +8 -10
  77. package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +2 -1
  78. package/definitions/game/ui/screen/screens/game/static/actions/IActionsDrawer.d.ts +3 -3
  79. package/definitions/game/utilities/Version.d.ts +16 -7
  80. package/definitions/game/utilities/dev/Debug.d.ts +4 -0
  81. package/definitions/game/utilities/memory/MemoryLeakDetector.d.ts +1 -1
  82. package/definitions/game/utilities/object/Merge.d.ts +2 -0
  83. package/definitions/game/utilities/string/Interpolator.d.ts +37 -6
  84. package/definitions/hosts/shared/globalTypes.d.ts +4 -0
  85. package/definitions/hosts/shared/globals.d.ts +2 -2
  86. package/definitions/utilities/Errors.d.ts +10 -0
  87. package/definitions/utilities/Functions.d.ts +1 -1
  88. package/definitions/utilities/Log.d.ts +9 -0
  89. package/definitions/utilities/collection/map/IterableWeakMap.d.ts +35 -0
  90. package/definitions/utilities/collection/map/LimitedMap.d.ts +45 -0
  91. package/definitions/utilities/dev/DebugShared.d.ts +23 -0
  92. package/definitions/utilities/event/EventEmitter.d.ts +27 -3
  93. package/definitions/utilities/event/EventManager.d.ts +11 -1
  94. package/definitions/utilities/prototype/Define.d.ts +2 -0
  95. package/package.json +1 -1
@@ -10,10 +10,10 @@
10
10
  */
11
11
  import type { InfoProviderContext } from "@wayward/game/game/inspection/InfoProviderContext";
12
12
  import type { Reference } from "@wayward/game/game/reference/IReferenceManager";
13
- import type { ISegment, IStringSection } from "@wayward/game/utilities/string/Interpolator";
13
+ import type { IRegexSegment, IStringSection } from "@wayward/game/utilities/string/Interpolator";
14
14
  export interface IReferenceSection extends IStringSection {
15
15
  reference: Reference;
16
16
  context?: InfoProviderContext;
17
17
  }
18
- declare const referenceSegment: ISegment;
18
+ declare const referenceSegment: IRegexSegment;
19
19
  export default referenceSegment;
@@ -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 { ISegment } from "@wayward/game/utilities/string/Interpolator";
12
- declare const reformatSegment: ISegment;
11
+ import type { IRegexSegment } from "@wayward/game/utilities/string/Interpolator";
12
+ declare const reformatSegment: IRegexSegment;
13
13
  export default reformatSegment;
@@ -41,4 +41,4 @@ export declare enum Segment {
41
41
  }
42
42
  declare const segments: Record<Segment, ISegment>;
43
43
  export default segments;
44
- export declare const segmentsMapInverted: Map<ISegment, Segment>;
44
+ export declare const segmentsMapInverted: Map<ISegment<unknown>, Segment>;
@@ -9,14 +9,14 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Dictionary from "@wayward/game/language/Dictionary";
12
- import type { ISegment, ISegmentApi, IStringSection } from "@wayward/game/utilities/string/Interpolator";
12
+ import type { IRegexSegment, ISegmentApi, IStringSection } from "@wayward/game/utilities/string/Interpolator";
13
13
  import type { Random } from "@wayward/utilities/random/Random";
14
14
  declare namespace TranslationSegment {
15
- const include: ISegment;
16
- const thisEntry: ISegment & {
15
+ const include: IRegexSegment;
16
+ const thisEntry: IRegexSegment & {
17
17
  translationChain: Array<[Dictionary, number | string, number, Random]>;
18
18
  };
19
- const conditional: ISegment;
19
+ const conditional: IRegexSegment;
20
20
  function resolveTranslation(random: Random, api: ISegmentApi, dictionaryName: string, entryName: string, index: string | undefined, subTranslationArgsString: string, args: any[]): IStringSection[] | undefined;
21
21
  function getSubTranslationArgs(api: ISegmentApi, str: string, ...args: any[]): IStringSection[][];
22
22
  }
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Version from "@wayward/game/utilities/Version";
12
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
12
13
  export declare enum MultiplayerCompatibility {
13
14
  Clientside = "clientside",
14
15
  Serverside = "serverside",
@@ -35,7 +36,7 @@ export interface IModConfig {
35
36
  readonly github?: string;
36
37
  readonly saveGameData?: boolean;
37
38
  }
38
- export interface IModEvents {
39
+ export interface IModEvents extends IEventSubscriberEvents {
39
40
  unload(): any;
40
41
  initialize(): any;
41
42
  uninitialize(): any;
@@ -26,5 +26,5 @@ export declare class RenderersNotifiers {
26
26
  addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: DisplayableItemType): void;
27
27
  addCreature(location: INotificationLocation, creatureNotifierType: CreatureNotifierType, type: CreatureType, aberrant?: boolean): void;
28
28
  addMarker(location: INotificationLocation, markerType: MarkerIconType, markerGuid: string): void;
29
- removeNotification(location: INotificationLocation, guid: string): void;
29
+ removeMarker(location: INotificationLocation, guid: string): void;
30
30
  }
@@ -23,6 +23,9 @@ export declare class Notifier {
23
23
  private mostRecentLife;
24
24
  private nextUpdate;
25
25
  private readonly notifications;
26
+ /**
27
+ * Marker guid -> notification
28
+ */
26
29
  private readonly markers;
27
30
  private suspended;
28
31
  constructor(context: IRendererContext, capacity: number);
@@ -35,7 +38,7 @@ export declare class Notifier {
35
38
  addStatus(location: INotificationLocation, status: Status, reason: StatusChangeReason): void;
36
39
  addNotifierIcon(location: INotificationLocation, type: NotifierIconType): void;
37
40
  addMarker(location: INotificationLocation, type: MarkerIconType, markerGuid: string): void;
38
- removeNotification(guid: string): void;
41
+ removeMarker(guid: string): void;
39
42
  suspend(): void;
40
43
  resume(): void;
41
44
  private update;
@@ -144,6 +144,10 @@ export declare class WorldRenderer extends EventEmitter.Host<IWorldRendererEvent
144
144
  private overlayBatch;
145
145
  private vehicleBatch;
146
146
  private readonly entitiesInViewport;
147
+ /**
148
+ * A set of entities seen before (rendered on screen at least once)
149
+ */
150
+ private entititiesRenderedBefore;
147
151
  private viewportSpritesDirty;
148
152
  private cachedBounds;
149
153
  private cachedBoundsTimestamp;
@@ -10,52 +10,55 @@
10
10
  */
11
11
  export declare enum PathType {
12
12
  Action = 0,
13
- AttackAnimation = 1,
14
- ChallengeIcon = 2,
15
- ChangelogChangeType = 3,
16
- ContainerTabAction = 4,
17
- Corpse = 5,
18
- Creature = 6,
19
- Damage = 7,
20
- Deity = 8,
21
- Doodad = 9,
22
- Equip = 10,
23
- EquipSlot = 11,
24
- GameOptionsIcon = 12,
25
- Hairstyle = 13,
26
- HelpArticleIcon = 14,
27
- InfoIcon = 15,
28
- InputIcon = 16,
29
- Island = 17,
30
- IslandModifier = 18,
31
- Item = 19,
32
- Map = 20,
33
- MapTile = 21,
34
- MarkerIcon = 22,
35
- MenuBarButtonIcon = 23,
36
- MilestoneIcon = 24,
37
- Music = 25,
38
- Notifier = 26,
39
- Overlay = 27,
40
- Pin = 28,
41
- Quality = 29,
42
- RecipeLevel = 30,
43
- SkillIcon = 31,
44
- Sleep = 32,
45
- SoundEffect = 33,
46
- StatIcon = 34,
47
- StatusEffectGroup = 35,
48
- StatusIcon = 36,
49
- StatusIconFrame = 37,
50
- StatusIconNotifier = 38,
51
- StatusOverlay = 39,
52
- StatusThreatLevel = 40,
53
- Terrain = 41,
54
- TerrainDecoration = 42,
55
- TerrainDug = 43,
56
- TerrainMound = 44,
57
- TerrainTilled = 45,
58
- TileEvent = 46,
59
- Vehicle = 47,
60
- Website = 48
13
+ ActionInfoIcon = 1,
14
+ ActionSlotItemMethod = 2,
15
+ ActionSlotType = 3,
16
+ AttackAnimation = 4,
17
+ ChallengeIcon = 5,
18
+ ChangelogChangeType = 6,
19
+ ContainerTabAction = 7,
20
+ Corpse = 8,
21
+ Creature = 9,
22
+ Damage = 10,
23
+ Deity = 11,
24
+ Doodad = 12,
25
+ Equip = 13,
26
+ EquipSlot = 14,
27
+ GameOptionsIcon = 15,
28
+ Hairstyle = 16,
29
+ HelpArticleIcon = 17,
30
+ InfoIcon = 18,
31
+ InputIcon = 19,
32
+ Island = 20,
33
+ IslandModifier = 21,
34
+ Item = 22,
35
+ Map = 23,
36
+ MapTile = 24,
37
+ MarkerIcon = 25,
38
+ MenuBarButtonIcon = 26,
39
+ MilestoneIcon = 27,
40
+ Music = 28,
41
+ Notifier = 29,
42
+ Overlay = 30,
43
+ Pin = 31,
44
+ Quality = 32,
45
+ RecipeLevel = 33,
46
+ SkillIcon = 34,
47
+ Sleep = 35,
48
+ SoundEffect = 36,
49
+ StatIcon = 37,
50
+ StatusEffectGroup = 38,
51
+ StatusIcon = 39,
52
+ StatusIconFrame = 40,
53
+ StatusIconNotifier = 41,
54
+ StatusOverlay = 42,
55
+ StatusThreatLevel = 43,
56
+ Terrain = 44,
57
+ TerrainDecoration = 45,
58
+ TerrainDug = 46,
59
+ TerrainMound = 47,
60
+ TerrainTilled = 48,
61
+ TileEvent = 49,
62
+ Vehicle = 50,
63
+ Website = 51
61
64
  }
@@ -14,6 +14,7 @@ import type { ISerializedTranslation } from "@wayward/game/language/ITranslation
14
14
  import type { IMultiplayerState } from "@wayward/game/multiplayer/IMultiplayer";
15
15
  import type IClientStore from "@wayward/game/save/clientStore/IClientStore";
16
16
  import type EnumInfo from "@wayward/game/utilities/enum/EnumInfo";
17
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
17
18
  export declare const saveDataVersionUnknown = "Unknown";
18
19
  export default class SaveData {
19
20
  gameSlotName: string;
@@ -23,6 +24,7 @@ export default class SaveData {
23
24
  gameThumbnail: string;
24
25
  gameDifficulty: GameMode;
25
26
  gameBuildTime: number;
27
+ gameBuildId?: IBuildId;
26
28
  saveManagerSaveTime: number;
27
29
  saveManagerTicks: number;
28
30
  saveManagerDifficulty: GameMode;
@@ -16,11 +16,13 @@ import type { IDialogInfo } from "@wayward/game/ui/old/IOldUi";
16
16
  import type { ISavedCharacter } from "@wayward/game/ui/screen/screens/menu/menus/character/Character";
17
17
  import type Version from "@wayward/game/utilities/Version";
18
18
  import type EnumInfo from "@wayward/game/utilities/enum/EnumInfo";
19
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
19
20
  export default class SaveDataGlobal {
20
21
  static defaultOptions: IOptions;
21
22
  gameCrafted: SaferNumberIndexedObject<ICrafted>;
22
23
  gameLastPlayedVersion: Version.String;
23
24
  gameLastPlayedBuildTime?: number;
25
+ gameLastPlayedBuildId?: IBuildId;
24
26
  gameHighscores: IHighscore[];
25
27
  gamePlayedCount: number;
26
28
  options: IOptions;
@@ -64,6 +64,9 @@ declare const propertiesToSerializeObject: {
64
64
  gameBuildTime: {
65
65
  property: string[];
66
66
  };
67
+ gameBuildId: {
68
+ property: string[];
69
+ };
67
70
  saveTime: {
68
71
  property: string[];
69
72
  savePropertyFlag: SavePropertyFlag;
@@ -120,6 +123,9 @@ declare const propertiesToSerializeGlobalObject: {
120
123
  lastPlayedBuildTime: {
121
124
  property: string[];
122
125
  };
126
+ lastPlayedBuildId: {
127
+ property: string[];
128
+ };
123
129
  gamesPlayed: {
124
130
  property: string[];
125
131
  };
@@ -23,8 +23,10 @@ import type { IGameOptions } from "@wayward/game/game/options/IGameOptions";
23
23
  import type TileEvent from "@wayward/game/game/tile/TileEvent";
24
24
  import type { UpgradesArrayCompressedPusher } from "@wayward/game/save/upgrade/UpgradesArray";
25
25
  import type Version from "@wayward/game/utilities/Version";
26
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
26
27
  export interface IUpgradeVersion {
27
28
  name?: string;
29
+ buildId?: IBuildId;
28
30
  applies(buildVersion: Version.Info): boolean;
29
31
  upgradeGlobal?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher): any;
30
32
  upgradeGame?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, game: Game): any;
@@ -44,4 +46,7 @@ export interface IUpgradeVersion {
44
46
  export type UpgradeType = Exclude<keyof IUpgradeVersion, "applies">;
45
47
  export type UpgradeParameters<TYPE extends UpgradeType> = Required<IUpgradeVersion>[TYPE] extends (_v: any, _u: any, ...params: infer PARAMS) => any ? PARAMS : never;
46
48
  export declare function oldify<CURRENT, OLD>(current: CURRENT): Merge<CURRENT, Partial<OLD>>;
47
- export default function (definition: IUpgradeVersion): IUpgradeVersion;
49
+ export interface IUpgradeVersionDefinition extends Omit<IUpgradeVersion, "applies" | "name" | "buildId"> {
50
+ applies?: IUpgradeVersion["applies"];
51
+ }
52
+ export default function (definition: IUpgradeVersionDefinition): IUpgradeVersionDefinition;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -8,5 +8,5 @@
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
- declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion;
11
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
12
  export default _default;
@@ -0,0 +1,12 @@
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
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
12
+ export default _default;
@@ -21,6 +21,7 @@ export interface ISteamworksEvents {
21
21
  onSteamNetworkingMessagesSessionRequest(steamIdRemote: string): void;
22
22
  onSteamNetworkingMessagesSessionFailed(steamIdRemote: string, state: SteamNetworkingConnectionState, endReason: number): void;
23
23
  requestJoinServer(serverInfo: ServerInfo): any;
24
+ changeBuildId(): any;
24
25
  }
25
26
  export interface IModPath {
26
27
  path: string;
@@ -20,6 +20,7 @@ import { SteamStatArea } from "@wayward/game/steamworks/ISteamworks";
20
20
  import type { ISteamBeta } from "@wayward/hosts/shared/interfaces";
21
21
  import { type IMatchmakingServer, type INapiDiscordPresenceInfo, type IRemoteFile, type ISteamFriend, type ISteamId, type ISteamworksNetworking, type IWaywardPreload, type IWorkshopItem, type LobbyType } from "@wayward/hosts/shared/interfaces";
22
22
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
23
+ import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
23
24
  export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
24
25
  private readonly game;
25
26
  protected initialized: boolean;
@@ -88,6 +89,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
88
89
  getMatchmakingServer(): IMatchmakingServer | undefined;
89
90
  getMatchmakingServerPort(): number;
90
91
  getSteamNetworking(): ISteamworksNetworking | undefined;
92
+ setBuildId(id?: string): void;
91
93
  initialize(): Promise<IWaywardPreload | undefined>;
92
94
  enableSafePaths(): void;
93
95
  onUnload(): void;
@@ -114,6 +116,19 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
114
116
  * - {@link Island.saveBuildTime}
115
117
  */
116
118
  get buildTime(): number;
119
+ /**
120
+ * Returns the build ID of the game, not depending on any save that's currently loaded.
121
+ *
122
+ * **Note that this is NOT based on the deploy ID.** If a deploy reuses a previous build, for example due to no new commits happening,
123
+ * or due to the tests failing, this build ID will be for that previous build even if the deploy ID is different.
124
+ *
125
+ * Build IDs are saved in the following places:
126
+ * - {@link saveDataGlobal.gameLastPlayedBuildId}
127
+ * - {@link saveData.gameBuildId}
128
+ * - {@link Island.mapGenBuildId}
129
+ * - {@link Island.saveBuildId}
130
+ */
131
+ get buildId(): IBuildId | undefined;
117
132
  getPublishedMods(): IWorkshopItem[] | undefined;
118
133
  getStatInt(name: string): number | undefined;
119
134
  /**
@@ -101,7 +101,9 @@ export default class Component<E extends HTMLElement = HTMLElement> extends Even
101
101
  addEventListener(type: string, listener: (this: HTMLElement, ev: Event) => any, options?: boolean | AddEventListenerOptions): this;
102
102
  removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any): this;
103
103
  getAs<C extends Component>(cls: AnyClass<C>): C | undefined;
104
+ cast<C extends Component>(): C;
104
105
  matches(selector: string): boolean;
106
+ matches<C extends Component>(selector: string): this is C;
105
107
  exists(): boolean;
106
108
  /**
107
109
  * A cached alias for `element.getBoundingClientRect()`. Boxes are updated or regenerated as ancestors shift.
@@ -14,7 +14,7 @@ import Component from "@wayward/game/ui/component/Component";
14
14
  import type { TranslationGenerator } from "@wayward/game/ui/component/IComponent";
15
15
  import Text, { Heading } from "@wayward/game/ui/component/Text";
16
16
  import Bindable from "@wayward/game/ui/input/Bindable";
17
- import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
17
+ import type { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
18
18
  import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
19
19
  import type { IDraggableComponent, IDraggableEvents } from "@wayward/game/ui/util/Draggable";
20
20
  import Draggable from "@wayward/game/ui/util/Draggable";
@@ -14,7 +14,8 @@ import type { ISerializedTranslation } from "@wayward/game/language/ITranslation
14
14
  import type Translation from "@wayward/game/language/Translation";
15
15
  import type Component from "@wayward/game/ui/component/Component";
16
16
  import type { IStringSection } from "@wayward/game/utilities/string/Interpolator";
17
- export interface IComponentEvents {
17
+ import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
18
+ export interface IComponentEvents extends IEventSubscriberEvents {
18
19
  show(): any;
19
20
  hide(): any;
20
21
  toggleVisible(visible: boolean): any;
@@ -34,7 +34,7 @@ export default class OldUi {
34
34
  getSerializationProperties(_: string): string[];
35
35
  setVersionExtra(msg: string): void;
36
36
  openDialogs(): void;
37
- logErrorEvent(event: ErrorEvent | (Partial<ErrorEvent> & Error)): void;
37
+ logErrorEvent(eventOrError: unknown, skipLog?: true): void;
38
38
  private loggingRejection;
39
39
  private logPromiseRejectionEvent;
40
40
  }
@@ -8,29 +8,23 @@
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 { Quality } from "@wayward/game/game/IObject";
12
11
  import { EquipType } from "@wayward/game/game/entity/IHuman";
13
12
  import type { ActionId } from "@wayward/game/game/entity/action/usable/IUsableAction";
14
- import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
15
- import type MerchantNPC from "@wayward/game/game/entity/npc/npcs/Merchant";
16
- import type { IContainer, ItemTypeExtra } from "@wayward/game/game/item/IItem";
17
13
  import { ItemType } from "@wayward/game/game/item/IItem";
18
14
  import type Item from "@wayward/game/game/item/Item";
19
15
  import type MagicalPropertyManager from "@wayward/game/game/magic/MagicalPropertyManager";
20
16
  import Component from "@wayward/game/ui/component/Component";
21
17
  import type ContextMenu from "@wayward/game/ui/component/ContextMenu";
22
18
  import Bindable from "@wayward/game/ui/input/Bindable";
19
+ import { ItemComponentHandler } from "@wayward/game/ui/screen/screens/game/component/item/ItemComponentHandler";
23
20
  import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
24
21
  import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
25
22
  import type { IDraggableEvents } from "@wayward/game/ui/util/Draggable";
26
23
  import Draggable from "@wayward/game/ui/util/Draggable";
27
- import type Sortable from "@wayward/game/ui/util/Sortable";
28
24
  import type { ISortableDraggableEvents } from "@wayward/game/ui/util/Sortable";
29
25
  import PerfCache from "@wayward/game/utilities/PerfCache";
30
26
  import Vector2 from "@wayward/game/utilities/math/Vector2";
31
- import WeakishSet from "@wayward/utilities/collection/set/WeakishSet";
32
27
  import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
33
- import EventEmitter from "@wayward/utilities/event/EventEmitter";
34
28
  type ItemSlotExtend = Omit<Component, "event"> & {
35
29
  event: IEventEmitter<Component, IItemSlotEvents>;
36
30
  };
@@ -49,88 +43,6 @@ export interface IItemDropApi {
49
43
  bindable?: Bindable;
50
44
  handler?: ItemComponentHandler;
51
45
  }
52
- export declare enum ItemDetailIconLocation {
53
- TopLeft = 0,
54
- BottomRight = 1
55
- }
56
- export declare enum ItemClasses {
57
- Main = "item-component",
58
- _InHeading = "item-component--in-heading",
59
- Active = "active",// currently used for crafting & trading
60
- Icon = "item-component-icon",
61
- ItemIconIsReal = "item-component-icon-item-is-real",
62
- ActionIcon = "item-component-icon-action",
63
- ActionIconAnyItem = "item-component-icon-action-any-item",
64
- ActionIconMissingItem = "item-component-icon-action-missing-item",
65
- ActionIconHasItem = "item-component-icon-action-has-item",
66
- ActionIconNone = "item-component-icon-action-none",
67
- TargetIcon = "item-component-icon-target",
68
- TargetIcon_Creature = "item-component-icon-target--creature",
69
- TargetIcon_Doodad = "item-component-icon-target--doodad",
70
- TargetIcon_Vehicle = "item-component-icon-target--vehicle",
71
- TargetIcon_Plant = "item-component-icon-target--plant",
72
- TargetIcon_NPC = "item-component-icon-target--npc",
73
- TargetIcon_TileEvent = "item-component-icon-target--tile-event",
74
- SlottedIcon = "item-component-icon-slotted",
75
- Equipped = "item-component-equipped",
76
- EquipIcon = "item-component-icon-equip",
77
- EquipIconHasItem = "item-component-icon-equip-has-item",
78
- MagicalIcon = "item-component-icon-magical",
79
- ProtectedIcon = "item-component-icon-protected",
80
- Trading = "item-component-trading",
81
- TradingIcon = "item-component-icon-trading",
82
- TradingIconFromMerchant = "item-component-icon-trading-from-merchant",
83
- TradingIconToMerchant = "item-component-icon-trading-to-merchant",
84
- Slot = "item-component-slot",
85
- Dragging = "item-component-dragging",
86
- DragPreview = "item-component-drag-preview",
87
- DragPreview_Small = "item-component-drag-preview--small",
88
- StatBar = "item-component-stat-bar",
89
- StatBars = "item-component-stat-bars-wrapper",
90
- DecayBar = "item-component-stat-bar-decay",
91
- CooldownBar = "item-component-stat-bar-cooldown",
92
- DurabilityBar = "item-component-stat-bar-durability",
93
- NearlyDestroyed = "item-component-nearly-destroyed",
94
- NearlyDecayed = "item-component-nearly-decayed",
95
- Transient = "item-component-transient",
96
- Highlight = "item-component-highlight",
97
- Stack = "item-component-stack",
98
- StackQuantity = "item-component-stack-quantity",
99
- StackQuantityX = "item-component-stack-quantity-x",
100
- StackQuantityDigit = "item-component-stack-quantity-digit",
101
- Stacked = "item-component-stacked",
102
- StackedVisible = "item-component-stacked-visible"
103
- }
104
- export declare namespace ItemClasses {
105
- const IconLocation: (enumValue: ItemDetailIconLocation) => "item-component-icon-location-topleft" | "item-component-icon-location-bottomright";
106
- }
107
- export interface IItemComponentHandlerDescription {
108
- noDrag?: true;
109
- equipSlot?: EquipType;
110
- hasHighlight?: SupplierOr<boolean>;
111
- getItem?(): Item | undefined;
112
- getItemType?(): ItemType | ItemTypeExtra | undefined;
113
- getItemQuality?(): ArrayOr<Quality> | undefined;
114
- getAction?(): UsableAction | undefined;
115
- getActionSlot?(): ActionSlot | undefined;
116
- getBindables?(bindables: Bindable[]): Bindable[];
117
- getSortable?(): Sortable;
118
- getStackQuantity?(): number;
119
- getContainer?(): IContainer | undefined;
120
- getStackItems?(): readonly Item[];
121
- getStackDisplayItem?(): Item | undefined;
122
- getDisplayItem?(): Item | undefined;
123
- getDurability?(): number;
124
- getCooldown?(): number;
125
- isDamaged?(): boolean;
126
- isDecayed?(): boolean;
127
- }
128
- export interface ItemComponentHandler extends IItemComponentHandlerDescription {
129
- }
130
- export declare class ItemComponentHandler {
131
- readonly isItemComponentHandler = true;
132
- constructor(description?: IItemComponentHandlerDescription);
133
- }
134
46
  export declare enum ItemTradeType {
135
47
  None = "",
136
48
  ToMerchant = "To",
@@ -164,19 +76,10 @@ export interface IItemComponentStaticEvents {
164
76
  }
165
77
  export default class ItemComponent extends Component implements ItemSlot {
166
78
  readonly handler: ItemComponentHandler;
167
- static readonly eventGlobal: EventEmitter<null, IItemComponentStaticEvents>;
168
79
  static create<C extends ItemComponent = ItemComponent>(handler: ItemComponentHandler, ...params: any[]): C | undefined;
169
80
  static registerSlot(slot: ItemSlot): void;
170
81
  static getHovered(): ItemComponent | undefined;
171
82
  static QUALITY_CLASS_NAMES: PerfCache<string[]>;
172
- private static readonly tradingByItem;
173
- private static readonly tradingToMerchant;
174
- private static readonly tradingFromMerchant;
175
- static getTrading(merchant: MerchantNPC, type: ItemTradeType): WeakishSet<Item> | undefined;
176
- static isTrading(item: Item, merchant: MerchantNPC): boolean;
177
- static toggleTrading(items: Item[], merchant: MerchantNPC, trading: ItemTradeType): ItemTradeType;
178
- private static sendMerchantChatMessage;
179
- static clearTrading(merchant?: MerchantNPC): void;
180
83
  event: IEventEmitter<this, IItemComponentEvents>;
181
84
  readonly magicalIcon: Component<HTMLElement> | undefined;
182
85
  readonly protectedIcon: Component<HTMLElement> | undefined;
@@ -198,6 +101,7 @@ export default class ItemComponent extends Component implements ItemSlot {
198
101
  readonly draggable?: Draggable;
199
102
  private transient;
200
103
  protected constructor(handler: ItemComponentHandler, ...params: any[]);
104
+ protected get debug(): any;
201
105
  private tickEndHandlerReasons?;
202
106
  private registerTickEndHandler;
203
107
  private deregisterTickEndHandler;
@@ -228,6 +132,7 @@ export default class ItemComponent extends Component implements ItemSlot {
228
132
  protected onUpdateDecay(): void;
229
133
  protected onUpdateQuality(): void;
230
134
  protected onTickEnd(): void;
135
+ protected onRooted(): void;
231
136
  protected onRootedAndAppend(): void;
232
137
  protected onLoadedOnIsland(): void;
233
138
  protected onActionBarItemSlottedMapUpdate(): void;
@@ -270,6 +175,5 @@ export default class ItemComponent extends Component implements ItemSlot {
270
175
  private lastActionIcon?;
271
176
  private refreshActionIcon;
272
177
  protected onHoldingNotMoving(time: number): void;
273
- protected onMouseEnterOrLeave(): void;
274
178
  }
275
179
  export {};