@wayward/types 2.11.1-beta.dev.20211228.1 → 2.11.1-beta.dev.20211231.2
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 +0 -1
- package/definitions/game/game/Game.d.ts +2 -1
- package/definitions/game/game/doodad/DoodadManager.d.ts +5 -2
- package/definitions/game/game/island/Island.d.ts +6 -0
- package/definitions/game/game/item/IItem.d.ts +8 -1
- package/definitions/game/game/meta/Loading.d.ts +11 -6
- package/definitions/game/multiplayer/IMultiplayer.d.ts +5 -5
- package/definitions/game/multiplayer/Multiplayer.d.ts +8 -1
- package/definitions/game/multiplayer/networking/Connection.d.ts +2 -2
- package/definitions/game/multiplayer/networking/IConnection.d.ts +1 -0
- package/definitions/game/multiplayer/packets/IPacket.d.ts +2 -1
- package/definitions/game/multiplayer/packets/Packet.d.ts +4 -2
- package/definitions/game/multiplayer/packets/client/AddPlayerPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/CaughtUpPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/ClearSyncPacketWaitingPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/DisplayInterruptPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/EmitPlayerEventPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/HideLoadingScreenPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/LoadIslandPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/PausePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/PongPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/ReadyPlayerPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/RemovePlayerPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/SendMessagePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/SetPlayerZPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/ShowLoadingScreenPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/SynchronizeGameStatePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/SynchronizeStatesPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/client/WorldPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/AddMessageHistoryPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/ConnectPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/ConnectedPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/DesyncPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/KeepAlivePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/LogsPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/PingPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/ReadyPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/UiDataUpdatePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/UpdateDialogInfoPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/server/UpdateQuickSlotInfoPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/ChatMessagePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/DisconnectPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/DiscoverRecipePacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/MarkAsExploredPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/UpdateMovementIntentPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/UpdateMultiplayerOptionsPacket.d.ts +1 -0
- package/definitions/game/multiplayer/packets/shared/UpdateWalkPathPacket.d.ts +1 -0
- package/definitions/game/ui/component/dropdown/EnumDropdown.d.ts +2 -1
- package/definitions/game/ui/component/dropdown/PlayerDropdown.d.ts +6 -5
- package/definitions/game/utilities/Log.d.ts +44 -43
- package/definitions/game/utilities/random/Random.d.ts +0 -1
- package/definitions/hosts/shared/globals.d.ts +2 -0
- package/definitions/test/core/applicationDom.d.ts +1 -1
- package/definitions/test/core/applicationInteractions.d.ts +19 -7
- package/definitions/test/core/applicationManager.d.ts +2 -2
- package/definitions/test/interfaces.d.ts +6 -2
- package/package.json +3 -1
|
@@ -61,7 +61,6 @@ declare global {
|
|
|
61
61
|
let saveManager: SaveManager;
|
|
62
62
|
let steamworks: Steamworks;
|
|
63
63
|
let ui: Ui;
|
|
64
|
-
const gc: ((options?: any) => Promise<void> | void) | undefined;
|
|
65
64
|
const gameVersion: string;
|
|
66
65
|
const gameVersionStage: string;
|
|
67
66
|
const gameVersionMajor: number;
|
|
@@ -165,7 +165,8 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
165
165
|
* This method should be able to be called multiple times in a row and nothing unexpected should occur.
|
|
166
166
|
* @param saveType Saves the game with the specified save type. Set to false to not save. Defaults to BackToMainMenu.
|
|
167
167
|
* @param shouldDisconnect Marks if the game should disconnect from multiplayer. Defaults to true.
|
|
168
|
+
* @param hasDisconnected Marks if the game just disconnected from multiplayer. Defaults to false.
|
|
168
169
|
*/
|
|
169
|
-
reset(saveType?: SaveType | false, shouldDisconnect?: boolean): Promise<void>;
|
|
170
|
+
reset(saveType?: SaveType | false, shouldDisconnect?: boolean, hasDisconnected?: boolean): Promise<void>;
|
|
170
171
|
fastForwardIsland(island: Island, ticks: number, multiplayerLoadingDescription?: MultiplayerLoadingDescription): Promise<void>;
|
|
171
172
|
}
|
|
@@ -39,10 +39,10 @@ export interface IDoodadManagerEvents {
|
|
|
39
39
|
remove(doodad: Doodad): any;
|
|
40
40
|
}
|
|
41
41
|
export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerEvents> {
|
|
42
|
-
private readonly scarecrows;
|
|
43
42
|
private static cachedBestDoodadForTier;
|
|
44
43
|
private static cachedGroups;
|
|
45
44
|
private static cachedDoodadSpawns;
|
|
45
|
+
private readonly scarecrows;
|
|
46
46
|
static getBestDoodadForTier(doodad: DoodadType | DoodadTypeGroup): DoodadType | undefined;
|
|
47
47
|
static generateLookups(): void;
|
|
48
48
|
static isGroup(doodadType: DoodadType | DoodadTypeGroup): doodadType is DoodadTypeGroup;
|
|
@@ -50,7 +50,10 @@ export default class DoodadManager extends ObjectManager<Doodad, IDoodadManagerE
|
|
|
50
50
|
static getGroupDoodads(doodadGroup: DoodadTypeGroup): Set<DoodadType>;
|
|
51
51
|
static getDoodadTypeGroupName(doodadType: DoodadType | DoodadTypeGroup, article?: boolean, count?: number): Translation;
|
|
52
52
|
delete(): void;
|
|
53
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Note: This can be called multiple times in the same game depending on loading/unloading of islands
|
|
55
|
+
*/
|
|
56
|
+
load(hasLoadedBefore: boolean): void;
|
|
54
57
|
isGroup(doodadType: DoodadType | DoodadTypeGroup): doodadType is DoodadTypeGroup;
|
|
55
58
|
isInGroup(doodadType: DoodadType, doodadGroup: DoodadTypeGroup | DoodadType): boolean;
|
|
56
59
|
getBestDoodadForTier(doodad: DoodadType | DoodadTypeGroup): DoodadType | undefined;
|
|
@@ -86,6 +86,11 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
86
86
|
loadCount: number;
|
|
87
87
|
seeds: ISeeds;
|
|
88
88
|
readonly seededRandom: Random<SeededGenerator>;
|
|
89
|
+
/**
|
|
90
|
+
* Random for milestone modifiers. You should only use the one in the default island
|
|
91
|
+
* todo: remove since this is no longer used
|
|
92
|
+
*/
|
|
93
|
+
readonly seededMilestoneModifiersRandom: Random<SeededGenerator>;
|
|
89
94
|
/**
|
|
90
95
|
* Set of players on this island
|
|
91
96
|
*/
|
|
@@ -106,6 +111,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
106
111
|
get id(): `${number},${number}`;
|
|
107
112
|
get biome(): import("game/biome/IBiome").IBiomeDescription;
|
|
108
113
|
get isLoaded(): boolean;
|
|
114
|
+
get hasLoadedItemReferences(): boolean;
|
|
109
115
|
get isLocalIsland(): boolean;
|
|
110
116
|
get world(): World;
|
|
111
117
|
/**
|
|
@@ -184,6 +184,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
|
|
|
184
184
|
plural?: string;
|
|
185
185
|
hideHelmet?: boolean;
|
|
186
186
|
worth?: number;
|
|
187
|
+
/**
|
|
188
|
+
* Array of items that the item is "made from" in cases where we can't use the disassembly items to burn into.
|
|
189
|
+
* All items in array are required to have onBurn set in their description to function properly.
|
|
190
|
+
*/
|
|
187
191
|
burnsLike?: ItemType[];
|
|
188
192
|
spawnableTiles?: TileGroup;
|
|
189
193
|
gather?: ILiquid;
|
|
@@ -279,10 +283,13 @@ export interface IMoveToTileOptions {
|
|
|
279
283
|
fromPoint?: IVector3;
|
|
280
284
|
toPoint: IVector3;
|
|
281
285
|
toContainer?: IContainer;
|
|
286
|
+
beforeMovement?: IMoveToTileBeforeMovementOptions;
|
|
282
287
|
afterMovement?: IMoveToTileAfterMovementOptions;
|
|
283
288
|
}
|
|
284
|
-
export interface
|
|
289
|
+
export interface IMoveToTileBeforeMovementOptions {
|
|
285
290
|
remove?: boolean;
|
|
291
|
+
}
|
|
292
|
+
export interface IMoveToTileAfterMovementOptions {
|
|
286
293
|
soundEffect?: SfxType;
|
|
287
294
|
particles?: IRGB;
|
|
288
295
|
}
|
|
@@ -128,17 +128,19 @@ declare module Loading {
|
|
|
128
128
|
*/
|
|
129
129
|
progress(load: Load, progress: number): any;
|
|
130
130
|
/**
|
|
131
|
-
* Emitted when a
|
|
131
|
+
* Emitted when a load has finished loading.
|
|
132
|
+
* Either this or "cancel" will be called when a load is done
|
|
132
133
|
*/
|
|
133
134
|
step(...loaded: Load[]): any;
|
|
134
135
|
/**
|
|
135
|
-
* Emitted when
|
|
136
|
+
* Emitted when a load has been cancelled.
|
|
137
|
+
* Either this or "step"" will be called when a load is done
|
|
136
138
|
*/
|
|
137
|
-
|
|
139
|
+
cancel(load: Load): any;
|
|
138
140
|
/**
|
|
139
|
-
* Emitted when
|
|
141
|
+
* Emitted when all things have finished loading
|
|
140
142
|
*/
|
|
141
|
-
|
|
143
|
+
end(...loaded: Load[]): any;
|
|
142
144
|
}
|
|
143
145
|
const currently: Map<Load, any[]>;
|
|
144
146
|
class Events extends EventEmitter.Host<ILoadingEvents> {
|
|
@@ -161,7 +163,10 @@ declare module Loading {
|
|
|
161
163
|
* Returns a promise that will resolve when the load is complete, and reject if the load is cancelled.
|
|
162
164
|
*/
|
|
163
165
|
function waitFor(load: Load): Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* Returns a promise that will resolve when all running loads are complete.
|
|
168
|
+
*/
|
|
169
|
+
function waitForAll(): Promise<void>;
|
|
164
170
|
function progress(load: Load, progress: number): Promise<void>;
|
|
165
|
-
function done(): Promise<void>;
|
|
166
171
|
}
|
|
167
172
|
export default Loading;
|
|
@@ -28,11 +28,11 @@ export interface IMultiplayerEvents {
|
|
|
28
28
|
checkConnection(webRtcWorks: boolean, webSocketWorks: boolean): any;
|
|
29
29
|
}
|
|
30
30
|
export declare enum MultiplayerSyncCheckLevel {
|
|
31
|
-
None =
|
|
32
|
-
Normal =
|
|
33
|
-
Extended =
|
|
34
|
-
Verbose =
|
|
35
|
-
All =
|
|
31
|
+
None = "none",
|
|
32
|
+
Normal = "normal",
|
|
33
|
+
Extended = "extended",
|
|
34
|
+
Verbose = "verbose",
|
|
35
|
+
All = "all"
|
|
36
36
|
}
|
|
37
37
|
export declare enum MultiplayerSyncCheck {
|
|
38
38
|
Action = 0,
|
|
@@ -12,7 +12,7 @@ import EventEmitter from "event/EventEmitter";
|
|
|
12
12
|
import Player from "game/entity/player/Player";
|
|
13
13
|
import type Island from "game/island/Island";
|
|
14
14
|
import type { IJoinServerOptions, IMultiplayerEvents, IMultiplayerOptions, PacketTarget, ServerInfo } from "multiplayer/IMultiplayer";
|
|
15
|
-
import { DisconnectReason, JoinServerRetryReason, MultiplayerSyncCheck, UnableToJoinReason } from "multiplayer/IMultiplayer";
|
|
15
|
+
import { DisconnectReason, JoinServerRetryReason, MultiplayerSyncCheck, UnableToJoinReason, MultiplayerSyncCheckLevel } from "multiplayer/IMultiplayer";
|
|
16
16
|
import type { IMatchmakingInfo } from "multiplayer/matchmaking/IMatchmaking";
|
|
17
17
|
import type { IConnection } from "multiplayer/networking/IConnection";
|
|
18
18
|
import type { IPacket } from "multiplayer/packets/IPacket";
|
|
@@ -65,6 +65,13 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
65
65
|
getOptions(): IMultiplayerOptions;
|
|
66
66
|
setOptions(options: IMultiplayerOptions, updateGame?: boolean): void;
|
|
67
67
|
updateOptions(updates: Partial<IMultiplayerOptions>): void;
|
|
68
|
+
/**
|
|
69
|
+
* Helper method for updating sync checks
|
|
70
|
+
* multiplayer.updateSyncChecks("normal")
|
|
71
|
+
* multiplayer.updateSyncChecks("verbose")
|
|
72
|
+
*/
|
|
73
|
+
updateSyncChecks(syncChecks: boolean | MultiplayerSyncCheckLevel | MultiplayerSyncCheck[]): void;
|
|
74
|
+
private parseSyncChecks;
|
|
68
75
|
enableSteamNetworkConnections(enable: boolean): void;
|
|
69
76
|
getConnectedMatchmakingInfo(): IMatchmakingInfo | undefined;
|
|
70
77
|
/**
|
|
@@ -47,7 +47,6 @@ export declare abstract class Connection implements IConnection {
|
|
|
47
47
|
sendKeepAlive(): void;
|
|
48
48
|
getState(): ConnectionState;
|
|
49
49
|
setState(state: ConnectionState): void;
|
|
50
|
-
serializePacket(packet: IPacket): ArrayBuffer;
|
|
51
50
|
/**
|
|
52
51
|
* Queues a packet to be sent soon
|
|
53
52
|
* Note: packets are serialized when queued
|
|
@@ -56,7 +55,7 @@ export declare abstract class Connection implements IConnection {
|
|
|
56
55
|
/**
|
|
57
56
|
* Queues data to be sent soon
|
|
58
57
|
*/
|
|
59
|
-
protected queuePacketData(data: ArrayBuffer): void;
|
|
58
|
+
protected queuePacketData(data: ArrayBuffer, packetNumber?: number): void;
|
|
60
59
|
/**
|
|
61
60
|
* Clears queued packets
|
|
62
61
|
*/
|
|
@@ -73,6 +72,7 @@ export declare abstract class Connection implements IConnection {
|
|
|
73
72
|
* Sends queued data to the connection w/ flow control
|
|
74
73
|
*/
|
|
75
74
|
private _processQueuedData;
|
|
75
|
+
private _serializePacket;
|
|
76
76
|
abstract readonly maxMessageSize: number;
|
|
77
77
|
abstract isConnected(): boolean;
|
|
78
78
|
protected abstract onClosing(): void;
|
|
@@ -31,7 +31,8 @@ export interface IPacket<T = any> {
|
|
|
31
31
|
isSyncCheckEnabled(): boolean;
|
|
32
32
|
isAllowedWhenPaused(): boolean;
|
|
33
33
|
process(): T;
|
|
34
|
-
|
|
34
|
+
processSerializedData(dataView: DataView): void;
|
|
35
|
+
serializeData(): void;
|
|
35
36
|
}
|
|
36
37
|
export declare enum NetworkPropertyType {
|
|
37
38
|
Bool = 0,
|
|
@@ -15,13 +15,15 @@ import type { IPacket, ISynchronizationCheckData } from "multiplayer/packets/IPa
|
|
|
15
15
|
export declare abstract class Packet<T = void> extends IndexedPacket implements IPacket<T> {
|
|
16
16
|
protected synchronizationCheckData: ISynchronizationCheckData;
|
|
17
17
|
private _arrayBuffer;
|
|
18
|
-
|
|
18
|
+
private _serializedDataByteOffset;
|
|
19
|
+
abstract getDebugInfo(): string;
|
|
19
20
|
getAllowedStates(): ConnectionState;
|
|
20
21
|
isSyncCheckEnabled(): boolean;
|
|
21
22
|
isAllowedWhenPaused(): boolean;
|
|
22
23
|
getSynchronizationCheckData(): ISynchronizationCheckData;
|
|
23
24
|
getArrayBuffer(id?: number): ArrayBuffer;
|
|
24
|
-
|
|
25
|
+
serializeData(): number;
|
|
26
|
+
processSerializedData(dataView: DataView): void;
|
|
25
27
|
abstract process(): T;
|
|
26
28
|
send(exclude?: PacketTarget): void;
|
|
27
29
|
sendTo(to: PacketTarget, force?: boolean): void;
|
|
@@ -12,5 +12,6 @@ import type { IPlayerOptions } from "game/IGame";
|
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
13
|
export default class AddPlayerPacket extends ClientPacket<number> {
|
|
14
14
|
playerOptions: IPlayerOptions;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
process(): number;
|
|
16
17
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
12
12
|
export default class ClearSyncPacketWaitingPacket extends ClientPacket {
|
|
13
13
|
waitId: string;
|
|
14
|
+
getDebugInfo(): string;
|
|
14
15
|
isSyncCheckEnabled(): boolean;
|
|
15
16
|
isAllowedWhenPaused(): boolean;
|
|
16
17
|
process(): void;
|
|
@@ -12,6 +12,7 @@ import type { Load } from "game/meta/Loading";
|
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
13
|
export default class HideLoadingScreenPacket extends ClientPacket {
|
|
14
14
|
load: Load;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
process(): void;
|
|
17
18
|
}
|
|
@@ -12,6 +12,7 @@ import type { IslandId } from "game/island/IIsland";
|
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
13
|
export default class LoadIslandPacket extends ClientPacket<Promise<void>> {
|
|
14
14
|
islandId: IslandId;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
process(): Promise<void>;
|
|
17
18
|
}
|
|
@@ -12,5 +12,6 @@ import { DisconnectReason } from "multiplayer/IMultiplayer";
|
|
|
12
12
|
import PlayerTargetedClientPacket from "multiplayer/packets/PlayerTargetedClientPacket";
|
|
13
13
|
export default class RemovePlayerPacket extends PlayerTargetedClientPacket {
|
|
14
14
|
reason: DisconnectReason;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
process(): void;
|
|
16
17
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
12
12
|
export default class SynchronizeGameStatePacket extends ClientPacket {
|
|
13
13
|
serverGameState: Uint8Array;
|
|
14
|
+
getDebugInfo(): string;
|
|
14
15
|
isSyncCheckEnabled(): boolean;
|
|
15
16
|
process(): void;
|
|
16
17
|
protected getInitialBufferSize(): number;
|
|
@@ -12,5 +12,6 @@ import type { ISynchronizeState } from "game/IGame";
|
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
13
|
export default class SynchronizeStatesPacket extends ClientPacket {
|
|
14
14
|
state: ISynchronizeState;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
process(): void;
|
|
16
17
|
}
|
|
@@ -13,6 +13,7 @@ import { ConnectionState } from "multiplayer/networking/IConnection";
|
|
|
13
13
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
14
14
|
export default class WorldPacket extends ClientPacket<Promise<void>> {
|
|
15
15
|
data: IMultiplayerWorldData;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
getAllowedStates(): ConnectionState;
|
|
17
18
|
process(): Promise<void>;
|
|
18
19
|
protected getInitialBufferSize(): number;
|
|
@@ -12,6 +12,7 @@ import type { IMessageHistoryItem } from "game/entity/player/IMessageManager";
|
|
|
12
12
|
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
13
13
|
export default class AddMessageHistoryPacket extends PlayerTargetedServerPacket {
|
|
14
14
|
messageHistoryItem: IMessageHistoryItem;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
isAllowedWhenPaused(): boolean;
|
|
17
18
|
process(): void;
|
|
@@ -13,6 +13,7 @@ import { ConnectionState } from "multiplayer/networking/IConnection";
|
|
|
13
13
|
import ServerPacket from "multiplayer/packets/ServerPacket";
|
|
14
14
|
export default class ConnectPacket extends ServerPacket {
|
|
15
15
|
playerOptions: IPlayerOptions;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
getAllowedStates(): ConnectionState;
|
|
17
18
|
isAllowedWhenPaused(): boolean;
|
|
18
19
|
process(): void;
|
|
@@ -15,6 +15,7 @@ import ServerPacket from "multiplayer/packets/ServerPacket";
|
|
|
15
15
|
* They probably still have packets to catch up on
|
|
16
16
|
*/
|
|
17
17
|
export default class ConnectedPacket extends ServerPacket {
|
|
18
|
+
getDebugInfo(): string;
|
|
18
19
|
getAllowedStates(): ConnectionState;
|
|
19
20
|
isAllowedWhenPaused(): boolean;
|
|
20
21
|
process(): void;
|
|
@@ -14,6 +14,7 @@ import ServerPacket from "multiplayer/packets/ServerPacket";
|
|
|
14
14
|
* If the server hasn't received this message for 15 seconds, the player is disconnected
|
|
15
15
|
*/
|
|
16
16
|
export default class KeepAlivePacket extends ServerPacket {
|
|
17
|
+
getDebugInfo(): string;
|
|
17
18
|
isSyncCheckEnabled(): boolean;
|
|
18
19
|
isAllowedWhenPaused(): boolean;
|
|
19
20
|
process(): void;
|
|
@@ -12,6 +12,7 @@ import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServer
|
|
|
12
12
|
export default class LogsPacket extends PlayerTargetedServerPacket {
|
|
13
13
|
logs: string;
|
|
14
14
|
containsServerGameState: boolean | undefined;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
isAllowedWhenPaused(): boolean;
|
|
17
18
|
process(): void;
|
|
@@ -15,6 +15,7 @@ import ServerPacket from "multiplayer/packets/ServerPacket";
|
|
|
15
15
|
* We can now mark the player as ready
|
|
16
16
|
*/
|
|
17
17
|
export default class ReadyPacket extends ServerPacket {
|
|
18
|
+
getDebugInfo(): string;
|
|
18
19
|
getAllowedStates(): ConnectionState;
|
|
19
20
|
isAllowedWhenPaused(): boolean;
|
|
20
21
|
process(): void;
|
|
@@ -13,5 +13,6 @@ import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServer
|
|
|
13
13
|
export default class UiDataUpdatePacket extends PlayerTargetedServerPacket {
|
|
14
14
|
static create(player: Player, updates: Map<string | number, Record<string, any>>): UiDataUpdatePacket;
|
|
15
15
|
updates: Map<string | number, Record<string, any>>;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
process(): void;
|
|
17
18
|
}
|
|
@@ -13,6 +13,7 @@ import type { IDialogInfo } from "ui/old/IOldUi";
|
|
|
13
13
|
export default class UpdateDialogInfoPacket extends PlayerTargetedServerPacket {
|
|
14
14
|
index: string | number;
|
|
15
15
|
info: IDialogInfo;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
isSyncCheckEnabled(): boolean;
|
|
17
18
|
isAllowedWhenPaused(): boolean;
|
|
18
19
|
process(): void;
|
|
@@ -13,6 +13,7 @@ import type { IQuickSlotInfo } from "ui/old/IOldUi";
|
|
|
13
13
|
export default class UpdateQuickSlotInfoPacket extends PlayerTargetedServerPacket {
|
|
14
14
|
quickSlot: number;
|
|
15
15
|
quickSlotInfo: IQuickSlotInfo | undefined;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
isSyncCheckEnabled(): boolean;
|
|
17
18
|
isAllowedWhenPaused(): boolean;
|
|
18
19
|
process(): void;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import PlayerTargetedSharedPacket from "multiplayer/packets/PlayerTargetedSharedPacket";
|
|
12
12
|
export default class ChatMessagePacket extends PlayerTargetedSharedPacket {
|
|
13
13
|
message: string;
|
|
14
|
+
getDebugInfo(): string;
|
|
14
15
|
isSyncCheckEnabled(): boolean;
|
|
15
16
|
isAllowedWhenPaused(): boolean;
|
|
16
17
|
process(): void;
|
|
@@ -12,6 +12,7 @@ import { DisconnectReason } from "multiplayer/IMultiplayer";
|
|
|
12
12
|
import SharedPacket from "multiplayer/packets/SharedPacket";
|
|
13
13
|
export default class DisconnectPacket extends SharedPacket {
|
|
14
14
|
reason: DisconnectReason;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
isAllowedWhenPaused(): boolean;
|
|
17
18
|
process(): void;
|
|
@@ -14,6 +14,7 @@ export default class DiscoverRecipePacket extends PlayerTargetedSharedPacket {
|
|
|
14
14
|
recipeType: ItemType;
|
|
15
15
|
newUnlock: boolean;
|
|
16
16
|
unlockTime: number;
|
|
17
|
+
getDebugInfo(): string;
|
|
17
18
|
isSyncCheckEnabled(): boolean;
|
|
18
19
|
isAllowedWhenPaused(): boolean;
|
|
19
20
|
process(): void;
|
|
@@ -12,6 +12,7 @@ import PlayerTargetedSharedPacket from "multiplayer/packets/PlayerTargetedShared
|
|
|
12
12
|
import type { IVector2 } from "utilities/math/IVector";
|
|
13
13
|
export default class MarkAsExploredPacket extends PlayerTargetedSharedPacket {
|
|
14
14
|
points: IVector2[];
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isSyncCheckEnabled(): boolean;
|
|
16
17
|
process(): void;
|
|
17
18
|
}
|
|
@@ -12,6 +12,7 @@ import type { IMovementIntent } from "game/entity/player/IPlayer";
|
|
|
12
12
|
import PlayerTargetedSharedPacket from "multiplayer/packets/PlayerTargetedSharedPacket";
|
|
13
13
|
export default class UpdateMovementIntentPacket extends PlayerTargetedSharedPacket {
|
|
14
14
|
intent: IMovementIntent;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isAllowedWhenPaused(): boolean;
|
|
16
17
|
process(): void;
|
|
17
18
|
}
|
|
@@ -12,6 +12,7 @@ import type { IMultiplayerOptions } from "multiplayer/IMultiplayer";
|
|
|
12
12
|
import SharedPacket from "multiplayer/packets/SharedPacket";
|
|
13
13
|
export default class UpdateMultiplayerOptionsPacket extends SharedPacket {
|
|
14
14
|
options: IMultiplayerOptions;
|
|
15
|
+
getDebugInfo(): string;
|
|
15
16
|
isAllowedWhenPaused(): boolean;
|
|
16
17
|
process(): void;
|
|
17
18
|
}
|
|
@@ -13,6 +13,7 @@ import type { IVector2 } from "utilities/math/IVector";
|
|
|
13
13
|
export default class UpdateWalkPathPacket extends PlayerTargetedSharedPacket {
|
|
14
14
|
path: IVector2[] | undefined;
|
|
15
15
|
force: boolean | undefined;
|
|
16
|
+
getDebugInfo(): string;
|
|
16
17
|
isSyncCheckEnabled(): boolean;
|
|
17
18
|
isAllowedWhenPaused(): boolean;
|
|
18
19
|
process(): void;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Dictionary from "language/Dictionary";
|
|
12
|
+
import type Button from "ui/component/Button";
|
|
12
13
|
import type { IDropdownOption } from "ui/component/Dropdown";
|
|
13
14
|
import Dropdown from "ui/component/Dropdown";
|
|
14
15
|
export default class EnumDropdown<ENUM_OBJECT, OTHER_OPTIONS extends string | never = never, VALUES = ENUM_OBJECT[keyof ENUM_OBJECT]> extends Dropdown<VALUES | OTHER_OPTIONS> {
|
|
@@ -23,5 +24,5 @@ export default class EnumDropdown<ENUM_OBJECT, OTHER_OPTIONS extends string | ne
|
|
|
23
24
|
setExcluded(...excluded: VALUES[]): this;
|
|
24
25
|
protected getTranslation(id: VALUES): import("../../../language/impl/TranslationImpl").default;
|
|
25
26
|
protected filterEnum?(id: VALUES): boolean;
|
|
26
|
-
|
|
27
|
+
protected getOptions(enumObject: any): [VALUES, (option: Button) => Button][];
|
|
27
28
|
}
|
|
@@ -8,9 +8,10 @@
|
|
|
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
|
|
12
|
-
import
|
|
13
|
-
export default class PlayerDropdown
|
|
14
|
-
constructor(defaultOption: string
|
|
15
|
-
|
|
11
|
+
import type Button from "ui/component/Button";
|
|
12
|
+
import Dropdown from "ui/component/Dropdown";
|
|
13
|
+
export default class PlayerDropdown extends Dropdown<string> {
|
|
14
|
+
constructor(defaultOption: string);
|
|
15
|
+
get selectedPlayer(): import("../../../game/entity/player/Player").default | undefined;
|
|
16
|
+
protected getOptions(): [string, (option: Button) => Button][];
|
|
16
17
|
}
|
|
@@ -37,49 +37,50 @@ export declare enum LogSource {
|
|
|
37
37
|
ItemReference = 24,
|
|
38
38
|
ItemStylesheet = 25,
|
|
39
39
|
Languages = 26,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
40
|
+
Loading = 27,
|
|
41
|
+
LocalStorageDataStorage = 28,
|
|
42
|
+
MapGen = 29,
|
|
43
|
+
Matchmaking = 30,
|
|
44
|
+
MatchmakingServer = 31,
|
|
45
|
+
MemoryLeakDetector = 32,
|
|
46
|
+
Message = 33,
|
|
47
|
+
Mod = 34,
|
|
48
|
+
Mods = 35,
|
|
49
|
+
Multiplayer = 36,
|
|
50
|
+
NPC = 37,
|
|
51
|
+
NPCManager = 38,
|
|
52
|
+
OldUi = 39,
|
|
53
|
+
Packet = 40,
|
|
54
|
+
Player = 41,
|
|
55
|
+
PlayerManager = 42,
|
|
56
|
+
Prompts = 43,
|
|
57
|
+
Reflow = 44,
|
|
58
|
+
Renderer = 45,
|
|
59
|
+
ReplayManager = 46,
|
|
60
|
+
ResourceLoader = 47,
|
|
61
|
+
SaveManager = 48,
|
|
62
|
+
Serializer = 49,
|
|
63
|
+
Shaders = 50,
|
|
64
|
+
SoundEffect = 51,
|
|
65
|
+
SpritePack = 52,
|
|
66
|
+
SshCommandManager = 53,
|
|
67
|
+
SshServer = 54,
|
|
68
|
+
Steamworks = 55,
|
|
69
|
+
StringTokenizer = 56,
|
|
70
|
+
TemperatureManager = 57,
|
|
71
|
+
TileEventManager = 58,
|
|
72
|
+
TileUpdate = 59,
|
|
73
|
+
Timer = 60,
|
|
74
|
+
Trello = 61,
|
|
75
|
+
Ui = 62,
|
|
76
|
+
Utilities = 63,
|
|
77
|
+
WebAssembly = 64,
|
|
78
|
+
WebGlContext = 65,
|
|
79
|
+
WebRTCConnection = 66,
|
|
80
|
+
WebSocketConnection = 67,
|
|
81
|
+
World = 68,
|
|
82
|
+
WorldLayerRenderer = 69,
|
|
83
|
+
WorldRenderer = 70
|
|
83
84
|
}
|
|
84
85
|
export declare enum LogLineType {
|
|
85
86
|
Debug = 0,
|
|
@@ -132,7 +132,6 @@ export declare module RandomReference {
|
|
|
132
132
|
export declare function getRandom(randomInstance: RandomInstance, islandId?: IslandId): Random<SeededGenerator>;
|
|
133
133
|
export declare function createSeededRandom(seed?: number, addMultiplayerSyncChecks?: boolean): Random<SeededGenerator>;
|
|
134
134
|
export declare const mapGenRandom: Random<SeededGenerator>;
|
|
135
|
-
export declare const randomMilestoneModifiers: Random<SeededGenerator>;
|
|
136
135
|
export declare const generalRandom: Random<{
|
|
137
136
|
get: () => number;
|
|
138
137
|
}>;
|
|
@@ -8,4 +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
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch = 1, gameVersionName = "Horizons";
|
|
12
|
+
export declare const gameVersion: string;
|
|
11
13
|
export declare function registerGlobals(globalObject: any): void;
|
|
@@ -23,7 +23,7 @@ export default class ApplicationDom {
|
|
|
23
23
|
clickIfVisibleElement(selector: string): Promise<WebdriverIO.Element | undefined>;
|
|
24
24
|
getVisibleElements(selector: string): Promise<WebdriverIO.Element[] | undefined>;
|
|
25
25
|
getVisibleAndClickableElement(selector: string): Promise<WebdriverIO.Element | undefined>;
|
|
26
|
-
waitForVisibleThenClick(selector: string, timeout?: number, indent?: boolean): Promise<void>;
|
|
26
|
+
waitForVisibleThenClick(selector: string, timeout?: number, indent?: boolean, clickOnce?: boolean): Promise<void>;
|
|
27
27
|
waitForVisibleElements(selector: string, timeout?: number): Promise<WebdriverIO.Element[]>;
|
|
28
28
|
waitForNotVisible(selector: string, timeout?: number): Promise<void>;
|
|
29
29
|
waitUntil(executor: () => Promise<boolean>, options: webdriverio.WaitUntilOptions): Promise<true | void>;
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
import type { Stat } from "../../game/game/entity/IStats";
|
|
13
13
|
import { Direction } from "../../game/utilities/math/Direction";
|
|
14
14
|
import type { Random, SeededGenerator } from "../../game/utilities/random/Random";
|
|
15
|
-
import type { INewGameOptions } from "../interfaces";
|
|
16
|
-
import { GameMode } from "../interfaces";
|
|
15
|
+
import type { IDedicatedServerGameOptions, INewGameOptions } from "../interfaces";
|
|
17
16
|
import type { IslandId } from "../../game/game/island/IIsland";
|
|
18
17
|
import ApplicationDom from "./applicationDom";
|
|
19
18
|
import ApplicationLogger from "./applicationLogger";
|
|
@@ -26,12 +25,15 @@ export default class ApplicationInteractions {
|
|
|
26
25
|
private readonly savedStates;
|
|
27
26
|
constructor(additionalArgs: string[], random: Random<SeededGenerator>);
|
|
28
27
|
waitForInitialStartup(expectedInitialScreen: "title" | "mp_gameplay_modifiers"): Promise<void>;
|
|
29
|
-
waitUntilLoadingIsFinished(): Promise<void>;
|
|
30
|
-
playDedicatedServer(
|
|
28
|
+
waitUntilLoadingIsFinished(expectedMultiplayerMenu?: boolean): Promise<void>;
|
|
29
|
+
playDedicatedServer(options: IDedicatedServerGameOptions): Promise<void>;
|
|
31
30
|
playNewGame(options: INewGameOptions): Promise<void>;
|
|
31
|
+
private setupCommonOptions;
|
|
32
|
+
unlockMilestoneModifiers(): Promise<void>;
|
|
32
33
|
playImportedGame(savePath: string): Promise<void>;
|
|
33
34
|
playContinueGame(): Promise<void>;
|
|
34
35
|
quitGame(): Promise<void>;
|
|
36
|
+
clickOptions(): Promise<void>;
|
|
35
37
|
clickNewGame(): Promise<void>;
|
|
36
38
|
clickLoadGame(): Promise<void>;
|
|
37
39
|
clickConfirm(): Promise<void>;
|
|
@@ -41,7 +43,11 @@ export default class ApplicationInteractions {
|
|
|
41
43
|
clickJoinServer(): Promise<void>;
|
|
42
44
|
clickDailyChallenge(): Promise<void>;
|
|
43
45
|
clickBack(timeout?: number): Promise<void>;
|
|
44
|
-
clickButton(name: string,
|
|
46
|
+
clickButton(name: string, options?: Partial<{
|
|
47
|
+
force: boolean;
|
|
48
|
+
clickOnce: boolean;
|
|
49
|
+
timeout: number;
|
|
50
|
+
}>): Promise<void>;
|
|
45
51
|
clickYesIfVisible(): Promise<boolean>;
|
|
46
52
|
clickButtonIfVisible(name: string): Promise<boolean>;
|
|
47
53
|
clickUnpauseIconIfVisible(): Promise<void>;
|
|
@@ -71,13 +77,19 @@ export default class ApplicationInteractions {
|
|
|
71
77
|
saveStateAndVerifyWithPrevious(): Promise<void>;
|
|
72
78
|
clearSavedStates(): void;
|
|
73
79
|
waitUntilPauseMenuIsShown(): Promise<void>;
|
|
74
|
-
waitUntilGameIsLoaded(
|
|
80
|
+
waitUntilGameIsLoaded(options?: Partial<{
|
|
81
|
+
isJoiningServer: boolean;
|
|
82
|
+
isCreatingServer: boolean;
|
|
83
|
+
}>): Promise<void>;
|
|
75
84
|
isTitleScreenVisible(): Promise<WebdriverIO.Element[] | undefined>;
|
|
76
85
|
isButtonVisible(text: string): Promise<WebdriverIO.Element[] | undefined>;
|
|
77
86
|
isOverlayVisible(): Promise<WebdriverIO.Element[] | undefined>;
|
|
78
87
|
waitUntilTitleScreenIsVisible(): Promise<void>;
|
|
79
88
|
waitUntilGameEndMenuIsVisible(): Promise<void>;
|
|
80
|
-
waitForVisibleButtonThenClick(name: string,
|
|
89
|
+
waitForVisibleButtonThenClick(name: string, options?: Partial<{
|
|
90
|
+
clickOnce: boolean;
|
|
91
|
+
timeout: number;
|
|
92
|
+
}>): Promise<void>;
|
|
81
93
|
increaseStat(stat: Stat, value: number): Promise<void>;
|
|
82
94
|
randomInput(count: number): Promise<void>;
|
|
83
95
|
pressKey(key: string, modifier?: string): Promise<void>;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Player from "../../game/game/entity/player/Player";
|
|
12
12
|
import { Direction } from "../../game/utilities/math/Direction";
|
|
13
|
-
import type {
|
|
13
|
+
import type { INewGameOptions } from "../interfaces";
|
|
14
14
|
import type { IDifferences } from "../../game/utilities/object/JsonHelper";
|
|
15
15
|
import type Application from "./application";
|
|
16
16
|
import type { ITestState } from "./application";
|
|
@@ -62,7 +62,7 @@ export declare class Apps {
|
|
|
62
62
|
getLog(): string[];
|
|
63
63
|
compileDifferences(client: string | number, differences: IDifferences): string;
|
|
64
64
|
verifyGameStates(): Promise<void>;
|
|
65
|
-
createMultiplayerGame(
|
|
65
|
+
createMultiplayerGame(options: Omit<INewGameOptions, "playMode">): Promise<void>;
|
|
66
66
|
setClientJoinIsland(x: number, y: number): Promise<void>;
|
|
67
67
|
getServerGameCode(): Promise<string>;
|
|
68
68
|
joinServer(...apps: Application[]): Promise<void>;
|
|
@@ -8,12 +8,16 @@
|
|
|
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
|
-
export interface
|
|
11
|
+
export interface ICommonGameOptions {
|
|
12
12
|
gameMode: GameMode;
|
|
13
|
+
seed?: string | number;
|
|
14
|
+
enableAllMilestoneModifiers?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface INewGameOptions extends ICommonGameOptions {
|
|
13
17
|
playMode: GamePlayMode;
|
|
14
18
|
reuseCharacter?: boolean;
|
|
15
|
-
seed?: string | number;
|
|
16
19
|
}
|
|
20
|
+
export declare type IDedicatedServerGameOptions = ICommonGameOptions;
|
|
17
21
|
export declare enum GameMode {
|
|
18
22
|
Hardcore = "Hardcore Mode",
|
|
19
23
|
Casual = "Casual Mode",
|
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.11.1-beta.dev.
|
|
4
|
+
"version": "2.11.1-beta.dev.20211231.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"watch": "tsc --build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@types/fs-extra": "^9.0.13",
|
|
18
|
+
"@types/node": "^17.0.5",
|
|
17
19
|
"@wayward/goodstream": "0.7.1"
|
|
18
20
|
},
|
|
19
21
|
"devDependencies": {
|