@wayward/types 2.15.0-beta.dev.20251024.1 → 2.15.1-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 (49) hide show
  1. package/definitions/game/IGlobal.d.ts +1 -0
  2. package/definitions/game/game/curse/Curse.d.ts +16 -1
  3. package/definitions/game/game/curse/CurseEvent.d.ts +9 -1
  4. package/definitions/game/game/curse/event/CurseEventCraftingInspiration.d.ts +3 -2
  5. package/definitions/game/game/curse/event/CurseEventFrigidNight.d.ts +2 -0
  6. package/definitions/game/game/curse/event/CurseEventHatedByTheWilds.d.ts +5 -0
  7. package/definitions/game/game/curse/event/CurseEventHeatWave.d.ts +2 -0
  8. package/definitions/game/game/curse/event/CurseEventLovedByTheWilds.d.ts +1 -0
  9. package/definitions/game/game/curse/event/CurseEventLucky.d.ts +2 -1
  10. package/definitions/game/game/curse/event/CurseEventNewPlants.d.ts +2 -0
  11. package/definitions/game/game/curse/event/CurseEventPlantDeath.d.ts +2 -0
  12. package/definitions/game/game/curse/event/CurseEventUnlucky.d.ts +2 -1
  13. package/definitions/game/game/entity/Entity.d.ts +2 -2
  14. package/definitions/game/game/entity/EntityMovable.d.ts +2 -0
  15. package/definitions/game/game/entity/Human.d.ts +2 -1
  16. package/definitions/game/game/entity/IHuman.d.ts +11 -0
  17. package/definitions/game/game/entity/action/IActionContext.d.ts +2 -0
  18. package/definitions/game/game/entity/action/usable/UsableAction.d.ts +2 -2
  19. package/definitions/game/game/entity/ai/AI.d.ts +3 -3
  20. package/definitions/game/game/entity/creature/Creature.d.ts +3 -1
  21. package/definitions/game/game/entity/creature/ICreature.d.ts +2 -1
  22. package/definitions/game/game/inspection/inspections/DeityInspection.d.ts +1 -0
  23. package/definitions/game/game/island/Island.d.ts +0 -2
  24. package/definitions/game/game/item/IItem.d.ts +8 -2
  25. package/definitions/game/game/item/Item.d.ts +7 -1
  26. package/definitions/game/game/item/ItemManager.d.ts +1 -1
  27. package/definitions/game/game/magic/MagicalPropertyDescriptions.d.ts +1 -0
  28. package/definitions/game/game/magic/MagicalPropertyType.d.ts +16 -3
  29. package/definitions/game/game/milestones/milestone/Runekeeper.d.ts +6 -3
  30. package/definitions/game/game/tile/Tile.d.ts +2 -2
  31. package/definitions/game/language/dictionary/Message.d.ts +846 -845
  32. package/definitions/game/save/upgrade/UpgradeVersion.d.ts +2 -1
  33. package/definitions/game/save/upgrade/UpgradeVersionRegistry.d.ts +2 -2
  34. package/definitions/game/save/upgrade/versions/beta2.14.0/beta2.14.0.d.ts +12 -0
  35. package/definitions/game/save/upgrade/versions/beta2.15.0/beta2.15.0.d.ts +12 -0
  36. package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1-dev20251026.d.ts +12 -0
  37. package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1-dev20251027.d.ts +38 -0
  38. package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1.d.ts +12 -0
  39. package/definitions/game/steamworks/Steamworks.d.ts +5 -7
  40. package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +2 -2
  41. package/definitions/game/ui/util/ImagePath.d.ts +1 -0
  42. package/definitions/game/utilities/dev/Debug.d.ts +1 -1
  43. package/definitions/hosts/shared/globals.d.ts +2 -2
  44. package/definitions/test/suite/unitTests/game/IslandTestUtilities.d.ts +54 -0
  45. package/definitions/utilities/Errors.d.ts +1 -0
  46. package/definitions/utilities/math/Math2.d.ts +7 -1
  47. package/package.json +1 -1
  48. /package/definitions/game/save/upgrade/versions/beta2.14.0/{_beta.2.14.0-dev20240828.d.ts → _beta2.14.0-dev20240828.d.ts} +0 -0
  49. /package/definitions/test/suite/unitTests/game/{Island.spec.d.ts → Islands.spec.d.ts} +0 -0
