@wayward/types 2.11.1-beta.dev.20220102.1 → 2.11.2-beta.dev.20220105.2
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/Game.d.ts +4 -1
- package/definitions/game/game/doodad/Doodad.d.ts +1 -0
- package/definitions/game/game/island/Island.d.ts +9 -0
- package/definitions/game/game/item/ItemManager.d.ts +7 -0
- package/definitions/game/game/options/modifiers/GameplayModifiersManager.d.ts +3 -2
- package/definitions/game/game/options/modifiers/challenge/ChallengeModifiers.d.ts +1 -0
- package/definitions/game/game/tile/events/IFire.d.ts +1 -1
- package/definitions/game/multiplayer/IMultiplayer.d.ts +3 -2
- package/definitions/game/multiplayer/Multiplayer.d.ts +3 -0
- package/definitions/game/multiplayer/networking/SmartConnection.d.ts +1 -0
- package/definitions/game/utilities/Log.d.ts +56 -55
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/definitions/test/core/applicationManager.d.ts +1 -0
- package/definitions/test/core/chromeDriver.d.ts +3 -1
- package/definitions/test/util/random.d.ts +1 -0
- package/package.json +1 -1
|
@@ -25,6 +25,8 @@ import type { Milestone } from "game/milestones/IMilestone";
|
|
|
25
25
|
import type { IGameOptions } from "game/options/IGameOptions";
|
|
26
26
|
import { GameMode } from "game/options/IGameOptions";
|
|
27
27
|
import type { ChallengeModifiersCollection } from "game/options/modifiers/challenge/ChallengeModifiers";
|
|
28
|
+
import type { GameplayModifiersCollection } from "game/options/modifiers/GameplayModifiersManager";
|
|
29
|
+
import type MilestoneModifier from "game/options/modifiers/milestone/MilestoneModifier";
|
|
28
30
|
import ReferenceManager from "game/reference/ReferenceManager";
|
|
29
31
|
import TimeManager from "game/time/TimeManager";
|
|
30
32
|
import VotingManager from "game/VotingManager";
|
|
@@ -70,7 +72,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
70
72
|
mapSizeSq: number;
|
|
71
73
|
readonly itemStylesheetHandler: ItemStylesheetHandler | undefined;
|
|
72
74
|
readonly voting: VotingManager;
|
|
73
|
-
|
|
75
|
+
milestonesCollection?: GameplayModifiersCollection<MilestoneModifier, Milestone>;
|
|
74
76
|
challengeCollection?: ChallengeModifiersCollection;
|
|
75
77
|
debugRenderer: ITextureDebugRenderer | undefined;
|
|
76
78
|
webGlContext: WebGlContext | undefined;
|
|
@@ -82,6 +84,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
82
84
|
private gameOptionsCached?;
|
|
83
85
|
private synchronizeStateId;
|
|
84
86
|
protected stringTokenizer: StringTokenizer | undefined;
|
|
87
|
+
toString(): string;
|
|
85
88
|
get isPaused(): boolean;
|
|
86
89
|
initializeRenderer(): void;
|
|
87
90
|
globalSlotReady(): void;
|
|
@@ -218,6 +218,7 @@ export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements
|
|
|
218
218
|
* @param growthBonus The bonus that is applied (on top of a default of 10) to the plants decay (so it grows faster).
|
|
219
219
|
*/
|
|
220
220
|
healOrHarmPlant(liquid: LiquidType, growthBonus?: number): void;
|
|
221
|
+
isLitAndCanRevert(): boolean;
|
|
221
222
|
/**
|
|
222
223
|
* Reverts lit doodads if they provide fire and have a revert doodad type set.
|
|
223
224
|
*/
|
|
@@ -105,6 +105,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
105
105
|
modifiersCollection?: IslandModifiersCollection;
|
|
106
106
|
details?: IIslandDetails;
|
|
107
107
|
constructor(position?: IVector2, seed?: number);
|
|
108
|
+
toString(): string;
|
|
108
109
|
private registerMemoryLeakDetector;
|
|
109
110
|
preSerializeObject(serializer: ISerializer): void;
|
|
110
111
|
onUnserialized(): void;
|
|
@@ -253,6 +254,14 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
253
254
|
private updateEntityFov;
|
|
254
255
|
private processTimers;
|
|
255
256
|
private runRandomEvents;
|
|
257
|
+
/**
|
|
258
|
+
* Plants a random seed at the given coordinates based on what can grow on that tile naturally. This will replace any doodad that is there.
|
|
259
|
+
* @param x X coordinates.
|
|
260
|
+
* @param y Y coordinates.
|
|
261
|
+
* @param z Z coordinates.
|
|
262
|
+
* @returns True if a seed was planted.
|
|
263
|
+
*/
|
|
264
|
+
plantRandomSeed(x: number, y: number, z: number): boolean;
|
|
256
265
|
/**
|
|
257
266
|
* Synchronizes player events
|
|
258
267
|
* Usually called when a new player joins
|
|
@@ -228,6 +228,13 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
228
228
|
checkMilestones(player: Player, item: Item): void;
|
|
229
229
|
getDefaultDurability(human: Human | undefined, weight: number, itemType: ItemType, getMax?: boolean): number;
|
|
230
230
|
updateItemOrder(container: IContainer, itemOrder: number[] | undefined): void;
|
|
231
|
+
/**
|
|
232
|
+
* Used in cases where we break items down from their base form like in dismantling or burning items.
|
|
233
|
+
* @param itemQuality Quality of the base item.
|
|
234
|
+
* @param bonusValue A number that we likely will be passing to getQualityBasedOnSkill and can be based on a skill or some arbitrary value.
|
|
235
|
+
* @returns number That is distributed from the quality/value.
|
|
236
|
+
*/
|
|
237
|
+
getBreakingQualityBonus(itemQuality: Quality | undefined, bonusValue: number): number;
|
|
231
238
|
getQualityBasedOnSkill(itemQuality: Quality | undefined, skillValue: number, allowIncreasedQuality?: boolean, bonusChance?: number): Quality | undefined;
|
|
232
239
|
getNPCFromInventoryContainer(containable: IContainable): NPC | undefined;
|
|
233
240
|
getItemsByWeight(a: number, b: number): number;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type GameplayModifier from "game/options/modifiers/GameplayModifier";
|
|
12
12
|
import type { GameplayModifierInstance, GetModifierId, GetModifierInstance, GetModifierInstanceArgs } from "game/options/modifiers/GameplayModifier";
|
|
13
|
+
import type { StringableObject } from "utilities/object/Objects";
|
|
13
14
|
export default abstract class GameplayModifiersManager<MODIFIER extends GameplayModifier<number, GameplayModifierInstance<number>, any[]>, ID extends GetModifierId<MODIFIER> = GetModifierId<MODIFIER>, INSTANCE_ARGS extends GetModifierInstanceArgs<MODIFIER> = GetModifierInstanceArgs<MODIFIER>> {
|
|
14
15
|
private readonly enumObject;
|
|
15
16
|
private readonly classes;
|
|
@@ -26,8 +27,8 @@ export declare class GameplayModifiersCollection<MODIFIER extends GameplayModifi
|
|
|
26
27
|
protected readonly args: INSTANCE_ARGS;
|
|
27
28
|
constructor(manager: GameplayModifiersManager<MODIFIER>, ...args: INSTANCE_ARGS);
|
|
28
29
|
hasAny(): boolean;
|
|
29
|
-
initialize(
|
|
30
|
-
uninitialize(): void;
|
|
30
|
+
initialize(source: StringableObject, ids: Iterable<ID>): INSTANCE[];
|
|
31
|
+
uninitialize(source: StringableObject): void;
|
|
31
32
|
options(): import("@wayward/goodstream").default<import("../IGameOptions").IGameOptionsPartial>;
|
|
32
33
|
initialized(): IterableIterator<ID>;
|
|
33
34
|
}
|
|
@@ -15,6 +15,7 @@ import type Tooltip from "ui/tooltip/Tooltip";
|
|
|
15
15
|
export declare const EXCLUSIVE_MODIFIERS: Challenge[][];
|
|
16
16
|
declare class ChallengeModifiersManager extends GameplayModifiersManager<ChallengeModifier> {
|
|
17
17
|
constructor();
|
|
18
|
+
toString(): string;
|
|
18
19
|
createCollection(seed?: number): ChallengeModifiersCollection;
|
|
19
20
|
}
|
|
20
21
|
declare const _default: ChallengeModifiersManager;
|
|
@@ -34,5 +34,5 @@ export declare module FireStage {
|
|
|
34
34
|
export declare module IFire {
|
|
35
35
|
function dissassemblyBurn(island: Island, item: Item, container: ITileContainer, disassembly: boolean): void;
|
|
36
36
|
function harvestGatherBurn(step: number, resources: ILootItem[] | undefined, container: IContainer, quality: Quality | undefined, tileEvent: TileEvent): void;
|
|
37
|
-
function burnsLike(burnsLikeItem: ItemType, tileEvent: TileEvent, tileContainer: IContainer, quality: Quality): void;
|
|
37
|
+
function burnsLike(burnsLikeItem: ItemType, tileEvent: TileEvent, tileContainer: IContainer, quality: Quality | undefined): void;
|
|
38
38
|
}
|
|
@@ -141,6 +141,7 @@ export interface IMultiplayerNetworkingOptions {
|
|
|
141
141
|
connectionTimeout: number;
|
|
142
142
|
keepAliveInterval: number;
|
|
143
143
|
keepAliveTimeout: number;
|
|
144
|
+
steamNetworkingConnectionWebRTCFallbackTimeout: number;
|
|
144
145
|
}
|
|
145
146
|
export declare type ServerInfo = string | IMatchmakingInfo;
|
|
146
147
|
export declare enum PacketAcceptType {
|
|
@@ -200,6 +201,6 @@ export interface IJoinServerOptions {
|
|
|
200
201
|
character: ICharacter;
|
|
201
202
|
milestoneModifiers: Set<Milestone>;
|
|
202
203
|
retryMatchmakingInfo: IMatchmakingInfo;
|
|
203
|
-
|
|
204
|
-
|
|
204
|
+
automaticallyRetry: boolean;
|
|
205
|
+
enableSteamNetworkConnections: boolean;
|
|
205
206
|
}
|
|
@@ -32,6 +32,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
32
32
|
private readonly _clients;
|
|
33
33
|
private readonly _steamIdToClientMapping;
|
|
34
34
|
private _joinServerTimeoutId;
|
|
35
|
+
private _steamNetworkConnectionWebRTCFallbackTimeoutId;
|
|
35
36
|
private _joinedMatchmakingInfo;
|
|
36
37
|
private _connectedMatchmakingInfo;
|
|
37
38
|
private _globalMatchmaking;
|
|
@@ -91,6 +92,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
91
92
|
rejoinServer(options?: {
|
|
92
93
|
randomizeIdentifier?: boolean;
|
|
93
94
|
automaticallyRetry?: boolean;
|
|
95
|
+
enableSteamNetworkConnections?: boolean;
|
|
94
96
|
}): Promise<boolean>;
|
|
95
97
|
/**
|
|
96
98
|
* Disconnects from multiplayer
|
|
@@ -146,6 +148,7 @@ export default class Multiplayer extends EventEmitter.Host<IMultiplayerEvents> {
|
|
|
146
148
|
private addDefaultSyncChecks;
|
|
147
149
|
private getPacketSyncChecks;
|
|
148
150
|
private clearJoinServerRetryTimeout;
|
|
151
|
+
clearSteamNetworkConnectionWebRTCFallbackTimer(): void;
|
|
149
152
|
private startMatchmakingServer;
|
|
150
153
|
private stopMatchmakingServer;
|
|
151
154
|
private setupClientConnection;
|
|
@@ -29,6 +29,7 @@ export declare class SmartConnection extends Connection {
|
|
|
29
29
|
private _steamNetworkTimeoutId;
|
|
30
30
|
private _steamNetworkConnection;
|
|
31
31
|
constructor(matchmakingInfo: IMatchmakingInfo, matchmakingIdentifier: string, config: RTCConfiguration, sendMatchmakingMessage: (message: MatchmakingMessageData) => void, onData: (data: ArrayBuffer) => void, onConnected: (matchmakingInfo: IMatchmakingInfo) => void, trySteamRelayNetwork: boolean, connectGlobalMatchmakingServer: () => void);
|
|
32
|
+
get isSteamNetworkConnection(): boolean;
|
|
32
33
|
isConnected(): boolean;
|
|
33
34
|
getState(): ConnectionState;
|
|
34
35
|
setState(state: ConnectionState): void;
|
|
@@ -26,61 +26,62 @@ export declare enum LogSource {
|
|
|
26
26
|
FileDataStorage = 13,
|
|
27
27
|
FlowFieldManager = 14,
|
|
28
28
|
Game = 15,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
29
|
+
GameplayModifier = 16,
|
|
30
|
+
GarbageCollection = 17,
|
|
31
|
+
HookManager = 18,
|
|
32
|
+
IndexedDBDataStorage = 19,
|
|
33
|
+
Input = 20,
|
|
34
|
+
InputManager = 21,
|
|
35
|
+
InterModRegistryManager = 22,
|
|
36
|
+
Island = 23,
|
|
37
|
+
ItemManager = 24,
|
|
38
|
+
ItemReference = 25,
|
|
39
|
+
ItemStylesheet = 26,
|
|
40
|
+
Languages = 27,
|
|
41
|
+
Loading = 28,
|
|
42
|
+
LocalStorageDataStorage = 29,
|
|
43
|
+
MapGen = 30,
|
|
44
|
+
Matchmaking = 31,
|
|
45
|
+
MatchmakingServer = 32,
|
|
46
|
+
MemoryLeakDetector = 33,
|
|
47
|
+
Message = 34,
|
|
48
|
+
Mod = 35,
|
|
49
|
+
Mods = 36,
|
|
50
|
+
Multiplayer = 37,
|
|
51
|
+
NPC = 38,
|
|
52
|
+
NPCManager = 39,
|
|
53
|
+
OldUi = 40,
|
|
54
|
+
Packet = 41,
|
|
55
|
+
Player = 42,
|
|
56
|
+
PlayerManager = 43,
|
|
57
|
+
Prompts = 44,
|
|
58
|
+
Reflow = 45,
|
|
59
|
+
Renderer = 46,
|
|
60
|
+
ReplayManager = 47,
|
|
61
|
+
ResourceLoader = 48,
|
|
62
|
+
SaveManager = 49,
|
|
63
|
+
Serializer = 50,
|
|
64
|
+
Shaders = 51,
|
|
65
|
+
SoundEffect = 52,
|
|
66
|
+
SpritePack = 53,
|
|
67
|
+
SshCommandManager = 54,
|
|
68
|
+
SshServer = 55,
|
|
69
|
+
Steamworks = 56,
|
|
70
|
+
StringTokenizer = 57,
|
|
71
|
+
TemperatureManager = 58,
|
|
72
|
+
TileEventManager = 59,
|
|
73
|
+
TileUpdate = 60,
|
|
74
|
+
Timer = 61,
|
|
75
|
+
Trello = 62,
|
|
76
|
+
Ui = 63,
|
|
77
|
+
Utilities = 64,
|
|
78
|
+
WebAssembly = 65,
|
|
79
|
+
WebGlContext = 66,
|
|
80
|
+
WebRTCConnection = 67,
|
|
81
|
+
WebSocketConnection = 68,
|
|
82
|
+
World = 69,
|
|
83
|
+
WorldLayerRenderer = 70,
|
|
84
|
+
WorldRenderer = 71
|
|
84
85
|
}
|
|
85
86
|
export declare enum LogLineType {
|
|
86
87
|
Debug = 0,
|
|
@@ -8,6 +8,6 @@
|
|
|
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
|
-
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch =
|
|
11
|
+
export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 11, gameVersionPatch = 2, gameVersionName = "Horizons";
|
|
12
12
|
export declare const gameVersion: string;
|
|
13
13
|
export declare function registerGlobals(globalObject: any): void;
|
|
@@ -71,6 +71,7 @@ export declare class Apps {
|
|
|
71
71
|
waitUntilLoadingIsFinished(): Promise<void>;
|
|
72
72
|
randomInput(count: number): Promise<void>;
|
|
73
73
|
moveToTowardsIsland(app: Application, direction: Direction.Cardinal, recoverStats?: boolean): Promise<void>;
|
|
74
|
+
recoverStats(app: Application): Promise<void>;
|
|
74
75
|
moveAndVerifyTicks(app: Application, direction: Direction.Cardinal): Promise<void>;
|
|
75
76
|
waitForClientConsistency(): Promise<void>;
|
|
76
77
|
sailToCivilization(winnerApp: Application): Promise<void>;
|
|
@@ -8,13 +8,15 @@
|
|
|
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 ApplicationLogger from "./applicationLogger";
|
|
11
12
|
export default class ChromeDriver {
|
|
12
13
|
private readonly safeTestTile;
|
|
13
14
|
private readonly appId;
|
|
15
|
+
private readonly logger;
|
|
14
16
|
readonly port: number;
|
|
15
17
|
private process;
|
|
16
18
|
private exitHandler;
|
|
17
|
-
constructor(safeTestTile: string, appId: string);
|
|
19
|
+
constructor(safeTestTile: string, appId: string, logger: ApplicationLogger);
|
|
18
20
|
start(): Promise<void>;
|
|
19
21
|
stop(): void;
|
|
20
22
|
}
|
package/package.json
CHANGED