@wayward/types 2.11.6-beta.dev.20220420.1 → 2.11.6-beta.dev.20220428.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.
@@ -80,7 +80,6 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
80
80
  previousSaveVersion: IVersionInfo;
81
81
  saveSize?: string;
82
82
  canvas: HTMLCanvasElement | undefined;
83
- private queueDedicatedServerFovUpdate?;
84
83
  private gameOptionsCached?;
85
84
  private synchronizeStateId;
86
85
  protected stringTokenizer: StringTokenizer | undefined;
@@ -35,7 +35,7 @@ import { Milestone } from "game/milestones/IMilestone";
35
35
  import type { IGameOptionsPlayer } from "game/options/IGameOptions";
36
36
  import Message from "language/dictionary/Message";
37
37
  import type ExploreMap from "renderer/exploreMap/ExploreMap";
38
- import FieldOfView from "renderer/fieldOfView/FieldOfView";
38
+ import type FieldOfView from "renderer/fieldOfView/FieldOfView";
39
39
  import type { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
40
40
  import type IClientStore from "save/clientStore/IClientStore";
41
41
  import type { IOptions } from "save/data/ISaveDataGlobal";
@@ -172,7 +172,6 @@ export default class Player extends Human implements IUnserializedCallback {
172
172
  isMultiplayerHost(): boolean;
173
173
  getName(): import("../../../language/impl/TranslationImpl").default;
174
174
  canSeePosition(type: CanASeeBType, islandId: IslandId, x: number, y: number, z: number, fieldOfView?: FieldOfView, customRadius?: number): boolean;
175
- markAsExplored(points: IVector2[]): boolean | undefined;
176
175
  updateQuickSlotInfo(quickSlot: number, itemType?: ItemType, action?: IContextMenuAction, contextActionSlot?: number, contextActionType?: ActionType, canUseProtected?: boolean): void;
177
176
  updateDialogInfo(dialogIndex: string | number): void;
178
177
  getDialogInfo(dialogIndex: string | number): IDialogInfo;
@@ -9,7 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import EventEmitter from "event/EventEmitter";
12
- import type { IPromptDescriptionBase, Prompt, PromptDescriptionArgs, PromptResult } from "game/meta/prompt/IPrompt";
12
+ import { Prompt } from "game/meta/prompt/IPrompt";
13
+ import type { IPromptDescriptionBase, PromptDescriptionArgs, PromptResult } from "game/meta/prompt/IPrompt";
13
14
  import type { PromptArgs, PromptDescriptionOf } from "game/meta/prompt/PromptDescriptions";
14
15
  export interface IPrompt<PROMPT extends IPromptDescriptionBase<any[]>> extends PromiseLike<PromptResult<PROMPT>> {
15
16
  type?: Prompt;
@@ -149,6 +149,7 @@ export interface IMultiplayerNetworkingOptions {
149
149
  keepAliveTimeout: number;
150
150
  steamNetworkingConnectionWebRTCFallbackInitialTimeout: number;
151
151
  steamNetworkingConnectionWebRTCFallbackDownloadingTimeout: number;
152
+ webSocketConnectionMaxMessageSize: number;
152
153
  }
153
154
  export declare type ServerInfo = string | IMatchmakingInfo;
154
155
  export declare enum PacketAcceptType {
@@ -15,7 +15,7 @@ export declare class WebSocketConnection extends Connection {
15
15
  private readonly onData;
16
16
  private readonly onConnected?;
17
17
  name: string;
18
- readonly maxMessageSize = 524288;
18
+ get maxMessageSize(): number;
19
19
  constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, getMatchmaking: () => IMatchmaking | undefined, onData: (data: ArrayBuffer) => void, onConnected?: ((matchmakingInfo: IMatchmakingInfo) => void) | undefined);
20
20
  isConnected(): boolean;
21
21
  protected onClosing(): void;
@@ -56,6 +56,8 @@ export default abstract class BasePacket {
56
56
  protected writeBool(value: boolean): void;
57
57
  protected readUint8Array(): Uint8Array;
58
58
  protected writeUint8Array(value: Uint8Array): void;
59
+ protected readUint16Array(): Uint16Array;
60
+ protected writeUint16Array(value: Uint16Array): void;
59
61
  protected readUint32NumberArray(): number[];
60
62
  protected writeUint32NumberArray(value: number[]): void;
61
63
  protected readString(): string;
@@ -46,13 +46,14 @@ export declare enum NetworkPropertyType {
46
46
  Uint8 = 2,
47
47
  Uint8Array = 3,
48
48
  Uint16 = 4,
49
- Float64 = 5,
50
- Uint32NumberArray = 6,
51
- String = 7,
52
- Generic = 8,
53
- Item = 9,
54
- MovementIntent = 10,
55
- Vector2Array = 11
49
+ Uint16Array = 5,
50
+ Float64 = 6,
51
+ Uint32NumberArray = 7,
52
+ String = 8,
53
+ Generic = 9,
54
+ Item = 10,
55
+ MovementIntent = 11,
56
+ Vector2Array = 12
56
57
  }
57
58
  export interface INetworkedProperty {
58
59
  key: string;
@@ -38,6 +38,8 @@ export default abstract class IndexedPacket extends BasePacket {
38
38
  protected writeIndexedBool(value?: boolean): void;
39
39
  protected readIndexedUint8Array(): Uint8Array | undefined;
40
40
  protected writeIndexedUint8Array(value?: Uint8Array): void;
41
+ protected readIndexedUint16Array(): Uint16Array | undefined;
42
+ protected writeIndexedUint16Array(value?: Uint16Array): void;
41
43
  protected readIndexedUint32NumberArray(): number[] | undefined;
42
44
  protected writeIndexedUint32NumberArray(value?: number[]): void;
43
45
  protected readIndexedString(): string | undefined;
@@ -8,10 +8,13 @@
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 PlayerTargetedSharedPacket from "multiplayer/packets/PlayerTargetedSharedPacket";
12
- import type { IVector2 } from "utilities/math/IVector";
13
- export default class MarkAsExploredPacket extends PlayerTargetedSharedPacket {
14
- points: IVector2[];
11
+ import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
12
+ /**
13
+ * Tells the server to mark points as explored
14
+ */
15
+ export default class MarkAsExploredPacket extends PlayerTargetedServerPacket {
16
+ points: Uint16Array;
17
+ z: number;
15
18
  getDebugInfo(): string;
16
19
  isSyncCheckEnabled(): boolean;
17
20
  process(): void;
@@ -55,10 +55,10 @@ export default class FieldOfView extends EventEmitter.Host<IFieldOfViewEvents> {
55
55
  static getBounds(origin: IVector3, radius: number): IBound3;
56
56
  /**
57
57
  * Updates the explored tiles around players
58
- * @param fieldOfView Field of view object. Provided when this is being called clientside
58
+ * @param fieldOfView Field of view object
59
59
  * @param updateForGhosts Update field of ghosts too
60
60
  */
61
- static updateExplored(fieldOfView: FieldOfView | undefined, updateForGhosts?: boolean): void;
61
+ static updateExplored(fieldOfView: FieldOfView, updateForGhosts?: boolean): void;
62
62
  private static processExploredMapBounds;
63
63
  /**
64
64
  * Gets the field of view radius based on either the field of view object, player, or the default value
@@ -14,6 +14,7 @@ import type { IMessage } from "game/entity/player/IMessageManager";
14
14
  import type Player from "game/entity/player/Player";
15
15
  import type { RequirementInstance } from "game/entity/player/quest/quest/Quest";
16
16
  import type { QuestInstance } from "game/entity/player/quest/QuestManager";
17
+ import type { Game } from "game/Game";
17
18
  import Button from "ui/component/Button";
18
19
  import Component from "ui/component/Component";
19
20
  import type { ContextMenuDescriptions } from "ui/component/ContextMenu";
@@ -70,6 +71,7 @@ export default class Messages extends QuadrantComponent {
70
71
  sendPinnedMessage(pinnedMessage: PinnedMessage): PinnedMessage;
71
72
  pinQuestRequirement(quest: QuestInstance, requirement?: RequirementInstance): IPinnedMessage | undefined;
72
73
  unpinMessage(pinnedMessage: PinnedMessage, time?: number): Promise<void>;
74
+ protected onPlay(game: Game, isLoadingSave: boolean): void;
73
75
  onDisplayMessage(player: Player, message: IMessage): void;
74
76
  onWrittenNote(player: Player, id: number): void;
75
77
  onReadNote(player: Player, id: number): void;
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.6-beta.dev.20220420.1",
4
+ "version": "2.11.6-beta.dev.20220428.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",