@wayward/types 2.15.0-beta.dev.20251025.1 → 2.15.1-beta.dev.20251026.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.
- package/definitions/game/IGlobal.d.ts +1 -0
- package/definitions/game/game/curse/Curse.d.ts +2 -1
- package/definitions/game/game/curse/CurseEvent.d.ts +3 -0
- package/definitions/game/game/curse/event/CurseEventHatedByTheWilds.d.ts +5 -0
- package/definitions/game/game/curse/event/CurseEventLovedByTheWilds.d.ts +1 -0
- package/definitions/game/game/island/Island.d.ts +0 -2
- package/definitions/game/game/item/IItem.d.ts +5 -0
- package/definitions/game/game/item/Item.d.ts +5 -0
- package/definitions/game/language/dictionary/Message.d.ts +2 -2
- package/definitions/game/save/upgrade/UpgradeVersion.d.ts +1 -1
- package/definitions/game/save/upgrade/UpgradeVersionRegistry.d.ts +1 -1
- package/definitions/game/save/upgrade/versions/beta2.15.1/beta2.15.1-dev20251026.d.ts +12 -0
- package/definitions/game/steamworks/Steamworks.d.ts +5 -7
- package/definitions/hosts/shared/globals.d.ts +2 -2
- package/definitions/test/suite/unitTests/game/IslandTestUtilities.d.ts +54 -0
- package/package.json +1 -1
- /package/definitions/test/suite/unitTests/game/{Island.spec.d.ts → Islands.spec.d.ts} +0 -0
|
@@ -53,6 +53,7 @@ declare global {
|
|
|
53
53
|
const gameVersionTitle: string;
|
|
54
54
|
let gameVersionDeployId: IBuildId | undefined;
|
|
55
55
|
let gameVersionBuildId: IBuildId | undefined;
|
|
56
|
+
let gameVersionUpgradeId: IBuildId | undefined;
|
|
56
57
|
let webGlVersion: number;
|
|
57
58
|
const VIEWPORT_MIN_WIDTH: number;
|
|
58
59
|
const VIEWPORT_MIN_HEIGHT: number;
|
|
@@ -18,6 +18,7 @@ import type { IVector2 } from "@wayward/game/utilities/math/IVector";
|
|
|
18
18
|
import { IRange, IRangeRange } from "@wayward/utilities/math/Range";
|
|
19
19
|
import type { WeightedOption } from "@wayward/utilities/random/IRandom";
|
|
20
20
|
import DataComponent from "@wayward/game/game/entity/data/DataComponent";
|
|
21
|
+
import { ReferenceType } from "@wayward/game/game/reference/IReferenceManager";
|
|
21
22
|
export declare const CURSE_CAP = 10000;
|
|
22
23
|
export declare const CURSE_COMPONENT_ATTACK_CAP = 50;
|
|
23
24
|
export declare const CURSE_COMPONENT_ATTACK_FLOOR = 1;
|
|
@@ -113,7 +114,7 @@ declare namespace Curse {
|
|
|
113
114
|
function isMysteryForHuman(event: CurseEventInstance, human: Human): boolean;
|
|
114
115
|
function willHaveEventsTonight(island: Island): boolean;
|
|
115
116
|
function canWarnAboutIncomingEvents(island: Island): boolean;
|
|
116
|
-
function getCooldownMultiplier(island: Island, humans?: Human<unknown, number,
|
|
117
|
+
function getCooldownMultiplier(island: Island, humans?: Human<unknown, number, ReferenceType.NPC | ReferenceType.Player, unknown>[]): number;
|
|
117
118
|
function clearCooldown(island: Island): void;
|
|
118
119
|
function resetCooldown(island: Island): void;
|
|
119
120
|
function tickCurse(island: Island, humans: Human[]): void;
|
|
@@ -94,6 +94,9 @@ export interface CurseEventContextData<T> {
|
|
|
94
94
|
}
|
|
95
95
|
export declare function CurseEventContextData<T>(id: string): CurseEventContextDataDefinition<T | undefined>;
|
|
96
96
|
export declare function CurseEventContextData<T>(id: string, initializer: () => T): CurseEventContextDataDefinition<T>;
|
|
97
|
+
export declare namespace CurseEventContextData {
|
|
98
|
+
function get<T>(instance: CurseEventInstance, def: CurseEventContextDataDefinition<T>): T | undefined;
|
|
99
|
+
}
|
|
97
100
|
export interface CurseEventExtinguishOptions {
|
|
98
101
|
/**
|
|
99
102
|
* The number of flat ticks to reduce decays by
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
12
|
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CurseEventHatedByWildsTrackedCreatures: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<number[]>;
|
|
14
|
+
export declare const CurseEventHatedByWildsCreaturesMadeAberrant: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<{
|
|
15
|
+
id: number;
|
|
16
|
+
oldHealth: number;
|
|
17
|
+
}[]>;
|
|
13
18
|
export declare const CURSE_EVENT_HATED_BY_WILDS_MIN_CHANCE = 0.01;
|
|
14
19
|
export declare const CURSE_EVENT_HATED_BY_WILDS_CURSE_MULTIPLIER: IRange<number>;
|
|
15
20
|
export declare const CURSE_EVENT_HATED_BY_WILDS_COOLDOWN: IRange<number>;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { CurseEvent } from "@wayward/game/game/curse/CurseEvent";
|
|
12
12
|
import { IRange } from "@wayward/utilities/math/Range";
|
|
13
|
+
export declare const CurseEventLovedByWildsTrackedCreatures: import("@wayward/game/game/curse/CurseEvent").CurseEventContextDataDefinition<number[]>;
|
|
13
14
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_MIN_CHANCE = 0.01;
|
|
14
15
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_CURSE_MULTIPLIER: IRange<number>;
|
|
15
16
|
export declare const CURSE_EVENT_LOVED_BY_WILDS_RANDOM_HAPPINESS_AT_END: IRange<number>;
|
|
@@ -130,7 +130,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
130
130
|
readonly mapSizeSq: number;
|
|
131
131
|
spawnPoint: IVector3;
|
|
132
132
|
private _activated;
|
|
133
|
-
private _loadedReferences;
|
|
134
133
|
private _tiles;
|
|
135
134
|
modifiersCollection?: IslandModifiersCollection;
|
|
136
135
|
details?: IIslandDetails;
|
|
@@ -150,7 +149,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
150
149
|
get biome(): IBiomeDescription;
|
|
151
150
|
get isLoaded(): boolean;
|
|
152
151
|
get tiles(): SaferNumberIndexedObject<Tile>;
|
|
153
|
-
get hasLoadedItemReferences(): boolean;
|
|
154
152
|
get isLocalIsland(): boolean;
|
|
155
153
|
/**
|
|
156
154
|
* Check if this island has players on it
|
|
@@ -48,6 +48,7 @@ import type { IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
|
48
48
|
import type Vector2 from "@wayward/game/utilities/math/Vector2";
|
|
49
49
|
import type { IRGB } from "@wayward/utilities/Color";
|
|
50
50
|
import type { IRange } from "@wayward/utilities/math/Range";
|
|
51
|
+
import type { MagicalLootType } from "@wayward/game/game/item/MagicalLoot";
|
|
51
52
|
export interface IItemWeightComponent {
|
|
52
53
|
weightFraction?: number;
|
|
53
54
|
type: ItemType;
|
|
@@ -416,6 +417,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
416
417
|
* If set to true, this item will be able to have all magical properties regardless of the other properties it has.
|
|
417
418
|
*/
|
|
418
419
|
canHaveAllMagicalProperties?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* Default magical loot type for this item. Used for natural spawned magical motes
|
|
422
|
+
*/
|
|
423
|
+
defaultMagicalLootType?: MagicalLootType;
|
|
419
424
|
canAlter?: false;
|
|
420
425
|
canTransmogrify?: false;
|
|
421
426
|
canUpgrade?: false;
|
|
@@ -257,6 +257,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
257
257
|
*/
|
|
258
258
|
verifyAndFixItem(): void;
|
|
259
259
|
protected pipeMagicalPropertyManagerEvents(magic: MagicalPropertyManager): void;
|
|
260
|
+
protected onMagicSet(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, value?: number, curse?: true): void;
|
|
261
|
+
protected onMagicRemove(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): void;
|
|
262
|
+
protected onMagicClear(): void;
|
|
260
263
|
verifyAndFixMagic(): void;
|
|
261
264
|
/**
|
|
262
265
|
* @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
|
|
@@ -320,6 +323,8 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
320
323
|
rerollMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
|
|
321
324
|
rerollMagicalPropertyValues(): void;
|
|
322
325
|
initializeMagicalPropertyManager(): MagicalPropertyManager;
|
|
326
|
+
protected updateDurabilityForPersistence(): void;
|
|
327
|
+
protected clampDurabilityToMax(): void;
|
|
323
328
|
addMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes, valueType?: "min" | "max"): boolean;
|
|
324
329
|
getMagicalPropertyInfo(type: MagicalPropertyType): IMagicalPropertyInfo | undefined;
|
|
325
330
|
acquireNotify(human: Human, context?: ActionContext): void;
|
|
@@ -45,8 +45,8 @@ declare enum Message {
|
|
|
45
45
|
ActionContextKilledPlayerWithPet = 33,
|
|
46
46
|
ActionContextRested = 34,
|
|
47
47
|
ActionContextSlept = 35,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
ActionContextSurvivedCurseEvent = 36,
|
|
49
|
+
ActionContextTamedCreature = 37,
|
|
50
50
|
ActionCraftEfficacy = 38,
|
|
51
51
|
ActionCraftEfficacyHigh = 39,
|
|
52
52
|
ActionCraftEfficacyHighest = 40,
|
|
@@ -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;
|
|
@@ -14,7 +14,7 @@ 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
|
|
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: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition<unknown>;
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
130
|
+
get upgradeId(): IBuildId | undefined;
|
|
133
131
|
/**
|
|
134
132
|
* Returns a string about how the game is running
|
|
135
133
|
*/
|
|
@@ -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 =
|
|
13
|
-
export declare const gameVersion = "beta2.15.
|
|
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
|
+
}
|
package/package.json
CHANGED
|
File without changes
|