@@ -52,7 +52,7 @@ export interface IUpgradeVersion {
52
52
  upgradeCorpse?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, corpse: Corpse): any;
53
53
  upgradeAi?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, ai: AiManager): any;
54
54
  upgradeMagic?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, magic?: MagicalPropertyManager): any;
55
- upgradeCurseEvent?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, curseEvent: CurseEventInstance): any;
55
+ upgradeCurseEvent?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, curseEvent: CurseEventInstance, island: Island): any;
56
56
  upgradeCreatureZone?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, zone: CreatureZone): any;
57
57
  upgradeTile?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, tile: Tile): any;
58
58
  upgradeTileData?(version: Version.Info, upgrades: UpgradesArrayCompressedPusher, tile: Tile, tileData: ITileData[]): any;
@@ -69,3 +69,4 @@ export interface IUpgradeVersionDefinitionWithData<T = any> extends IUpgradeVers
69
69
  }
70
70
  export default function <T>(definition: IUpgradeVersionDefinitionWithData<T>): IUpgradeVersionDefinitionWithData<T>;
71
71
  export default function <T>(definition: IUpgradeVersionDefinition<T>): IUpgradeVersionDefinition<T>;
72
+ export declare function UpgradeVersionMinorRegistry(registry: Record<string, IUpgradeVersionDefinition>): Record<string, IUpgradeVersion>;
@@ -8,13 +8,13 @@
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 { IUpgradeVersion, UpgradeParameters, UpgradeType } from "@wayward/game/save/upgrade/UpgradeVersion";
11
+ import { type IUpgradeVersion, type UpgradeParameters, type UpgradeType } from "@wayward/game/save/upgrade/UpgradeVersion";
12
12
  import type UpgradesArray from "@wayward/game/save/upgrade/UpgradesArray";
13
13
  import type Version from "@wayward/utilities/Version";
14
14
  import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
15
15
  export declare const BUILD_TIME_INTRODUCED_TIME: Date;
16
16
  declare namespace UpgradeVersionRegistry {
17
- function getMostRecentBuildId(): IBuildId | undefined;
17
+ function getMostRecentUpgradeId(): IBuildId | undefined;
18
18
  function getAll(): readonly IUpgradeVersion[];
19
19
  function run<TYPE extends UpgradeType>(version: Version.Info, messages: UpgradesArray, which: TYPE, ...params: UpgradeParameters<TYPE>): void;
20
20
  }
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2025 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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2025 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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2025 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<unknown>;
12
+ export default _default;
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * Copyright 2011-2025 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
+ export declare enum StatNew {
12
+ Health = 0,
13
+ Stamina = 1,
14
+ Hunger = 2,
15
+ Thirst = 3,
16
+ Weight = 4,
17
+ Metabolism = 5,
18
+ Strength = 6,
19
+ Dexterity = 7,
20
+ Attack = 8,
21
+ Defense = 9,
22
+ InsulationHeat = 10,
23
+ InsulationCold = 11,
24
+ Luck = 12,
25
+ Curse = 13,
26
+ AttackDefenseRow = 14,
27
+ Generic = 15,
28
+ Temperature = 16,
29
+ Produce = 17,
30
+ Happiness = 18,
31
+ Tamed = 19,
32
+ Petting = 20,
33
+ Waste = 21,
34
+ Petted = 22,
35
+ DespawnProtection = 23
36
+ }
37
+ declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition<unknown>;
38
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2025 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: Record<string, import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersion>;
12
+ export default _default;
@@ -90,7 +90,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
90
90
  getMatchmakingServerPort(): number;
91
91
  getSteamNetworking(): ISteamworksNetworking | undefined;
92
92
  /** @deprecated For console use */
93
- protected setBuildId(id?: string): void;
93
+ protected setUpgradeId(id?: string): void;
94
94
  initialize(): Promise<IWaywardPreload | undefined>;
95
95
  enableSafePaths(): Promise<void>;
96
96
  onUnload(): void;
@@ -118,18 +118,16 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
118
118
  */
119
119
  get buildTime(): number;
