@wayward/types 2.12.1-beta.dev.20221007.1 → 2.12.1-beta.dev.20221009.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.
@@ -13,7 +13,7 @@ import type { DoodadType, DoodadTypeGroup } from "game/doodad/IDoodad";
13
13
  import type { ActionType, IActionNotUsable } from "game/entity/action/IAction";
14
14
  import type Creature from "game/entity/creature/Creature";
15
15
  import type { Quality } from "game/IObject";
16
- import type { ItemType, ItemTypeGroup } from "game/item/IItem";
16
+ import type { IMoveToTileOptions, ItemType, ItemTypeGroup } from "game/item/IItem";
17
17
  import type Item from "game/item/Item";
18
18
  import type TileEvent from "game/tile/TileEvent";
19
19
  import type { Direction } from "utilities/math/Direction";
@@ -100,7 +100,7 @@ export interface IPlaceOnTileOptions {
100
100
  force?: boolean;
101
101
  skipMessage?: boolean;
102
102
  skipTileUpdate?: boolean;
103
- animate?: boolean;
103
+ animateMovement?: boolean | Partial<IMoveToTileOptions>;
104
104
  }
105
105
  export declare enum ContainerReferenceSource {
106
106
  ContainerWeightReduction = 0,
@@ -109,6 +109,11 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
109
109
  displayJoinServerRetryDialog(matchmakingInfo: IMatchmakingInfo, retryReason: JoinServerRetryReason): Promise<void>;
110
110
  disconnectAndResetGameState(reason: DisconnectReason.UnableToJoinGame, unableToJoinReason: UnableToJoinReason): Promise<void>;
111
111
  disconnectAndResetGameState(reason: DisconnectReason, reasonDescription?: any[]): Promise<void>;
112
+ /**
113
+ * Sanity checks for the state of multiplayer
114
+ * @returns True when the state is invalid
115
+ */
116
+ verifyState(): boolean;
112
117
  kick(player: Player, reason: DisconnectReason.Kick | DisconnectReason.Banned): void;
113
118
  onPlaying(): Promise<void>;
114
119
  onLobbyEntered(success: boolean, lobbyId: string): void;
@@ -85,5 +85,5 @@ export declare abstract class Connection implements IConnection {
85
85
  protected abstract onClosed(): void;
86
86
  abstract send(data: Uint8Array, byteOffset: number, length?: number): boolean;
87
87
  abstract processMatchmakingMessage(message: MatchmakingMessageData): Promise<boolean>;
88
- private _clearKeepAliveInterval;
88
+ protected _clearKeepAliveInterval(): void;
89
89
  }
@@ -30,6 +30,7 @@ export declare class SmartConnection extends Connection {
30
30
  private _steamNetworkConnection;
31
31
  private _webWorkerConnection;
32
32
  constructor(matchmakingInfo: IMatchmakingInfo, matchmakingIdentifier: string, webRTCConfig: RTCConfiguration, sendMatchmakingMessage: (message: MatchmakingMessageData) => void, onData: (data: ArrayBuffer) => void, onConnected: (matchmakingInfo: IMatchmakingInfo) => void, trySteamRelayNetwork: boolean, connectGlobalMatchmakingServer: () => void);
33
+ private get activeConnection();
33
34
  get isSteamNetworkConnection(): boolean;
34
35
  isConnected(): boolean;
35
36
  getState(): ConnectionState;
@@ -38,6 +39,8 @@ export declare class SmartConnection extends Connection {
38
39
  close(closeImmediately: boolean): void;
39
40
  protected onClosing(): void;
40
41
  protected onClosed(): void;
42
+ addKeepAliveTimeout(): void;
43
+ sendKeepAlive(): void;
41
44
  send(data: Uint8Array, byteOffset: number, length?: number): boolean;
42
45
  processMatchmakingMessage(message: MatchmakingMessageData): Promise<boolean>;
43
46
  private trySteamNetwork;
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.12.1-beta.dev.20221007.1",
4
+ "version": "2.12.1-beta.dev.20221009.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",