@wayward/types 2.11.3-beta.dev.20220117.1 → 2.11.3-beta.dev.20220123.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/cplusplus/index.d.ts +1 -0
- package/definitions/game/game/Game.d.ts +1 -9
- package/definitions/game/game/entity/player/Player.d.ts +1 -2
- package/definitions/game/game/inspection/infoProviders/doodad/IDurability.d.ts +4 -4
- package/definitions/game/game/item/ItemManager.d.ts +5 -3
- package/definitions/game/game/temperature/TemperatureManager.d.ts +0 -1
- package/definitions/game/multiplayer/IMultiplayer.d.ts +1 -1
- package/definitions/game/multiplayer/Multiplayer.d.ts +14 -4
- package/definitions/game/multiplayer/packets/IPacket.d.ts +6 -2
- package/definitions/game/multiplayer/packets/server/DesyncPacket.d.ts +6 -0
- package/definitions/game/multiplayer/packets/{shared → server}/UpdateMovementIntentPacket.d.ts +2 -2
- package/definitions/game/multiplayer/packets/{server → shared}/LogsPacket.d.ts +4 -3
- package/definitions/game/renderer/fieldOfView/FieldOfView.d.ts +4 -0
- package/package.json +1 -1
|
@@ -79,6 +79,7 @@ export interface IWorldLayerCPP {
|
|
|
79
79
|
}
|
|
80
80
|
export interface IDijkstraMap {
|
|
81
81
|
getNode(x: number, y: number): INavigationNode;
|
|
82
|
+
updateNode(x: number, y: number, penalty: number, disabled: boolean): void;
|
|
82
83
|
updateOrigin(origin: INavigationNode): void;
|
|
83
84
|
findPath(end: INavigationNode): {
|
|
84
85
|
success: boolean;
|
|
@@ -13,7 +13,7 @@ import EventEmitter from "event/EventEmitter";
|
|
|
13
13
|
import type Entity from "game/entity/Entity";
|
|
14
14
|
import type { Defense } from "game/entity/IEntity";
|
|
15
15
|
import { DamageType } from "game/entity/IEntity";
|
|
16
|
-
import { Delay
|
|
16
|
+
import { Delay } from "game/entity/IHuman";
|
|
17
17
|
import type { TurnType } from "game/entity/player/IPlayer";
|
|
18
18
|
import type Player from "game/entity/player/Player";
|
|
19
19
|
import type { IGameEvents, IPlayOptions, ISynchronizeState } from "game/IGame";
|
|
@@ -115,14 +115,6 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
115
115
|
updateGameUpdates(gameOptions: IGameOptions): void;
|
|
116
116
|
initializeGameOptions(seed: string | number, mode?: GameMode, options?: IGameOptions, milestoneModifiers?: Set<Milestone>): void;
|
|
117
117
|
initializeModifiers(): void;
|
|
118
|
-
getReputation(): number;
|
|
119
|
-
getMalignity(): number;
|
|
120
|
-
getBenignity(): number;
|
|
121
|
-
getMaxHealth(): number;
|
|
122
|
-
getMaxWeight(): number;
|
|
123
|
-
getTactics(): number;
|
|
124
|
-
getSkillPercent(skill: SkillType): number;
|
|
125
|
-
getPlayerAverage(calc: (player: Player) => number | undefined, round?: boolean): number;
|
|
126
118
|
getMovementFinishTime(delay?: Delay | number): number;
|
|
127
119
|
getMovementProgress(timeStamp: number, finishTime: number | undefined, delay?: Delay | number): number;
|
|
128
120
|
getAnimationProgress(timeStamp: number, finishTime: number | undefined, delay: Delay | number): number;
|
|
@@ -16,7 +16,7 @@ import { CreatureType } from "game/entity/creature/ICreature";
|
|
|
16
16
|
import Human from "game/entity/Human";
|
|
17
17
|
import { EntityType, IStatChangeInfo, StatusEffectChangeReason, StatusType } from "game/entity/IEntity";
|
|
18
18
|
import type { ICheckUnderOptions, IRestData } from "game/entity/IHuman";
|
|
19
|
-
import { EquipType, RestCancelReason,
|
|
19
|
+
import { EquipType, RestCancelReason, SkillType } from "game/entity/IHuman";
|
|
20
20
|
import type { IStat } from "game/entity/IStats";
|
|
21
21
|
import { Stat } from "game/entity/IStats";
|
|
22
22
|
import type { ILoadOnIslandOptions, IMovementIntent, IPlayerEvents, IWalkPath } from "game/entity/player/IPlayer";
|
|
@@ -102,7 +102,6 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
102
102
|
setStatus(status: StatusType, hasStatus: boolean, reason: StatusEffectChangeReason): void;
|
|
103
103
|
startResting(restData: IRestData): void;
|
|
104
104
|
cancelResting(reason: RestCancelReason): boolean;
|
|
105
|
-
showRestInterrupt(restType: RestType): void;
|
|
106
105
|
/**
|
|
107
106
|
* Updates caused by status effects such as bleeding, poison, and burns.
|
|
108
107
|
*/
|
|
@@ -76,6 +76,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
76
76
|
private static cachedWeights;
|
|
77
77
|
private static cachedDefaultItemForGroup;
|
|
78
78
|
private static cachedBestItemForTier;
|
|
79
|
+
private static cachedHighestItemActionTierForAction;
|
|
79
80
|
private static cachedItemGroups;
|
|
80
81
|
private static cachedItemsThatAreAcceptedAsOffer;
|
|
81
82
|
private static cachedItemsThatAreUsedInRecipes;
|
|
@@ -85,6 +86,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
85
86
|
static getItemTypes(): readonly ItemType[];
|
|
86
87
|
static getItemsWithRecipes(): readonly ItemType[];
|
|
87
88
|
static getBestItemForTier(item: ItemType | ItemTypeGroup): ItemType | undefined;
|
|
89
|
+
static getHighestItemActionTierForAction(action: ActionType): number | undefined;
|
|
88
90
|
static isItemAcceptedAsOffer(item: ItemType): boolean | undefined;
|
|
89
91
|
static isItemUsedInRecipe(item: ItemType): boolean | undefined;
|
|
90
92
|
static isGroup(item: ItemType | ItemTypeGroup): item is ItemTypeGroup;
|
|
@@ -188,13 +190,13 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
188
190
|
*/
|
|
189
191
|
getBestSafeItemInContainerByUse(container: IContainer, action: ActionType, allowProtectedItems?: boolean, actionMayDamageItem?: boolean, consumable?: boolean): Item | undefined;
|
|
190
192
|
getItemInContainer(container: IContainer, itemTypeSearch: ItemType, ignoreItem?: Item, allowProtectedItems?: boolean): Item | undefined;
|
|
191
|
-
getItemForHuman(human: Human, search: ItemType | ItemTypeGroup, allowProtectedItems?: boolean): Item | undefined;
|
|
192
|
-
getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup,
|
|
193
|
+
getItemForHuman(human: Human, search: ItemType | ItemTypeGroup, ignoreItem?: Item, allowProtectedItems?: boolean): Item | undefined;
|
|
194
|
+
getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup, ignoreItem?: Item, allowProtectedItems?: boolean): Item | undefined;
|
|
193
195
|
getItemInAdjacentContainersByGroup(position: IVector3, itemTypeGroupSearch: ItemTypeGroup): Item | undefined;
|
|
194
196
|
getItemsInContainer(container: IContainer, includeSubContainers?: boolean, allowProtectedItems?: boolean): Item[];
|
|
195
197
|
getItemsInContainerByType(container: IContainer, itemType: ItemType, includeSubContainers?: boolean, filterText?: string): Item[];
|
|
196
198
|
getItemsInContainerByGroup(container: IContainer, itemGroup: ItemTypeGroup, includeSubContainers?: boolean): Item[];
|
|
197
|
-
getItemInInventoryByGroup(human: Human, itemTypeGroupSearch: ItemTypeGroup,
|
|
199
|
+
getItemInInventoryByGroup(human: Human, itemTypeGroupSearch: ItemTypeGroup, ignoreItem?: Item): Item | undefined;
|
|
198
200
|
isItemInContainer(container: IContainer, itemTypeSearch: ItemType, ignoreItem?: Item): boolean;
|
|
199
201
|
isContainableInContainer(containable: IContainable, container: IContainer): boolean;
|
|
200
202
|
getAdjacentContainers(humanOrPosition: Human | IVector3, includeNpcs?: boolean, ignoreOptions?: boolean): IContainer[];
|
|
@@ -36,7 +36,6 @@ export default class TemperatureManager extends EventEmitter.Host<ITempManagerEv
|
|
|
36
36
|
private readonly scheduledContainerInvalidations;
|
|
37
37
|
private readonly cacheCalculated;
|
|
38
38
|
private readonly cacheProduced;
|
|
39
|
-
private processingScheduledUpdates;
|
|
40
39
|
constructor(island: Island);
|
|
41
40
|
delete(): void;
|
|
42
41
|
preSerializeObject(): void;
|
|
@@ -134,8 +134,8 @@ export interface IMultiplayerNetworkingOptions {
|
|
|
134
134
|
enableWebRtcConnections: boolean;
|
|
135
135
|
enablePacketNumberChecks: boolean;
|
|
136
136
|
logPackets: boolean;
|
|
137
|
-
logSyncChecks: boolean;
|
|
138
137
|
recentPacketTracking: number;
|
|
138
|
+
recentHashedSyncCheckTracking: number;
|
|
139
139
|
joinServerTimeout: number;
|
|
140
140
|
steamNetworkTimeout: number;
|
|
141
141
|
webRtcTimeout: number;
|
|
@@ -16,6 +16,7 @@ import { DisconnectReason, JoinServerRetryReason, MultiplayerSyncCheck, UnableTo
|
|
|
16
16
|
import type { IMatchmakingInfo } from "multiplayer/matchmaking/IMatchmaking";
|
|
17
17
|
import type { IConnection } from "multiplayer/networking/IConnection";
|
|
18
18
|
import type { IPacket } from "multiplayer/packets/IPacket";
|
|
19
|
+
import DesyncPacket from "multiplayer/packets/server/DesyncPacket";
|
|
19
20
|
export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
20
21
|
/**
|
|
21
22
|
* Static steam account id when steam support is on
|
|
@@ -47,11 +48,12 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
47
48
|
private _currentPacketProcessing;
|
|
48
49
|
private _currentSyncPacketsWaiting;
|
|
49
50
|
private _currentSyncPacketsProcessing;
|
|
50
|
-
private _syncCheckStack;
|
|
51
51
|
private _activeSyncCheck;
|
|
52
|
-
private _syncChecksSuppressed;
|
|
53
|
-
private _recentPackets;
|
|
54
52
|
private _enabledSyncChecks;
|
|
53
|
+
private readonly _recentHashedSyncChecks;
|
|
54
|
+
private _recentPackets;
|
|
55
|
+
private _syncChecksSuppressed;
|
|
56
|
+
private _syncCheckStack;
|
|
55
57
|
private _disconnectingFromSyncIssue;
|
|
56
58
|
private _reportedSyncHashMismatch;
|
|
57
59
|
private readonly _autojoinEnabled;
|
|
@@ -140,14 +142,20 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
140
142
|
addKeepAliveTimeouts(): void;
|
|
141
143
|
updateGlobalServerDirectory(): void;
|
|
142
144
|
checkConnection(): Promise<void>;
|
|
143
|
-
isSyncCheckEnabled(syncCheck: MultiplayerSyncCheck
|
|
145
|
+
isSyncCheckEnabled(syncCheck: MultiplayerSyncCheck): boolean;
|
|
144
146
|
addSyncCheck(syncCheck: MultiplayerSyncCheck, value: any, addStackTrace?: boolean): void;
|
|
145
147
|
addMiscSeedSyncCheck(island: Island, ...messages: any[]): void;
|
|
146
148
|
addBeforeSyncChecks(packet: IPacket): void;
|
|
147
149
|
addAfterSyncChecks(packet: IPacket): void;
|
|
148
150
|
sendChatMessage(sender: Player, message: string): void;
|
|
149
151
|
private addDefaultSyncChecks;
|
|
152
|
+
/**
|
|
153
|
+
* Returns sync check hashes
|
|
154
|
+
* @returns [all sync checks hash, enabled sync checks hash]
|
|
155
|
+
*/
|
|
150
156
|
private getPacketSyncChecks;
|
|
157
|
+
private recordHashedSyncCheck;
|
|
158
|
+
private filterEnabledSyncChecks;
|
|
151
159
|
private hashSyncCheckHash;
|
|
152
160
|
private clearJoinServerRetryTimeout;
|
|
153
161
|
createOrExtendSteamNetworkConnectionWebRTCFallbackTimer(timeoutTime: number): void;
|
|
@@ -169,6 +177,8 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
169
177
|
private processPacket;
|
|
170
178
|
private synchronizationCheck;
|
|
171
179
|
private logSyncCheckErrors;
|
|
180
|
+
private sendDesyncPacket;
|
|
181
|
+
processDesyncPacket(connection: IConnection, desyncPacket: DesyncPacket): void;
|
|
172
182
|
private sendPacketInternal;
|
|
173
183
|
private onStateChange;
|
|
174
184
|
private convertToMatchmakingInfo;
|
|
@@ -17,12 +17,16 @@ export declare enum PacketType {
|
|
|
17
17
|
}
|
|
18
18
|
export interface ISynchronizationCheckData {
|
|
19
19
|
packetNumber?: number;
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
beforeEnabledSyncChecksHash?: number;
|
|
21
|
+
afterEnabledSyncChecksHash?: number;
|
|
22
22
|
beforeSyncChecksHash?: number;
|
|
23
23
|
afterSyncChecksHash?: number;
|
|
24
24
|
}
|
|
25
25
|
export declare type ISyncCheck = Record<number, Array<number | string>>;
|
|
26
|
+
export interface IHashedSyncCheck {
|
|
27
|
+
hash: number;
|
|
28
|
+
syncCheck: ISyncCheck;
|
|
29
|
+
}
|
|
26
30
|
export interface IPacket<T = any> {
|
|
27
31
|
getAllowedStates(): ConnectionState;
|
|
28
32
|
getArrayBuffer(id?: number): ArrayBuffer;
|
|
@@ -8,11 +8,17 @@
|
|
|
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 { IHashedSyncCheck } from "multiplayer/packets/IPacket";
|
|
11
12
|
import ServerPacket from "multiplayer/packets/ServerPacket";
|
|
12
13
|
/**
|
|
13
14
|
* The player sends this to the server when they have desynced
|
|
14
15
|
*/
|
|
15
16
|
export default class DesyncPacket extends ServerPacket {
|
|
17
|
+
packetId: number;
|
|
18
|
+
packetDebugInfo: string;
|
|
19
|
+
hashedSyncCheck: IHashedSyncCheck;
|
|
20
|
+
checkBefore: boolean;
|
|
21
|
+
shouldDisconnect: boolean;
|
|
16
22
|
logs: string;
|
|
17
23
|
getDebugInfo(): string;
|
|
18
24
|
isSyncCheckEnabled(): boolean;
|
package/definitions/game/multiplayer/packets/{shared → server}/UpdateMovementIntentPacket.d.ts
RENAMED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { IMovementIntent } from "game/entity/player/IPlayer";
|
|
12
|
-
import
|
|
13
|
-
export default class UpdateMovementIntentPacket extends
|
|
12
|
+
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
13
|
+
export default class UpdateMovementIntentPacket extends PlayerTargetedServerPacket {
|
|
14
14
|
intent: IMovementIntent;
|
|
15
15
|
getDebugInfo(): string;
|
|
16
16
|
isAllowedWhenPaused(): boolean;
|
|
@@ -8,10 +8,11 @@
|
|
|
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
|
|
12
|
-
|
|
11
|
+
import PlayerTargetedSharedPacket from "multiplayer/packets/PlayerTargetedSharedPacket";
|
|
12
|
+
import { LogLineType } from "utilities/Log";
|
|
13
|
+
export default class LogsPacket extends PlayerTargetedSharedPacket {
|
|
13
14
|
logs: string;
|
|
14
|
-
|
|
15
|
+
logType: LogLineType;
|
|
15
16
|
getDebugInfo(): string;
|
|
16
17
|
isSyncCheckEnabled(): boolean;
|
|
17
18
|
isAllowedWhenPaused(): boolean;
|
|
@@ -59,6 +59,10 @@ export default class FieldOfView extends EventEmitter.Host<IFieldOfViewEvents> {
|
|
|
59
59
|
*/
|
|
60
60
|
static updateExplored(fieldOfView: FieldOfView | undefined, updateForGhosts?: boolean): void;
|
|
61
61
|
private static processExploredMapBounds;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the field of view radius based on either the field of view object, player, or the default value
|
|
64
|
+
*/
|
|
65
|
+
private static getRadius;
|
|
62
66
|
/**
|
|
63
67
|
* Marks a set of tiles as exploreed
|
|
64
68
|
*/
|
package/package.json
CHANGED