120
120
  /**
121
- * Returns the build ID of the game, not depending on any save that's currently loaded.
121
+ * Returns the upgrade ID of the game, not depending on any save that's currently loaded.
122
+ * The upgrade ID comes from the most recent applicable save upgrade registered in {@link UpgradeVersionRegistry}.
122
123
  *
123
- * **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,
124
- * or due to the tests failing, this build ID will be for that previous build even if the deploy ID is different.
125
- *
126
- * Build IDs are saved in the following places:
124
+ * Upgrade IDs are saved in the following places:
127
125
  * - {@link saveDataGlobal.gameLastPlayedBuildId}
128
126
  * - {@link saveData.gameBuildId}
129
127
  * - {@link Island.mapGenBuildId}
130
128
  * - {@link Island.saveBuildId}
131
129
  */
132
- get buildId(): IBuildId | undefined;
130
+ get upgradeId(): IBuildId | undefined;
133
131
  /**
134
132
  * Returns a string about how the game is running
135
133
  */
@@ -24,6 +24,7 @@ import type { IDraggableEvents } from "@wayward/game/ui/util/Draggable";
24
24
  import Draggable from "@wayward/game/ui/util/Draggable";
25
25
  import type { ISortableDraggableEvents } from "@wayward/game/ui/util/Sortable";
26
26
  import PerfCache from "@wayward/game/utilities/PerfCache";
27
+ import Debug from "@wayward/game/utilities/dev/Debug";
27
28
  import Vector2 from "@wayward/game/utilities/math/Vector2";
28
29
  import type { Events, IEventEmitter } from "@wayward/utilities/event/EventEmitter";
