@wayward/types 2.13.3-beta.dev.20230630.1 → 2.13.3-beta.dev.20230701.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/game/game/entity/player/PlayerManager.d.ts +5 -0
- package/definitions/game/multiplayer/Multiplayer.d.ts +4 -0
- package/definitions/game/multiplayer/matchmaking/IMatchmaking.d.ts +8 -0
- package/definitions/game/multiplayer/networking/Connection.d.ts +1 -0
- package/definitions/game/multiplayer/networking/IConnection.d.ts +1 -0
- package/definitions/game/save/clientStore/IClientStore.d.ts +4 -1
- package/definitions/game/save/clientStore/clientData/MultiplayerClientData.d.ts +13 -0
- package/definitions/matchmakingserver/globalMatchmaking.d.ts +0 -1
- package/definitions/matchmakingserver/shared.d.ts +1 -0
- package/package.json +1 -1
|
@@ -83,4 +83,9 @@ export default class PlayerManager extends EventEmitter.Host<IPlayerManagerEvent
|
|
|
83
83
|
* Finds the first available player id in the array
|
|
84
84
|
*/
|
|
85
85
|
private findAvailablePlayerId;
|
|
86
|
+
/**
|
|
87
|
+
* Clears the existing client secret for the player
|
|
88
|
+
* @param playerIdentifier Player identifier
|
|
89
|
+
*/
|
|
90
|
+
clearClientSecret(playerIdentifier: string): void;
|
|
86
91
|
}
|
|
@@ -24,6 +24,10 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
24
24
|
* Otherwise it will be a random guid that persists
|
|
25
25
|
*/
|
|
26
26
|
private _playerIdentifier;
|
|
27
|
+
/**
|
|
28
|
+
* A secret string that's stored in localStorage that helps authorize players to servers.
|
|
29
|
+
*/
|
|
30
|
+
private readonly _clientSecret;
|
|
27
31
|
/**
|
|
28
32
|
* Steam id - used for steam networking
|
|
29
33
|
*/
|
|
@@ -62,10 +62,18 @@ export interface IMatchmakingIpAddressMessageData extends IMatchmakingMessageDat
|
|
|
62
62
|
}
|
|
63
63
|
export interface IMatchmakingJoinChannelMessageData extends IMatchmakingMessageData {
|
|
64
64
|
type: MatchmakingMessageDataType.JoinChannel;
|
|
65
|
+
targetMatchmakingIdentifier: string;
|
|
65
66
|
clientVersion: string;
|
|
66
67
|
clientBuild: number | undefined;
|
|
67
68
|
playerIdentifier: string;
|
|
68
69
|
playerSteamId: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Used by clients to authenticate ownership of their player
|
|
72
|
+
*/
|
|
73
|
+
clientSecret: string;
|
|
74
|
+
/**
|
|
75
|
+
* Used by hosts to authenticate ownership of a server/matchmaking channel
|
|
76
|
+
*/
|
|
69
77
|
secret?: string;
|
|
70
78
|
}
|
|
71
79
|
export interface IMatchmakingIceCandidateMessageData extends IMatchmakingMessageData {
|
|
@@ -19,6 +19,7 @@ export declare abstract class Connection implements IConnection {
|
|
|
19
19
|
playerIdentifier: string | undefined;
|
|
20
20
|
playerSteamId: string | undefined;
|
|
21
21
|
matchmakingIdentifier: string;
|
|
22
|
+
clientSecret: string;
|
|
22
23
|
pid?: number;
|
|
23
24
|
buffer?: Uint8Array;
|
|
24
25
|
bufferOffset?: number;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type ExploredMapClientData from "save/clientStore/clientData/ExploredMap";
|
|
12
|
+
import type MultiplayerClientData from "save/clientStore/clientData/MultiplayerClientData";
|
|
12
13
|
import type UiData from "save/clientStore/clientData/UiData";
|
|
13
14
|
export interface IClientStore {
|
|
14
15
|
get<T extends ClientDataType>(type: T): ClientDataMap<T>;
|
|
@@ -16,10 +17,12 @@ export interface IClientStore {
|
|
|
16
17
|
export default IClientStore;
|
|
17
18
|
export declare enum ClientDataType {
|
|
18
19
|
ExploredMap = 0,
|
|
19
|
-
Ui = 1
|
|
20
|
+
Ui = 1,
|
|
21
|
+
Multiplayer = 2
|
|
20
22
|
}
|
|
21
23
|
export interface IClientData {
|
|
22
24
|
[ClientDataType.ExploredMap]: ExploredMapClientData;
|
|
23
25
|
[ClientDataType.Ui]: UiData;
|
|
26
|
+
[ClientDataType.Multiplayer]: MultiplayerClientData;
|
|
24
27
|
}
|
|
25
28
|
export type ClientDataMap<T extends ClientDataType> = IClientData[T];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2023 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
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
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
export default class MultiplayerClientData {
|
|
12
|
+
clientSecret: string | undefined;
|
|
13
|
+
}
|
package/package.json
CHANGED