@wayward/types 2.11.2-beta.dev.20220111.1 → 2.11.3-beta.dev.20220115.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/game/entity/IHuman.d.ts +2 -2
- package/definitions/game/game/entity/player/Player.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +5 -1
- package/definitions/game/game/meta/Loading.d.ts +4 -0
- package/definitions/game/multiplayer/IMultiplayer.d.ts +3 -1
- package/definitions/game/multiplayer/Multiplayer.d.ts +4 -1
- package/definitions/game/multiplayer/networking/SteamNetworkConnection.d.ts +1 -1
- package/definitions/game/multiplayer/packets/IPacket.d.ts +2 -0
- package/definitions/game/ui/old/OldUi.d.ts +1 -3
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +5 -5
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +1 -2
- package/definitions/game/ui/screen/screens/game/dialog/BookDialog.d.ts +8 -2
- package/definitions/game/utilities/string/Strings.d.ts +1 -0
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/definitions/test/core/application.d.ts +1 -1
- package/definitions/test/core/chromeDriver.d.ts +1 -2
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import type Human from "game/entity/Human";
|
|
|
16
16
|
import type { AttackType } from "game/entity/IEntity";
|
|
17
17
|
import type { ISkillEvents } from "game/entity/skill/SkillManager";
|
|
18
18
|
import type { IHasImagePath, Quality } from "game/IObject";
|
|
19
|
-
import type {
|
|
19
|
+
import type { ItemType } from "game/item/IItem";
|
|
20
20
|
import { RecipeLevel } from "game/item/IItem";
|
|
21
21
|
import type Item from "game/item/Item";
|
|
22
22
|
import { TempType } from "game/temperature/ITemperature";
|
|
@@ -65,7 +65,7 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
|
65
65
|
* Called when a book is opened by a player
|
|
66
66
|
* @param book The book that was opened
|
|
67
67
|
*/
|
|
68
|
-
openBook?(
|
|
68
|
+
openBook?(item: Item): void;
|
|
69
69
|
/**
|
|
70
70
|
* Called when something is built on a tile
|
|
71
71
|
* @param item The item used to build the object
|
|
@@ -158,7 +158,7 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
158
158
|
onNoInput(): void;
|
|
159
159
|
updateTables(deferUpdate?: boolean): void;
|
|
160
160
|
updateCraftTable(adjacentContainers?: IContainer[]): void;
|
|
161
|
-
updateDismantleTable(adjacentContainers?: IContainer[]): void;
|
|
161
|
+
updateDismantleTable(adjacentContainers?: IContainer[], force?: boolean): void;
|
|
162
162
|
updateWeight(source: string): void;
|
|
163
163
|
updateTablesAndWeight(source: string, deferTableUpdates?: boolean): void;
|
|
164
164
|
checkReputationMilestones(): void;
|
|
@@ -150,7 +150,11 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
|
|
|
150
150
|
getDisassemblyWeight(): number;
|
|
151
151
|
getDisassemblyItems(): IItemDisassembleResult | undefined;
|
|
152
152
|
isNearby(executor: Entity, allowNearby?: boolean): boolean;
|
|
153
|
-
|
|
153
|
+
/**
|
|
154
|
+
* Fixes item issues.
|
|
155
|
+
* Note: Be careful with what gets fixed in multiplayer! (when onlyRestoreIslandIds is set)
|
|
156
|
+
*/
|
|
157
|
+
verifyAndFixItem(onlyRestoreIslandIds: boolean): void;
|
|
154
158
|
/**
|
|
155
159
|
* @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
|
|
156
160
|
* @param modifier The amount of damage to take. Defaults to 1.
|
|
@@ -168,5 +168,9 @@ declare module Loading {
|
|
|
168
168
|
*/
|
|
169
169
|
function waitForAll(): Promise<void>;
|
|
170
170
|
function progress(load: Load, progress: number): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Returns true if the load is running
|
|
173
|
+
*/
|
|
174
|
+
function exists(load: Load): boolean;
|
|
171
175
|
}
|
|
172
176
|
export default Loading;
|
|
@@ -26,6 +26,7 @@ export interface IMultiplayerEvents {
|
|
|
26
26
|
leaveLobby(lobbyId: string): any;
|
|
27
27
|
stateChange(): any;
|
|
28
28
|
checkConnection(webRtcWorks: boolean, webSocketWorks: boolean): any;
|
|
29
|
+
updatedOptions(options: IMultiplayerOptions): any;
|
|
29
30
|
}
|
|
30
31
|
export declare enum MultiplayerSyncCheckLevel {
|
|
31
32
|
None = "none",
|
|
@@ -141,7 +142,8 @@ export interface IMultiplayerNetworkingOptions {
|
|
|
141
142
|
connectionTimeout: number;
|
|
142
143
|
keepAliveInterval: number;
|
|
143
144
|
keepAliveTimeout: number;
|
|
144
|
-
|
|
145
|
+
steamNetworkingConnectionWebRTCFallbackInitialTimeout: number;
|
|
146
|
+
steamNetworkingConnectionWebRTCFallbackDownloadingTimeout: number;
|
|
145
147
|
}
|
|
146
148
|
export declare type ServerInfo = string | IMatchmakingInfo;
|
|
147
149
|
export declare enum PacketAcceptType {
|
|
@@ -53,6 +53,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
53
53
|
private _recentPackets;
|
|
54
54
|
private _enabledSyncChecks;
|
|
55
55
|
private _disconnectingFromSyncIssue;
|
|
56
|
+
private _reportedSyncHashMismatch;
|
|
56
57
|
private readonly _autojoinEnabled;
|
|
57
58
|
private _ipAddress;
|
|
58
59
|
private readonly _matchmakingSecret;
|
|
@@ -147,7 +148,9 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
147
148
|
sendChatMessage(sender: Player, message: string): void;
|
|
148
149
|
private addDefaultSyncChecks;
|
|
149
150
|
private getPacketSyncChecks;
|
|
151
|
+
private hashSyncCheckHash;
|
|
150
152
|
private clearJoinServerRetryTimeout;
|
|
153
|
+
createOrExtendSteamNetworkConnectionWebRTCFallbackTimer(timeoutTime: number): void;
|
|
151
154
|
clearSteamNetworkConnectionWebRTCFallbackTimer(): void;
|
|
152
155
|
private startMatchmakingServer;
|
|
153
156
|
private stopMatchmakingServer;
|
|
@@ -165,7 +168,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
165
168
|
private processOutgoingPackets;
|
|
166
169
|
private processPacket;
|
|
167
170
|
private synchronizationCheck;
|
|
168
|
-
private
|
|
171
|
+
private logSyncCheckErrors;
|
|
169
172
|
private sendPacketInternal;
|
|
170
173
|
private onStateChange;
|
|
171
174
|
private convertToMatchmakingInfo;
|
|
@@ -18,7 +18,7 @@ export declare class SteamNetworkConnection extends Connection {
|
|
|
18
18
|
private readonly onConnected?;
|
|
19
19
|
private readonly connectGlobalMatchmakingServer?;
|
|
20
20
|
name: string;
|
|
21
|
-
readonly maxMessageSize =
|
|
21
|
+
readonly maxMessageSize = 65536;
|
|
22
22
|
private _processIntervalId;
|
|
23
23
|
private _checkSessionStateIntervalId;
|
|
24
24
|
constructor(steamNetworking: ISteamworksNetworking, hostSteamId: string, matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, onData: (data: ArrayBuffer) => void, onConnected?: ((matchmakingInfo: IMatchmakingInfo) => void) | undefined, connectGlobalMatchmakingServer?: (() => void) | undefined);
|
|
@@ -19,6 +19,8 @@ export interface ISynchronizationCheckData {
|
|
|
19
19
|
packetNumber?: number;
|
|
20
20
|
beforeSyncChecks?: ISyncCheck;
|
|
21
21
|
afterSyncChecks?: ISyncCheck;
|
|
22
|
+
beforeSyncChecksHash?: number;
|
|
23
|
+
afterSyncChecksHash?: number;
|
|
22
24
|
}
|
|
23
25
|
export declare type ISyncCheck = Record<number, Array<number | string>>;
|
|
24
26
|
export interface IPacket<T = any> {
|
|
@@ -39,9 +39,8 @@ export default class OldUi {
|
|
|
39
39
|
isOptionsOverlayEnabled(): boolean;
|
|
40
40
|
tooltipRefresh(): void;
|
|
41
41
|
updateCraftingDialog(craftableItemTypes: ItemType[], nonCraftableItemTypes: ItemType[]): void;
|
|
42
|
-
updateDismantleTab(dismantleItems: IDismantleComponent): void;
|
|
42
|
+
updateDismantleTab(dismantleItems: IDismantleComponent, force?: boolean): void;
|
|
43
43
|
filterContainers(): void;
|
|
44
|
-
invalidateTableTargets(): void;
|
|
45
44
|
getInventoryItemOrder(): any[];
|
|
46
45
|
updateItem(item: Item, updateChildren?: boolean): void;
|
|
47
46
|
syncDecayBar(item: Item, syncDamage?: boolean): void;
|
|
@@ -69,7 +68,6 @@ export default class OldUi {
|
|
|
69
68
|
addItemToContainer(item: Item, container: IContainer, internal?: boolean, isAddingMultipleItems?: boolean, updateTables?: boolean): void;
|
|
70
69
|
afterAddingMultipleItemsToContainer(container: IContainer): void;
|
|
71
70
|
removeItemFromContainer(item: Item, container: IContainer): void;
|
|
72
|
-
updateInventorySort(): void;
|
|
73
71
|
getDialogInfo(dialogId: DialogId): IDialogInfo;
|
|
74
72
|
setVersionExtra(msg: string): void;
|
|
75
73
|
openDialogs(): void;
|
|
@@ -89,6 +89,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
89
89
|
private lastGlobalMouseInfo;
|
|
90
90
|
private craftableItemTypes;
|
|
91
91
|
private nonCraftableItemTypes;
|
|
92
|
+
private dismantleItems;
|
|
92
93
|
private craftingDialogDirty;
|
|
93
94
|
constructor();
|
|
94
95
|
selector(): string;
|
|
@@ -142,7 +143,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
142
143
|
refreshQuickSlots(): void;
|
|
143
144
|
getInventoryItemsInOrder(): any[];
|
|
144
145
|
loadQuickSlots(): void;
|
|
145
|
-
saveItemOrder(containerElement: JQuery): void;
|
|
146
|
+
saveItemOrder(containerElement: JQuery, activeSort?: boolean): void;
|
|
146
147
|
showItemContextMenu(element: JQuery, skipSound?: boolean): void;
|
|
147
148
|
onContextMenuAction(element: JQuery, action: IContextMenuAction, toElement?: JQuery): void;
|
|
148
149
|
runContextMenuItemAction(itemId: number, action: IContextMenuAction, skipSound?: boolean, usedFromQuickSlot?: boolean, itemTypeBypass?: ItemType): boolean;
|
|
@@ -174,7 +175,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
174
175
|
setEquipSlot(equip: EquipType, itemId?: number, internal?: boolean): void;
|
|
175
176
|
removeItemFromEquipSlot(equip: EquipType): void;
|
|
176
177
|
updateCraftingDialog(craftableItemTypes: ItemType[], nonCraftableItemTypes: ItemType[]): void;
|
|
177
|
-
updateDismantleTab(dismantleItems: IDismantleComponent): void;
|
|
178
|
+
updateDismantleTab(dismantleItems: IDismantleComponent, force?: boolean): void;
|
|
178
179
|
createCraftItemElements(containerSortInfo: IContainerSortInfo): void;
|
|
179
180
|
updateItem(item: Item, updateChildren?: boolean): void;
|
|
180
181
|
onGlobalMouseMove(mouseInfo: GlobalMouseInfo, _: Vector2): void;
|
|
@@ -218,13 +219,12 @@ export default class InGameScreen extends BaseScreen {
|
|
|
218
219
|
*/
|
|
219
220
|
filterContainers(): void;
|
|
220
221
|
/**
|
|
221
|
-
* Invalidates and updates mouse targets when crafting/dismantle
|
|
222
|
+
* Invalidates and updates mouse targets when mouse is inside crafting/dismantle containers
|
|
222
223
|
*/
|
|
223
224
|
invalidateTableTargets(): void;
|
|
224
225
|
showSortContextMenu(element: JQuery, container: JQuery, messageType: Message): void;
|
|
225
226
|
getContainerId(containerElement: JQuery): string;
|
|
226
|
-
sortItems(containerElement: JQuery, sortType: SortType, messageType?: Message, canReverse?: boolean): void;
|
|
227
|
-
updateInventorySort(): void;
|
|
227
|
+
sortItems(containerElement: JQuery, sortType: SortType, messageType?: Message, canReverse?: boolean, activeSort?: boolean): void;
|
|
228
228
|
onUpdateContainer(containerElement: JQuery, activeSort: boolean): void;
|
|
229
229
|
updateSort(containerElement: JQuery, activeSort: boolean): void;
|
|
230
230
|
isContainerDialogOver(x: number, y: number): boolean;
|
|
@@ -13,7 +13,6 @@ import type Player from "game/entity/player/Player";
|
|
|
13
13
|
import type { Game } from "game/Game";
|
|
14
14
|
import { TickFlag } from "game/IGame";
|
|
15
15
|
import type Island from "game/island/Island";
|
|
16
|
-
import type { BookType } from "game/item/IItem";
|
|
17
16
|
import type Item from "game/item/Item";
|
|
18
17
|
import DrawnMap from "game/mapping/DrawnMap";
|
|
19
18
|
import Component from "ui/component/Component";
|
|
@@ -74,7 +73,7 @@ export default class GameScreen extends Screen {
|
|
|
74
73
|
*/
|
|
75
74
|
private refreshRespawnButton;
|
|
76
75
|
onExploreAsGhost(): void;
|
|
77
|
-
onOpenBook(human: Human,
|
|
76
|
+
onOpenBook(human: Human, item: Item): void;
|
|
78
77
|
protected onReadMap1(map: DrawnMap, item: Item, reader: Human): void;
|
|
79
78
|
protected onSailOffMapEdge(player: Player, direction: Direction): void;
|
|
80
79
|
protected onDie(player: Player, showingGameEndScreen: boolean): void;
|
|
@@ -8,13 +8,19 @@
|
|
|
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
|
|
11
|
+
import type Player from "game/entity/player/Player";
|
|
12
|
+
import type Item from "game/item/Item";
|
|
12
13
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
13
14
|
export default class BookDialog extends Dialog {
|
|
15
|
+
private item?;
|
|
14
16
|
private book?;
|
|
15
17
|
private readonly text;
|
|
16
18
|
constructor();
|
|
17
19
|
getName(): import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/dictionary/UiTranslation").default | import("../../../../../language/impl/TranslationImpl").default | Iterable<import("../../../../../utilities/string/Interpolator").IStringSection> | undefined;
|
|
18
|
-
|
|
20
|
+
openBook(item: Item): void;
|
|
19
21
|
private getText;
|
|
22
|
+
protected onInventoryItemRemove(_: any, item: Item): void;
|
|
23
|
+
protected onInventoryItemUpdate(_: any, item: Item): void;
|
|
24
|
+
protected onPostMove(player: Player): void;
|
|
25
|
+
private closeIfItemIsGone;
|
|
20
26
|
}
|
|
@@ -36,6 +36,7 @@ declare class Strings {
|
|
|
36
36
|
* Returns a new object with key-value pairs matching the pairs in the given object, but with the case style of the keys changed.
|
|
37
37
|
*/
|
|
38
38
|
formatKeyCase<R = any>(obj: any, caseStyle: CaseStyle): R;
|
|
39
|
+
hashCode(str: string): number;
|
|
39
40
|
protected onAcquire(d: any, req: IRequireFunction): Promise<void>;
|
|
40
41
|
}
|
|
41
42
|
declare const _default: Strings;
|
|
@@ -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
|
-
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch =
|
|
11
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch = 3, gameVersionName = "Horizons";
|
|
12
12
|
export declare const gameVersion: string;
|
|
13
13
|
export declare function registerGlobals(globalObject: any): void;
|
|
@@ -47,7 +47,6 @@ export default class Application extends ApplicationInteractions {
|
|
|
47
47
|
readonly basePath: string;
|
|
48
48
|
readonly userDataDirectory: string;
|
|
49
49
|
private readonly chromeDriver;
|
|
50
|
-
private readonly remoteOptions;
|
|
51
50
|
manager: Apps;
|
|
52
51
|
private screenshotPath;
|
|
53
52
|
private heapSnapshotPath;
|
|
@@ -66,4 +65,5 @@ export default class Application extends ApplicationInteractions {
|
|
|
66
65
|
requestHeapSnapshot(heapSnapshotPath: string): void;
|
|
67
66
|
requestVideo(videoPath: string): void;
|
|
68
67
|
private recordVideoFrame;
|
|
68
|
+
private configureDirectories;
|
|
69
69
|
}
|
|
@@ -13,10 +13,9 @@ export default class ChromeDriver {
|
|
|
13
13
|
private readonly safeTestTile;
|
|
14
14
|
private readonly appId;
|
|
15
15
|
private readonly logger;
|
|
16
|
-
readonly port: number;
|
|
17
16
|
private process;
|
|
18
17
|
private exitHandler;
|
|
19
18
|
constructor(safeTestTile: string, appId: string, logger: ApplicationLogger);
|
|
20
|
-
start(): Promise<
|
|
19
|
+
start(): Promise<number>;
|
|
21
20
|
stop(): void;
|
|
22
21
|
}
|
package/package.json
CHANGED