@wayward/types 2.15.2-beta.dev.20251205.1 → 2.15.2-beta.dev.20251207.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/IGame.d.ts +9 -2
- package/definitions/game/game/entity/action/actions/Apply.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Chop.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/CloseContainer.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/CloseDoor.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Cure.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Dismount.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/DrinkItem.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Eat.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/EquipFromArmorStand.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Heal.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Hitch.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Melee.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Mine.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/OpenContainer.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/OpenDoor.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/PackGround.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/PlaceDown.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/PropOpenDoor.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/ProtectItem.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Ride.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/SetCreatureAiAll.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Sleep.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/TakeFromArmorStand.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Throw.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Till.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Unhitch.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/UnprotectItem.d.ts +1 -1
- package/definitions/game/mod/Mod.d.ts +48 -10
- package/definitions/game/mod/ModRegistry.d.ts +2 -2
- package/definitions/game/multiplayer/IMultiplayer.d.ts +7 -2
- package/definitions/game/multiplayer/Multiplayer.d.ts +8 -3
- package/definitions/game/multiplayer/matchmaking/IMatchmaking.d.ts +2 -0
- package/definitions/game/multiplayer/networking/SmartConnection.d.ts +2 -1
- package/definitions/game/multiplayer/networking/SteamNetworkConnection.d.ts +2 -1
- package/definitions/game/multiplayer/networking/WebRTCConnection.d.ts +4 -1
- package/definitions/game/multiplayer/networking/WebSocketConnection.d.ts +2 -1
- package/definitions/game/multiplayer/networking/WebWorkerConnection.d.ts +2 -1
- package/definitions/game/save/data/SaveDataGlobal.d.ts +0 -1
- package/definitions/game/ui/screen/screens/menu/menus/JoinServerChooseModifiersMenu.d.ts +2 -2
- package/definitions/utilities/prototype/Define.d.ts +4 -2
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ import type Version from "@wayward/utilities/Version";
|
|
|
33
33
|
import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
|
|
34
34
|
import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
|
|
35
35
|
import type { IRange } from "@wayward/utilities/math/Range";
|
|
36
|
+
import type Screen from "@wayward/game/ui/screen/Screen";
|
|
36
37
|
export interface IGameEvents {
|
|
37
38
|
/**
|
|
38
39
|
* Called when the game is starting
|
|
@@ -168,6 +169,12 @@ export type IGameOld = Partial<Game> & Partial<{
|
|
|
168
169
|
time: TimeManager;
|
|
169
170
|
wellData: Record<number, IWell | undefined>;
|
|
170
171
|
}>;
|
|
172
|
+
export interface IMultiplayerServerToJoin {
|
|
173
|
+
serverInfo: ServerInfo;
|
|
174
|
+
screen: Screen | undefined;
|
|
175
|
+
callback?: MultiplayerServerJoinCallback;
|
|
176
|
+
}
|
|
177
|
+
export type MultiplayerServerJoinCallback = (character: ICharacter | undefined, milestoneModifiers: Set<Milestone> | undefined) => void;
|
|
171
178
|
export interface IPlayOptions {
|
|
172
179
|
slot: number | undefined;
|
|
173
180
|
name: string;
|
|
@@ -175,9 +182,9 @@ export interface IPlayOptions {
|
|
|
175
182
|
difficulty: GameMode;
|
|
176
183
|
difficultyOptions?: IGameOptions;
|
|
177
184
|
milestoneModifiers: Set<Milestone>;
|
|
178
|
-
character
|
|
185
|
+
character?: ICharacter;
|
|
179
186
|
multiplayer: IMultiplayerOptions | boolean | undefined;
|
|
180
|
-
multiplayerServerToJoin:
|
|
187
|
+
multiplayerServerToJoin: IMultiplayerServerToJoin;
|
|
181
188
|
turnMode: TurnMode;
|
|
182
189
|
realTimeTickSpeed: number;
|
|
183
190
|
customMilestoneModifiersAllowed: boolean;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], ActionType.Apply, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Tile]], ActionType.Chop, import("../../../doodad/Doodad").default | import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Container, import("@wayward/game/game/entity/action/IAction").ActionArgument.NPCNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], ActionType.CloseContainer, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleContainer").IToggleContainerCanUse, [(import("../../npc/NPC").default | import("../../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], ActionType.CloseDoor, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, boolean, import("@wayward/game/game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../../doodad/Doodad").default | undefined)?, (boolean | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], ActionType.Cure, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], ActionType.DismountVehicle, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../../doodad/Doodad").default | import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], ActionType.DrinkItem, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], ActionType.Eat, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], ActionType.EquipFromArmorStand, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, boolean, import("@wayward/game/game/entity/action/actions/SwapWithArmorStand").ISwapEquipment, [(import("../../../doodad/Doodad").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], ActionType.Heal, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[], ActionType.Hitch, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], [import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<import("../../IEntity").AttackType, "MeleeWeapon" | "HandToHand" | "RangedWeapon" | "ThrowItem">], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], ActionType.Melee, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Attack").IAttackCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../IEntity").AttackType | undefined)?, (import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Tile]], ActionType.Mine, import("../../../doodad/Doodad").default | import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Gather").IGatherCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../tile/Tile").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Container, import("@wayward/game/game/entity/action/IAction").ActionArgument.NPCNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], ActionType.OpenContainer, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleContainer").IToggleContainerCanUse, [(import("../../npc/NPC").default | import("../../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], ActionType.OpenDoor, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, boolean, import("@wayward/game/game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../../doodad/Doodad").default | undefined)?, (boolean | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], ActionType.PackGround, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleTilled").ITillCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Tile]], ActionType.PlaceDown, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Build").IBuildCanUse, [import("../../../item/Item").default, (import("../../../tile/Tile").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], ActionType.PropOpenDoor, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, boolean, import("@wayward/game/game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../../doodad/Doodad").default | undefined)?, (boolean | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean], ActionType.ProtectItem, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [import("../../../item/Item").default, boolean]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], ActionType.Ride, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../../doodad/Doodad").default | import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
12
|
import { AiType } from "@wayward/game/game/entity/ai/AI";
|
|
13
|
-
declare const _default: import("
|
|
13
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Creature], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("../argument/ActionArgumentEnum").default<AiType, "None" | "Attack" | "Idle" | "Neutral" | "Scared" | "Hostile" | "Fearless" | "HostileFearless" | "Alerted" | "Waiting" | "Hidden" | "Pacified" | "CanSwapWith" | "CanSwapLayers" | "FollowClose" | "FollowFar" | "Stay" | "AttackAdjacent" | "AttackInSight" | "Defend" | "Heel">], ActionType.SetCreatureAiAll, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/SetCreatureAi").ISetCreatureAiCanUse, [import("../../creature/Creature").default | undefined, import("../../../item/Item").default | undefined, AiType]>;
|
|
14
14
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby], [import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<import("../../IHuman").RestType, "Resting" | "Sleeping">]], ActionType.Sleep, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Rest").IRestCanUse, [(import("../../../doodad/Doodad").default | import("../../../item/Item").default | undefined)?, (import("../../IHuman").RestType | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.DoodadNearby]], ActionType.TakeFromArmorStand, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, boolean, import("@wayward/game/game/entity/action/actions/SwapWithArmorStand").ISwapEquipment, [(import("../../../doodad/Doodad").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], [import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("../argument/ActionArgumentEnum").default<import("../../IEntity").AttackType, "MeleeWeapon" | "HandToHand" | "RangedWeapon" | "ThrowItem">], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], ActionType.Throw, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/Attack").IAttackCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../IEntity").AttackType | undefined)?, (import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], ActionType.Till, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleTilled").ITillCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[], ActionType.Unhitch, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
13
13
|
export default _default;
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
-
declare const _default: import("
|
|
12
|
+
declare const _default: import("@wayward/game/game/entity/action/Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean], ActionType.UnProtectItem, import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player, unknown>, void, import("@wayward/game/game/entity/action/IAction").IActionUsable, [import("../../../item/Item").default, boolean]>;
|
|
13
13
|
export default _default;
|
|
@@ -9,10 +9,18 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import "@wayward/game/IGlobal";
|
|
12
|
+
import type { ActionArguments, ActionArgumentTupleTypes, ActionType, IActionUsable } from "@wayward/game/game/entity/action/IAction";
|
|
13
|
+
import type Entity from "@wayward/game/game/entity/Entity";
|
|
14
|
+
import type { IPromptDescriptionBase } from "@wayward/game/game/meta/prompt/IPrompt";
|
|
15
|
+
import type { ModRegistrationTime } from "@wayward/game/mod/BaseMod";
|
|
12
16
|
import BaseMod from "@wayward/game/mod/BaseMod";
|
|
17
|
+
import type InterModRegistry from "@wayward/game/mod/InterModRegistry";
|
|
13
18
|
import type { ModInformation } from "@wayward/game/mod/ModInformation";
|
|
19
|
+
import type { IOverrideDescription, PromptConstructorFunction } from "@wayward/game/mod/ModRegistry";
|
|
20
|
+
import Register from "@wayward/game/mod/ModRegistry";
|
|
14
21
|
import Log from "@wayward/utilities/Log";
|
|
15
22
|
declare abstract class Mod extends BaseMod {
|
|
23
|
+
constructor(mod: ModInformation);
|
|
16
24
|
/**
|
|
17
25
|
* Called when the mod is initialized (when it's enabled via the Mod Manager)
|
|
18
26
|
*/
|
|
@@ -35,43 +43,72 @@ declare abstract class Mod extends BaseMod {
|
|
|
35
43
|
*/
|
|
36
44
|
onUnload(): void;
|
|
37
45
|
}
|
|
46
|
+
type RegisterKeys = keyof Omit<typeof Register, ("registry" | "bulk")>;
|
|
47
|
+
declare module "@wayward/game/game/entity/action/Action" {
|
|
48
|
+
interface Action<A extends ActionArguments, T extends ActionType = ActionType, E extends Entity = Entity, R = void, CU extends IActionUsable = IActionUsable, AV extends any[] = ActionArgumentTupleTypes<A>> {
|
|
49
|
+
modRegistration(name: string): this;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
38
52
|
declare namespace Mod {
|
|
53
|
+
type RegisterHelper = {
|
|
54
|
+
[K in keyof typeof Register as K extends RegisterKeys ? K : never]: ({
|
|
55
|
+
prompt<DESCRIPTION extends IPromptDescriptionBase<any[]>>(name: string, construct: PromptConstructorFunction<DESCRIPTION>): Registration<DESCRIPTION>;
|
|
56
|
+
interModRegistry<T>(name: string): Registration<InterModRegistry<T>>;
|
|
57
|
+
override<OBJECT extends object, PROPERTY extends keyof OBJECT>(time: ModRegistrationTime.Initialize | ModRegistrationTime.Load, overrider: () => IOverrideDescription<OBJECT, PROPERTY>): OBJECT;
|
|
58
|
+
} extends infer OVERRIDES ? K extends keyof OVERRIDES ? OVERRIDES[K] : (ReturnType<typeof Register[K]> extends <K extends string | number | symbol>(target: Record<K, infer V>, key: K) => void ? V : never) extends infer T ? (Parameters<typeof Register[K]> extends [string, ...infer PARAMS] ? {
|
|
59
|
+
(name: string): PartialRegistration<T, PARAMS>;
|
|
60
|
+
(...params: Parameters<typeof Register[K]>): Registration<T>;
|
|
61
|
+
} : {
|
|
62
|
+
(...params: Parameters<typeof Register[K]>): Registration<T>;
|
|
63
|
+
}) : never : never);
|
|
64
|
+
};
|
|
65
|
+
export interface Registration<T> {
|
|
66
|
+
value: T;
|
|
67
|
+
}
|
|
68
|
+
export interface PartialRegistration<T, PARAMS extends any[]> extends Registration<T> {
|
|
69
|
+
define(...params: PARAMS): void;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Create registrations for your mod. This must be called in the top-level scope of your mod script — ie,
|
|
73
|
+
* do not call this in your mod class when reacting to events or injections, that kind of thing.
|
|
74
|
+
*/
|
|
75
|
+
export const register: RegisterHelper;
|
|
39
76
|
/**
|
|
40
77
|
* Injects the decorated field with this mod's instance.
|
|
41
78
|
*/
|
|
42
|
-
function instance<M extends Mod>(): <K extends string | number | symbol, T extends Record<K, M extends (new (index: number) => infer I) ? I : Mod>>(target: T, key: K) => void;
|
|
79
|
+
export function instance<M extends Mod>(): <K extends string | number | symbol, T extends Record<K, M extends (new (index: number) => infer I) ? I : Mod>>(target: T, key: K) => void;
|
|
43
80
|
/**
|
|
44
81
|
* Injects the decorated field with a mod instance.
|
|
45
82
|
* @param name Given a mod name, the decorated field will be injected with the enabled/loaded instance of the mod by that name.
|
|
46
83
|
*/
|
|
47
|
-
function instance<M extends Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends (new (index: number) => infer I) ? I : Mod>>(target: T, key: K) => void;
|
|
84
|
+
export function instance<M extends Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends (new (index: number) => infer I) ? I : Mod>>(target: T, key: K) => void;
|
|
48
85
|
/**
|
|
49
86
|
* A function usable exclusively in the *top level* of a mod script, or within synchronous code called by the top level of the mod script.
|
|
50
87
|
* Returns a container for the mod's instance, its `ModInformation`, or `undefined` if it can't be found or this is used in the wrong context.
|
|
51
88
|
*/
|
|
52
|
-
function get<M extends Mod>(): ModInformation & {
|
|
89
|
+
export function get<M extends Mod>(): ModInformation & {
|
|
53
90
|
instance: M;
|
|
54
91
|
} | undefined;
|
|
55
92
|
/**
|
|
56
93
|
* Given a mod name, returns a container (its `ModInformation`) for the enabled/loaded instance of the mod by that name,
|
|
57
94
|
* or `undefined` if it can't be found.
|
|
58
95
|
*/
|
|
59
|
-
function get<M extends Mod>(name: string): ModInformation & {
|
|
96
|
+
export function get<M extends Mod>(name: string): ModInformation & {
|
|
60
97
|
instance: M;
|
|
61
98
|
} | undefined;
|
|
62
99
|
/**
|
|
63
100
|
* Injects the decorated field with this mod's log.
|
|
64
101
|
*/
|
|
65
|
-
function log(): <K extends string | number | symbol, T extends Record<K, Log>>(target: T, key: K) => void;
|
|
102
|
+
export function log(): <K extends string | number | symbol, T extends Record<K, Log>>(target: T, key: K) => void;
|
|
66
103
|
/**
|
|
67
104
|
* Injects the decorated field with a mod's log.
|
|
68
105
|
* @param name Given a mod name, the decorated field will be injected with the log of the enabled/loaded mod by that name.
|
|
69
106
|
*/
|
|
70
|
-
function log(name?: string): <K extends string | number | symbol, T extends Record<K, Log>>(target: T, key: K) => void;
|
|
107
|
+
export function log(name?: string): <K extends string | number | symbol, T extends Record<K, Log>>(target: T, key: K) => void;
|
|
71
108
|
/**
|
|
72
109
|
* Injects the save data for this mod.
|
|
73
110
|
*/
|
|
74
|
-
function saveData<M extends Mod = Mod>(): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
111
|
+
export function saveData<M extends Mod = Mod>(): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
75
112
|
initializeSaveData(data?: infer D): infer D;
|
|
76
113
|
} ? D : never>>(target: T, key: K) => void;
|
|
77
114
|
/**
|
|
@@ -79,13 +116,13 @@ declare namespace Mod {
|
|
|
79
116
|
* @param name Given a mod name, the decorated field will be injected with save data from the enabled/loaded instance of
|
|
80
117
|
* the mod by that name.
|
|
81
118
|
*/
|
|
82
|
-
function saveData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
119
|
+
export function saveData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
83
120
|
initializeSaveData(data?: infer D): infer D;
|
|
84
121
|
} ? D : never>>(target: T, key: K) => void;
|
|
85
122
|
/**
|
|
86
123
|
* Injects the global data for this mod.
|
|
87
124
|
*/
|
|
88
|
-
function globalData<M extends Mod = Mod>(): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
125
|
+
export function globalData<M extends Mod = Mod>(): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
89
126
|
initializeGlobalData(data?: infer D): infer D;
|
|
90
127
|
} ? D : never>>(target: T, key: K) => void;
|
|
91
128
|
/**
|
|
@@ -93,8 +130,9 @@ declare namespace Mod {
|
|
|
93
130
|
* @param name Given a mod name, the decorated field will be injected with global data from the enabled/loaded instance of
|
|
94
131
|
* the mod by that name.
|
|
95
132
|
*/
|
|
96
|
-
function globalData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
133
|
+
export function globalData<M extends Mod = Mod>(name: string): <K extends string | number | symbol, T extends Record<K, M extends {
|
|
97
134
|
initializeGlobalData(data?: infer D): infer D;
|
|
98
135
|
} ? D : never>>(target: T, key: K) => void;
|
|
136
|
+
export {};
|
|
99
137
|
}
|
|
100
138
|
export default Mod;
|
|
@@ -912,10 +912,10 @@ export declare namespace Registry {
|
|
|
912
912
|
* Used internally for `Registry<H, T>.get(key)`
|
|
913
913
|
*/
|
|
914
914
|
class Registered implements Objects.ICloneable {
|
|
915
|
-
readonly mod?: string;
|
|
915
|
+
readonly mod?: string | ModInformation;
|
|
916
916
|
readonly type: RegistryRegisteredIntermediateType;
|
|
917
917
|
readonly path: PropertyKey[];
|
|
918
|
-
constructor(modName: string | undefined, type: RegistryRegisteredIntermediateType, ...path: PropertyKey[]);
|
|
918
|
+
constructor(modName: string | ModInformation | undefined, type: RegistryRegisteredIntermediateType, ...path: PropertyKey[]);
|
|
919
919
|
mask<T>(): T;
|
|
920
920
|
/**
|
|
921
921
|
* An getter for a registration ID in the given `IRegistry`.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { ICharacter } from "@wayward/game/game/entity/IHuman";
|
|
12
12
|
import type { PlayerState } from "@wayward/game/game/entity/player/IPlayer";
|
|
13
13
|
import type Player from "@wayward/game/game/entity/player/Player";
|
|
14
|
-
import type { ISynchronizeState, PauseSource } from "@wayward/game/game/IGame";
|
|
14
|
+
import type { IMultiplayerServerToJoin, ISynchronizeState, PauseSource } from "@wayward/game/game/IGame";
|
|
15
15
|
import { TurnMode } from "@wayward/game/game/IGame";
|
|
16
16
|
import type { Load } from "@wayward/game/game/meta/Loading";
|
|
17
17
|
import type { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
@@ -223,9 +223,9 @@ export declare enum JoinServerRetryReason {
|
|
|
223
223
|
WebRTCTimeout = 4
|
|
224
224
|
}
|
|
225
225
|
export interface IJoinServerOptions {
|
|
226
|
+
multiplayerServerToJoin: IMultiplayerServerToJoin;
|
|
226
227
|
character: ICharacter;
|
|
227
228
|
milestoneModifiers: Set<Milestone>;
|
|
228
|
-
retryMatchmakingInfo: IMatchmakingInfo;
|
|
229
229
|
automaticallyRetry: boolean;
|
|
230
230
|
enableSteamNetworkConnections: boolean;
|
|
231
231
|
}
|
|
@@ -242,3 +242,8 @@ export interface IMultiplayerRunSafelyOptions {
|
|
|
242
242
|
hostInitiatesHide?: boolean;
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
+
export interface IMultiplayerOnConnected {
|
|
246
|
+
matchmakingInfo: IMatchmakingInfo;
|
|
247
|
+
hasExistingPlayerInGame: boolean;
|
|
248
|
+
customMilestoneModifiersAllowed: boolean;
|
|
249
|
+
}
|
|
@@ -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 { IMultiplayerServerToJoin } from "@wayward/game/game/IGame";
|
|
11
12
|
import Player from "@wayward/game/game/entity/player/Player";
|
|
12
13
|
import type Island from "@wayward/game/game/island/Island";
|
|
13
14
|
import type { IJoinServerOptions, IMultiplayerEvents, IMultiplayerOptions, IMultiplayerRunSafelyOptions, PacketTarget, ServerInfo } from "@wayward/game/multiplayer/IMultiplayer";
|
|
@@ -39,7 +40,6 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
39
40
|
private readonly _steamIdToClientMapping;
|
|
40
41
|
private _joinServerTimeoutId;
|
|
41
42
|
private _steamNetworkConnectionWebRTCFallbackTimeoutId;
|
|
42
|
-
private _joinedMatchmakingInfo;
|
|
43
43
|
private _connectedMatchmakingInfo;
|
|
44
44
|
private _globalMatchmaking;
|
|
45
45
|
private _globalMatchmakingRetryTimeoutId;
|
|
@@ -99,7 +99,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
99
99
|
getBannedPlayers(): string[];
|
|
100
100
|
setBanned(identifier: string, ban: boolean): boolean;
|
|
101
101
|
createServer(serverInfo: ServerInfo): void;
|
|
102
|
-
joinServer(
|
|
102
|
+
joinServer(serverToJoin: IMultiplayerServerToJoin, options?: Partial<IJoinServerOptions>): Promise<void>;
|
|
103
103
|
rejoinServer(options?: {
|
|
104
104
|
randomizeIdentifier?: boolean;
|
|
105
105
|
automaticallyRetry?: boolean;
|
|
@@ -112,7 +112,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
112
112
|
* @returns True when it disconnected. False is there was nothing to disconnect
|
|
113
113
|
*/
|
|
114
114
|
disconnect(reason: DisconnectReason, args?: any[], unloadingOrResetGameState?: boolean): Promise<boolean>;
|
|
115
|
-
displayJoinServerRetryDialog(matchmakingInfo: IMatchmakingInfo, retryReason: JoinServerRetryReason): Promise<void>;
|
|
115
|
+
displayJoinServerRetryDialog(matchmakingInfo: IMatchmakingInfo | undefined, retryReason: JoinServerRetryReason): Promise<void>;
|
|
116
116
|
disconnectAndResetGameState(reason: DisconnectReason.UnableToJoinGame, unableToJoinReason: UnableToJoinReason): Promise<void>;
|
|
117
117
|
disconnectAndResetGameState(reason: DisconnectReason, reasonDescription?: any[]): Promise<void>;
|
|
118
118
|
/**
|
|
@@ -196,7 +196,12 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
196
196
|
private connectDedicatedMatchmakingServer;
|
|
197
197
|
private disconnectDedicatedMatchmakingServer;
|
|
198
198
|
private onMatchmakingMessage;
|
|
199
|
+
/**
|
|
200
|
+
* Called when a multiplayer connection is established to a server.
|
|
201
|
+
* This is only called on the client side.
|
|
202
|
+
*/
|
|
199
203
|
private _onConnected;
|
|
204
|
+
private _sendConnectPacket;
|
|
200
205
|
private onConnectionData;
|
|
201
206
|
private serverPacketTick;
|
|
202
207
|
private clientPacketTick;
|
|
@@ -90,6 +90,8 @@ export interface IMatchmakingHostIpAddressMessageData extends IMatchmakingMessag
|
|
|
90
90
|
}
|
|
91
91
|
export interface IMatchmakingConnectedMessageData extends IMatchmakingMessageData {
|
|
92
92
|
type: MatchmakingMessageDataType.Connected;
|
|
93
|
+
hasExistingPlayerInGame: boolean;
|
|
94
|
+
customMilestoneModifiersAllowed: boolean;
|
|
93
95
|
}
|
|
94
96
|
export interface IMatchmakingUnableToJoinGameMessageData extends IMatchmakingMessageData {
|
|
95
97
|
type: MatchmakingMessageDataType.UnableToJoinGame;
|
|
@@ -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 { IMultiplayerOnConnected } from "@wayward/game/multiplayer/IMultiplayer";
|
|
11
12
|
import type { IMatchmakingInfo, MatchmakingMessageData } from "@wayward/game/multiplayer/matchmaking/IMatchmaking";
|
|
12
13
|
import { Connection } from "@wayward/game/multiplayer/networking/Connection";
|
|
13
14
|
import { ConnectionState } from "@wayward/game/multiplayer/networking/IConnection";
|
|
@@ -29,7 +30,7 @@ export declare class SmartConnection extends Connection {
|
|
|
29
30
|
private _steamNetworkTimeoutId;
|
|
30
31
|
private _steamNetworkConnection;
|
|
31
32
|
private _webWorkerConnection;
|
|
32
|
-
constructor(matchmakingInfo: IMatchmakingInfo, matchmakingIdentifier: string, webRTCConfig: RTCConfiguration, sendMatchmakingMessage: (message: MatchmakingMessageData) => void, onData: (data: ArrayBufferLike) => void, onConnected: (
|
|
33
|
+
constructor(matchmakingInfo: IMatchmakingInfo, matchmakingIdentifier: string, webRTCConfig: RTCConfiguration, sendMatchmakingMessage: (message: MatchmakingMessageData) => void, onData: (data: ArrayBufferLike) => void, onConnected: (data: IMultiplayerOnConnected) => void, trySteamRelayNetwork: boolean, connectGlobalMatchmakingServer: () => void);
|
|
33
34
|
private get activeConnection();
|
|
34
35
|
get isSteamNetworkConnection(): boolean;
|
|
35
36
|
get isConnected(): boolean;
|
|
@@ -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 { IMultiplayerOnConnected } from "@wayward/game/multiplayer/IMultiplayer";
|
|
11
12
|
import type { IMatchmakingInfo, MatchmakingMessageData } from "@wayward/game/multiplayer/matchmaking/IMatchmaking";
|
|
12
13
|
import { Connection } from "@wayward/game/multiplayer/networking/Connection";
|
|
13
14
|
import type { ISteamworksNetworking } from "@wayward/hosts/shared/interfaces";
|
|
@@ -21,7 +22,7 @@ export declare class SteamNetworkConnection extends Connection {
|
|
|
21
22
|
readonly maxMessageSize = 65536;
|
|
22
23
|
private _processIntervalId;
|
|
23
24
|
private _checkSessionStateIntervalId;
|
|
24
|
-
constructor(steamNetworking: ISteamworksNetworking, hostSteamId: string, matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, onData: (data: ArrayBufferLike) => void, onConnected?: ((
|
|
25
|
+
constructor(steamNetworking: ISteamworksNetworking, hostSteamId: string, matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, onData: (data: ArrayBufferLike) => void, onConnected?: ((data: IMultiplayerOnConnected) => void) | undefined, connectGlobalMatchmakingServer?: (() => void) | undefined);
|
|
25
26
|
/**
|
|
26
27
|
* Steam id of the peer
|
|
27
28
|
*/
|
|
@@ -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 { IMultiplayerOnConnected } from "@wayward/game/multiplayer/IMultiplayer";
|
|
11
12
|
import type { IMatchmakingInfo, MatchmakingMessageData } from "@wayward/game/multiplayer/matchmaking/IMatchmaking";
|
|
12
13
|
import { Connection } from "@wayward/game/multiplayer/networking/Connection";
|
|
13
14
|
export declare class WebRTCConnection extends Connection {
|
|
@@ -18,7 +19,8 @@ export declare class WebRTCConnection extends Connection {
|
|
|
18
19
|
readonly maxMessageSize = 65536;
|
|
19
20
|
private _peerConnection?;
|
|
20
21
|
private _dataChannel?;
|
|
21
|
-
|
|
22
|
+
private _matchmakingConnectedMessageData?;
|
|
23
|
+
constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, config: RTCConfiguration, sendMatchmakingMessage: (message: MatchmakingMessageData) => void, onData: (data: ArrayBuffer) => void, onConnected?: ((data: IMultiplayerOnConnected) => void) | undefined);
|
|
22
24
|
get isConnected(): boolean;
|
|
23
25
|
protected onClosing(): void;
|
|
24
26
|
protected onClosed(): void;
|
|
@@ -31,4 +33,5 @@ export declare class WebRTCConnection extends Connection {
|
|
|
31
33
|
private _onIceConnectionStateChange;
|
|
32
34
|
private _onDescriptionCreated;
|
|
33
35
|
private _parseIceCandidate;
|
|
36
|
+
private _processConnectedMessage;
|
|
34
37
|
}
|
|
@@ -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 { IMultiplayerOnConnected } from "@wayward/game/multiplayer/IMultiplayer";
|
|
11
12
|
import type { IMatchmaking, IMatchmakingInfo, MatchmakingMessageData } from "@wayward/game/multiplayer/matchmaking/IMatchmaking";
|
|
12
13
|
import { Connection } from "@wayward/game/multiplayer/networking/Connection";
|
|
13
14
|
export declare class WebSocketConnection extends Connection {
|
|
@@ -16,7 +17,7 @@ export declare class WebSocketConnection extends Connection {
|
|
|
16
17
|
private readonly onConnected?;
|
|
17
18
|
name: string;
|
|
18
19
|
get maxMessageSize(): number;
|
|
19
|
-
constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, getMatchmaking: () => IMatchmaking | undefined, onData: (data: ArrayBuffer) => void, onConnected?: ((
|
|
20
|
+
constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, getMatchmaking: () => IMatchmaking | undefined, onData: (data: ArrayBuffer) => void, onConnected?: ((data: IMultiplayerOnConnected) => void) | undefined);
|
|
20
21
|
get isConnected(): boolean;
|
|
21
22
|
protected onClosing(): void;
|
|
22
23
|
protected onClosed(): 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 { IMultiplayerOnConnected } from "@wayward/game/multiplayer/IMultiplayer";
|
|
11
12
|
import type { IMatchmakingInfo, MatchmakingMessageData } from "@wayward/game/multiplayer/matchmaking/IMatchmaking";
|
|
12
13
|
import { Connection } from "@wayward/game/multiplayer/networking/Connection";
|
|
13
14
|
import type { WebWorkerClient } from "@wayward/game/webWorker/WebWorkerClient";
|
|
@@ -17,7 +18,7 @@ export declare class WebWorkerConnection extends Connection {
|
|
|
17
18
|
private webWorkerClient?;
|
|
18
19
|
name: string;
|
|
19
20
|
get maxMessageSize(): number;
|
|
20
|
-
constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, onData: (data: ArrayBufferLike) => void, onConnected?: ((
|
|
21
|
+
constructor(matchmakingInfo: IMatchmakingInfo | undefined, matchmakingIdentifier: string, onData: (data: ArrayBufferLike) => void, onConnected?: ((data: IMultiplayerOnConnected) => void) | undefined, webWorkerClient?: WebWorkerClient | undefined);
|
|
21
22
|
get isConnected(): boolean;
|
|
22
23
|
protected onClosing(): void;
|
|
23
24
|
protected onClosed(): void;
|
|
@@ -35,7 +35,6 @@ export default class SaveDataGlobal {
|
|
|
35
35
|
utilitiesEnumsAllocated: Record<string, EnumInfo>;
|
|
36
36
|
savedDialogInfo: Record<string, IDialogInfo | undefined>;
|
|
37
37
|
multiplayerBannedPlayers: string[];
|
|
38
|
-
multiplayerPreviousGames: PartialRecord<string, IMultiplayerPreviousGame>;
|
|
39
38
|
multiplayerMessageOfTheDay: string;
|
|
40
39
|
characters: ISavedCharacter[];
|
|
41
40
|
ui: Record<string, any>;
|
|
@@ -8,14 +8,14 @@
|
|
|
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 { IMultiplayerServerToJoin } from "@wayward/game/game/IGame";
|
|
11
12
|
import type { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
12
|
-
import type { ServerInfo } from "@wayward/game/multiplayer/IMultiplayer";
|
|
13
13
|
import Menu from "@wayward/game/ui/screen/screens/menu/component/Menu";
|
|
14
14
|
import MilestoneModifiers from "@wayward/game/ui/screen/screens/menu/component/MilestoneModifiers";
|
|
15
15
|
export default class JoinServerChooseModifiersMenu extends Menu {
|
|
16
16
|
readonly milestoneModifiers: MilestoneModifiers;
|
|
17
17
|
readonly milestones: Set<Milestone>;
|
|
18
|
-
multiplayerServerToJoin:
|
|
18
|
+
multiplayerServerToJoin: IMultiplayerServerToJoin;
|
|
19
19
|
constructor();
|
|
20
20
|
protected refresh(): void;
|
|
21
21
|
}
|
|
@@ -14,11 +14,13 @@ declare namespace Define {
|
|
|
14
14
|
export function set<P, K extends string & keyof P>(proto: P, key: K, value: P[K]): P[K];
|
|
15
15
|
export function set<V>(proto: any, key: PropertyKey, value: V): V;
|
|
16
16
|
export function all<P, K extends string & keyof P>(protos: P[], key: K, implementation: Implementation<P, K>): void;
|
|
17
|
-
interface
|
|
17
|
+
interface IMagicImplementationReadonly<O, K extends string & keyof O> {
|
|
18
18
|
get(this: O): O[K];
|
|
19
|
+
}
|
|
20
|
+
interface IMagicImplementation<O, K extends string & keyof O> extends IMagicImplementationReadonly<O, K> {
|
|
19
21
|
set(this: O, value: O[K]): void;
|
|
20
22
|
}
|
|
21
|
-
export function magic<O, K extends string & keyof O>(obj: O, key: K, implementation: IMagicImplementation<O, K>): void;
|
|
23
|
+
export function magic<O, K extends string & keyof O>(obj: O, key: K, implementation: IMagicImplementationReadonly<O, K> | IMagicImplementation<O, K>): void;
|
|
22
24
|
export {};
|
|
23
25
|
}
|
|
24
26
|
export default Define;
|
package/package.json
CHANGED