@wayward/types 2.11.3-beta.dev.20220114.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.
@@ -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
- verifyAndFixItem(): void;
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.
@@ -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",
@@ -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,6 +148,7 @@ 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;
151
153
  createOrExtendSteamNetworkConnectionWebRTCFallbackTimer(timeoutTime: number): void;
152
154
  clearSteamNetworkConnectionWebRTCFallbackTimer(): void;
@@ -166,7 +168,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
166
168
  private processOutgoingPackets;
167
169
  private processPacket;
168
170
  private synchronizationCheck;
169
- private desync;
171
+ private logSyncCheckErrors;
170
172
  private sendPacketInternal;
171
173
  private onStateChange;
172
174
  private convertToMatchmakingInfo;
@@ -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> {
@@ -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;
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.3-beta.dev.20220114.1",
4
+ "version": "2.11.3-beta.dev.20220115.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",