@wayward/types 2.12.2-beta.dev.20221112.1 → 2.12.2-beta.dev.20221114.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.
@@ -11,6 +11,6 @@
11
11
  import type { IActionApi } from "game/entity/action/IAction";
12
12
  import { ActionType } from "game/entity/action/IAction";
13
13
  import type Human from "game/entity/Human";
14
- import type { ItemType } from "game/item/IItem";
14
+ import { ItemType } from "game/item/IItem";
15
15
  import Item from "game/item/Item";
16
16
  export default function consumeItemType(action: IActionApi<Human>, item: Item | ItemType, actionType?: ActionType): boolean;
@@ -75,36 +75,34 @@ export declare enum MultiplayerSyncCheck {
75
75
  LastCreationIds = 36,
76
76
  Merchant = 37,
77
77
  MilestoneSeed = 38,
78
- Misc = 39,
79
- Modifier = 40,
80
- MoveToTile = 41,
81
- Option = 42,
82
- PenaltyFieldHashCode = 43,
83
- PlaceOnTile = 44,
84
- PlayerManager = 45,
85
- PlayerPositions = 46,
86
- Players = 47,
87
- PlayerSetup = 48,
88
- Random = 49,
89
- Reputation = 50,
90
- Seed = 51,
91
- SeededGenerator = 52,
92
- SetPosition = 53,
93
- SetZ = 54,
94
- SkillGain = 55,
95
- StaminaChanges = 56,
96
- StatChange = 57,
97
- Stats = 58,
98
- StatusChange = 59,
99
- StatusEffect = 60,
100
- SyncChecks = 61,
101
- TemperatureManager = 62,
102
- Temporary = 63,
103
- Tick = 64,
104
- TileEvent = 65,
105
- Time = 66,
106
- UpdateDirection = 67,
107
- Weight = 68
78
+ Modifier = 39,
79
+ MoveToTile = 40,
80
+ Option = 41,
81
+ PenaltyFieldHashCode = 42,
82
+ PlaceOnTile = 43,
83
+ PlayerManager = 44,
84
+ PlayerPositions = 45,
85
+ Players = 46,
86
+ PlayerSetup = 47,
87
+ Random = 48,
88
+ Reputation = 49,
89
+ Seed = 50,
90
+ SeededGenerator = 51,
91
+ SetPosition = 52,
92
+ SetZ = 53,
93
+ SkillGain = 54,
94
+ StaminaChanges = 55,
95
+ StatChange = 56,
96
+ Stats = 57,
97
+ StatusChange = 58,
98
+ StatusEffect = 59,
99
+ TemperatureManager = 60,
100
+ Temporary = 61,
101
+ Tick = 62,
102
+ TileEvent = 63,
103
+ Time = 64,
104
+ UpdateDirection = 65,
105
+ Weight = 66
108
106
  }
109
107
  export declare const maxPlayers = 32;
110
108
  export declare const packetTickRate = 16;
@@ -156,7 +156,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
156
156
  checkConnection(): Promise<void>;
157
157
  isSyncCheckEnabled(syncCheck: MultiplayerSyncCheck): boolean;
158
158
  addSyncCheck(syncCheck: MultiplayerSyncCheck, value: any, addStackTrace?: boolean): void;
159
- addMiscSeedSyncCheck(island: Island, ...messages: any[]): void;
159
+ addSyncCheckWithSeed(island: Island, syncCheck: MultiplayerSyncCheck, ...messages: any[]): void;
160
160
  addBeforeSyncChecks(packet: IPacket): void;
161
161
  addAfterSyncChecks(packet: IPacket): void;
162
162
  sendChatMessage(sender: Player, message: string): void;
@@ -21,4 +21,4 @@ export interface ISshServerOptions {
21
21
  username: string;
22
22
  password?: string;
23
23
  }
24
- export declare function start(options: ISshServerOptions): void;
24
+ export declare function start(options: ISshServerOptions): Promise<void>;
@@ -8,6 +8,7 @@
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 { MultiplayerSyncCheck } from "multiplayer/IMultiplayer";
11
12
  import type { ConnectionState } from "multiplayer/networking/IConnection";
12
13
  export declare const reservedBytes = 5;
13
14
  export declare enum PacketType {
@@ -22,10 +23,14 @@ export interface ISynchronizationCheckData {
22
23
  beforeSyncChecksHash?: number;
23
24
  afterSyncChecksHash?: number;
24
25
  }
25
- export declare type ISyncCheck = Record<number, Array<number | string>>;
26
+ export interface ISyncCheck {
27
+ id: MultiplayerSyncCheck;
28
+ value: string | number;
29
+ }
30
+ export declare type SyncChecks = ISyncCheck[];
26
31
  export interface IHashedSyncCheck {
27
32
  hash: number;
28
- syncCheck: ISyncCheck;
33
+ syncCheck: SyncChecks;
29
34
  }
30
35
  export interface IPacket<T = any> {
31
36
  getAllowedStates(): ConnectionState;
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.2-beta.dev.20221112.1",
4
+ "version": "2.12.2-beta.dev.20221114.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",