29
30
  type ItemSlotExtend = Omit<Component, "event"> & {
@@ -84,8 +85,7 @@ export default class ItemComponent extends Component implements ItemSlot {
84
85
  readonly draggable?: Draggable;
85
86
  private transient;
86
87
  protected constructor(handler: ItemComponentHandler, ...params: any[]);
87
- /** @deprecated For console use only */
88
- protected get debug(): any;
88
+ get debug(): Debug.JIT<[]>;
89
89
  private tickEndHandlerReasons?;
90
90
  private registerTickEndHandler;
91
91
  private deregisterTickEndHandler;
@@ -43,6 +43,7 @@ export default class ImagePath<PATHTYPE extends PathType = PathType> {
43
43
  setCustomPath(customPath?: GetterOfOr<string | ImagePath | undefined>): this;
44
44
  refresh(): void;
45
45
  get(isVariable?: boolean): string | null;
46
+ getPath(isVariable?: boolean): string | null;
46
47
  private deregistered;
47
48
  apply(component: Component, variableName: string): this;
48
49
  private unapply;
@@ -12,7 +12,7 @@ import DebugShared from "@wayward/utilities/dev/DebugShared";
12
12
  declare namespace Debug {
13
13
  function typeIfRelevant(type: string, name: string): string | undefined;
14
14
  function where(thing: unknown): string | undefined;
15
- type JIT = DebugShared.JIT;
15
+ type JIT<A extends any[]> = DebugShared.JIT<A>;
16
16
  const JIT: typeof DebugShared.JIT;
17
17
  const isJIT: typeof DebugShared.isJIT;
18
18
  }
@@ -9,8 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { IWaywardTitle } from "@wayward/hosts/shared/globalTypes";
12
- export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 15, gameVersionPatch = 0, gameVersionName = "Cursebreaker", gameVersionColor = 5186397;
13
- export declare const gameVersion = "beta2.15.0";
12
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 15, gameVersionPatch = 1, gameVersionName = "Cursebreaker", gameVersionColor = 5186397;
13
+ export declare const gameVersion = "beta2.15.1";
14
14
  export declare const gameVersionTitleMajor = "Wayward: Cursebreaker";
15
15
  export declare const gameVersionTitleMinor: string;
16
16
  export declare const gameVersionTitle: string;
@@ -0,0 +1,54 @@
1
+ /*!
2
+ * Copyright 2011-2025 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 { ITemplateBiomeOptions } from "@wayward/game/game/biome/template/Template";
12
+ import type Doodad from "@wayward/game/game/doodad/Doodad";
13
+ import type { DoodadType } from "@wayward/game/game/doodad/IDoodad";
14
+ import type { ActionType, IActionApi } from "@wayward/game/game/entity/action/IAction";
15
+ import type Creature from "@wayward/game/game/entity/creature/Creature";
16
+ import { CreatureType } from "@wayward/game/game/entity/creature/ICreature";
17
+ import type Human from "@wayward/game/game/entity/Human";
18
+ import type { NPCType } from "@wayward/game/game/entity/npc/INPCs";
19
+ import type NPC from "@wayward/game/game/entity/npc/NPC";
20
+ import type { Quality } from "@wayward/game/game/IObject";
21
+ import type { INewIslandOverrides, IslandId } from "@wayward/game/game/island/IIsland";
22
+ import type Island from "@wayward/game/game/island/Island";
23
+ import type { ItemType, ItemTypeGroup } from "@wayward/game/game/item/IItem";
24
+ import type Item from "@wayward/game/game/item/Item";
25
+ import { TerrainType } from "@wayward/game/game/tile/ITerrain";
26
+ import type Tile from "@wayward/game/game/tile/Tile";
27
+ import type { TestRunContext } from "@wayward/test/testRunner";
28
+ import WorldZ from "@wayward/utilities/game/WorldZ";
29
+ export declare namespace IslandTestUtilities {
30
+ let human: Human;
31
+ let island: Island;
32
+ const defaultTemplateBiomeOptions: ITemplateBiomeOptions;
33
+ const defaultNewIslandOverides: Partial<INewIslandOverrides>;
34
+ function before(context: TestRunContext): Promise<void>;
35
+ function after(context: TestRunContext): Promise<void>;
36
+ function waitForMovementCompletion(context: TestRunContext): Promise<void>;
37
+ function moveToIsland(islandId: IslandId, newIslandOverrides?: Partial<INewIslandOverrides>, extraTravelTime?: number): Promise<void>;
38
+ function moveToNewIsland(newIslandOverrides?: Partial<INewIslandOverrides>): Promise<void>;
39
+ function teleportAndFaceTargetTile(isTargetTile: (tile: Tile) => boolean): void;
40
+ /**
41
+ * Clear / reset the the state of the player/world
42
+ */
43
+ function beforeEach(context: TestRunContext, shouldMoveToNewIsland?: boolean): Promise<void>;
44
+ function createItems(...items: Array<ItemType | ItemTypeGroup>): Item[];
45
+ function createDoodad(doodadType: DoodadType): Doodad;
46
+ function createCreature(creatureType: CreatureType, z?: WorldZ): Creature;
47
+ function createNPC(npcType: NPCType, z?: WorldZ): NPC;
48
+ function onPostExecuteAction(_: any, actionType: ActionType, api: IActionApi, args: any[]): void;
49
+ function onGetFastForwardAmount(_: any, defaultFastForwardAmount: number): number;
50
+ /**
51
+ * update the tile to act like it was worldgen'd to some type / quality
52
+ */
53
+ function updateToWorldGenTile(tile: Tile, type: TerrainType, quality: Quality): void;
54
+ }
@@ -28,6 +28,7 @@ declare namespace Errors {
28
28
  * Returns the filename of the caller of the current function.
29
29
  */
30
30
  function callerFileBasename(skip?: number): string;
31
+ function anonymisePaths(stack: string, to?: string): string;
31
32
  }
32
33
  export default Errors;
33
34
  export declare function ensureExhaustive(value: never): never;
@@ -37,9 +37,15 @@ declare namespace Math2 {
37
37
  /**
38
38
  * Returns a number floored to a certain number of decimal places.
39
39
  *
40
- * Example: `roundNumber(1.24999999, 2): 1.24`
40
+ * Example: `floorNumber(1.24999999, 2): 1.24`
41
41
  */
42
42
  function floorNumber(num: number, places: number): number;
43
+ /**
44
+ * Returns a number ceiled to a certain number of decimal places.
45
+ *
46
+ * Example: `ceilNumber(1.24111111, 2): 1.25`
47
+ */
48
+ function ceilNumber(num: number, places: number): number;
43
49
  /**
44
50
  * Returns a number rounded to a multiple
45
51
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.15.0-beta.dev.20251024.1",
4
+ "version": "2.15.1-beta",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",