@wayward/types 2.11.0-beta.dev.20211123.5 → 2.11.0-beta.dev.20211124.4
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/doodad/Doodad.d.ts +1 -1
- package/definitions/game/game/doodad/IDoodad.d.ts +5 -0
- package/definitions/game/game/entity/Human.d.ts +1 -1
- package/definitions/game/game/entity/StatFactory.d.ts +2 -1
- package/definitions/game/game/entity/Stats.d.ts +2 -1
- package/definitions/game/game/entity/creature/corpse/Corpse.d.ts +2 -0
- package/definitions/game/game/entity/player/Player.d.ts +1 -1
- package/definitions/game/game/entity/player/quest/QuestManager.d.ts +2 -1
- package/definitions/game/game/entity/skill/SkillManager.d.ts +6 -4
- package/definitions/game/game/entity/status/StatusEffect.d.ts +2 -1
- package/definitions/game/game/island/Island.d.ts +7 -1
- package/definitions/game/game/island/IslandManager.d.ts +6 -0
- package/definitions/game/game/item/ItemManager.d.ts +1 -1
- package/definitions/game/game/item/ItemReferenceManager.d.ts +1 -1
- package/definitions/game/game/mapgen/IMapGen.d.ts +2 -1
- package/definitions/game/renderer/notifier/Notifier.d.ts +1 -1
- package/definitions/game/steamworks/Steamworks.d.ts +1 -0
- package/definitions/game/ui/util/ScrollableHandler.d.ts +3 -3
- package/definitions/hosts/shared/interfaces.d.ts +1 -0
- package/definitions/test/core/applicationInteractions.d.ts +3 -0
- package/definitions/test/core/chromeDriver.d.ts +2 -1
- package/definitions/test/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -132,7 +132,7 @@ export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements
|
|
|
132
132
|
isValid(): boolean;
|
|
133
133
|
isInGroup(doodadTypeGroup: DoodadTypeGroup): boolean;
|
|
134
134
|
updateGroupCache(doodadTypeGroup: DoodadTypeGroup): boolean;
|
|
135
|
-
getTile(): ITile;
|
|
135
|
+
getTile(ignoreCache?: boolean): ITile;
|
|
136
136
|
getTileId(): number;
|
|
137
137
|
getPoint(): IVector3;
|
|
138
138
|
canGrow(): boolean;
|
|
@@ -282,6 +282,11 @@ export declare enum DoodadType {
|
|
|
282
282
|
CactusScarecrow = 123,
|
|
283
283
|
PapayaTree = 124
|
|
284
284
|
}
|
|
285
|
+
/**
|
|
286
|
+
* All tree types that can be spawned during map gen
|
|
287
|
+
* !! This must be kept in sync with the tree list in setupTiles !!
|
|
288
|
+
*/
|
|
289
|
+
export declare type MapGenDoodadTrees = DoodadType.MapleTree | DoodadType.CoconutTree | DoodadType.JoshuaTree | DoodadType.SpruceTree | DoodadType.CypressTree | DoodadType.AppleTree | DoodadType.SpruceTreeWithSnow | DoodadType.WhitePineTree | DoodadType.WhitePineTreeWithSnow | DoodadType.PapayaTree;
|
|
285
290
|
export declare enum DoodadTypeGroup {
|
|
286
291
|
Invalid = 400,
|
|
287
292
|
LitCampfire = 401,
|
|
@@ -55,11 +55,11 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
55
55
|
readonly equipEffects: Map<EquipEffect, EquipEffects>;
|
|
56
56
|
restData: IRestData | undefined;
|
|
57
57
|
score: number;
|
|
58
|
-
skill: SkillManager;
|
|
59
58
|
state: PlayerState;
|
|
60
59
|
swimming: boolean;
|
|
61
60
|
vehicleItemReference: ItemReference | undefined;
|
|
62
61
|
identifier: string;
|
|
62
|
+
skill: SkillManager;
|
|
63
63
|
private readonly privateStore;
|
|
64
64
|
constructor();
|
|
65
65
|
createSkillManager(): SkillManager;
|
|
@@ -13,9 +13,10 @@ import { Stat } from "game/entity/IStats";
|
|
|
13
13
|
import type { IStatHost } from "game/entity/Stats";
|
|
14
14
|
import type Stats from "game/entity/Stats";
|
|
15
15
|
export declare class StatsFactory {
|
|
16
|
-
private readonly host;
|
|
17
16
|
private readonly stats;
|
|
17
|
+
private readonly _host;
|
|
18
18
|
constructor(host: IStatHost);
|
|
19
|
+
private get host();
|
|
19
20
|
/**
|
|
20
21
|
* If the condition is not falsey, runs the initializer on this factory.
|
|
21
22
|
*/
|
|
@@ -17,9 +17,10 @@ export interface IStatHost extends EventEmitter.Host<IStatEvents> {
|
|
|
17
17
|
stats: IStats;
|
|
18
18
|
}
|
|
19
19
|
export default class Stats<T extends IStatHost> {
|
|
20
|
-
private readonly host;
|
|
21
20
|
private get stats();
|
|
21
|
+
private readonly _host;
|
|
22
22
|
constructor(host: T);
|
|
23
|
+
private get host();
|
|
23
24
|
/**
|
|
24
25
|
* Initializes the given stat from a `StatFactory` instance.
|
|
25
26
|
* @param factory The factory to initialize the stat from.
|
|
@@ -15,6 +15,7 @@ import type { IObject } from "game/IObject";
|
|
|
15
15
|
import type { IslandId } from "game/island/IIsland";
|
|
16
16
|
import { ItemType } from "game/item/IItem";
|
|
17
17
|
import type { IReferenceable } from "game/reference/IReferenceManager";
|
|
18
|
+
import type { ITile } from "game/tile/ITerrain";
|
|
18
19
|
import type { ISerializedTranslation } from "language/ITranslation";
|
|
19
20
|
import type Translation from "language/Translation";
|
|
20
21
|
import type { IVector3 } from "utilities/math/IVector";
|
|
@@ -48,6 +49,7 @@ export default class Corpse extends EventEmitter.Host<ICorpseEvents> implements
|
|
|
48
49
|
* - `corpse.getName(undefined, 3)` // "acid spitter demons"
|
|
49
50
|
*/
|
|
50
51
|
getName(article?: boolean, count?: number): Translation;
|
|
52
|
+
getTile(): ITile;
|
|
51
53
|
update(): void;
|
|
52
54
|
getResources(clientSide?: boolean): ItemType[];
|
|
53
55
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { IEventEmitter } from "event/EventEmitter";
|
|
12
12
|
import type Doodad from "game/doodad/Doodad";
|
|
13
|
-
import { ActionType } from "game/entity/action/IAction";
|
|
13
|
+
import type { ActionType } from "game/entity/action/IAction";
|
|
14
14
|
import Creature from "game/entity/creature/Creature";
|
|
15
15
|
import { CreatureType } from "game/entity/creature/ICreature";
|
|
16
16
|
import Human from "game/entity/Human";
|
|
@@ -17,13 +17,14 @@ import { QuestType } from "game/entity/player/quest/quest/IQuest";
|
|
|
17
17
|
import type { RequirementInstance } from "game/entity/player/quest/quest/Quest";
|
|
18
18
|
import type { Game } from "game/Game";
|
|
19
19
|
export default class QuestManager extends EventEmitter.Host<IQuestManagerEvents> {
|
|
20
|
-
private readonly host;
|
|
21
20
|
static reset(): void;
|
|
22
21
|
private readonly quests;
|
|
23
22
|
private readonly eventBusTriggers;
|
|
24
23
|
private readonly hostTriggers;
|
|
25
24
|
private readonly initializedQuests;
|
|
25
|
+
private readonly _host;
|
|
26
26
|
constructor(host: Player);
|
|
27
|
+
private get host();
|
|
27
28
|
/**
|
|
28
29
|
* Get all quests
|
|
29
30
|
*/
|
|
@@ -27,14 +27,16 @@ export interface ISkillEvents {
|
|
|
27
27
|
skillChange(skill: SkillType, value: number, oldValue: number): any;
|
|
28
28
|
}
|
|
29
29
|
export declare type SkillSet = Record<SkillType, ISkillLevel>;
|
|
30
|
+
export interface ISkillHost extends EventEmitter.Host<ISkillEvents> {
|
|
31
|
+
readonly island: Island;
|
|
32
|
+
}
|
|
30
33
|
export default class SkillManager {
|
|
31
|
-
private readonly host;
|
|
32
34
|
private readonly configuration;
|
|
33
35
|
private skills;
|
|
34
36
|
private cachedTotalSkill?;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
private readonly _host;
|
|
38
|
+
constructor(host: ISkillHost, configuration: ISkillConfiguration);
|
|
39
|
+
private get host();
|
|
38
40
|
has(skill: SkillType): boolean;
|
|
39
41
|
/**
|
|
40
42
|
* @returns whether the given skill is maxed-out. Ignores bonus.
|
|
@@ -58,8 +58,9 @@ export default abstract class StatusEffect extends EventEmitter.Host<IStatusEffe
|
|
|
58
58
|
readonly type: StatusType;
|
|
59
59
|
static update(effect: StatusEffect): void;
|
|
60
60
|
private registered;
|
|
61
|
-
|
|
61
|
+
private readonly _entity;
|
|
62
62
|
constructor(type: StatusType, entity: Entity | undefined);
|
|
63
|
+
protected get entity(): Entity;
|
|
63
64
|
getOptions(): IGameOptionsStatusEffect;
|
|
64
65
|
register(): void;
|
|
65
66
|
/**
|
|
@@ -91,8 +91,10 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
91
91
|
*/
|
|
92
92
|
readonly players: Set<Player>;
|
|
93
93
|
previousSaveVersion: IVersionInfo | undefined;
|
|
94
|
+
brokenReferencesCount: number;
|
|
94
95
|
civilizationScore: number;
|
|
95
96
|
spawnPoint: IVector3;
|
|
97
|
+
private _loadedReferences;
|
|
96
98
|
private _tiles;
|
|
97
99
|
private _world;
|
|
98
100
|
modifiersCollection?: IslandModifiersCollection;
|
|
@@ -128,7 +130,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
128
130
|
* Removes all players and stores tiles references
|
|
129
131
|
* @param resetState True if the game state is resetting
|
|
130
132
|
*/
|
|
131
|
-
unload(
|
|
133
|
+
unload(): void;
|
|
132
134
|
delete(): void;
|
|
133
135
|
private fastForward;
|
|
134
136
|
hydrateFromOldGame(oldGame: IGameOld): void;
|
|
@@ -251,5 +253,9 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
251
253
|
rangeFinder(weaponRange: number, playerSkillLevel: number, useMaxRange?: boolean): number;
|
|
252
254
|
getRandomQuality(bonusQuality?: number): Quality.None | Quality.Superior | Quality.Remarkable | Quality.Exceptional;
|
|
253
255
|
getQualityDurabilityBonus(quality: Quality, itemDurability: number, getMax?: boolean): number;
|
|
256
|
+
/**
|
|
257
|
+
* Only allow loading references once
|
|
258
|
+
* Even if an island is unloaded, the loaded references will remain
|
|
259
|
+
*/
|
|
254
260
|
loadReferences(): void;
|
|
255
261
|
}
|
|
@@ -21,8 +21,14 @@ export default class IslandManager extends Map<IslandId, Island> {
|
|
|
21
21
|
get default(): Island;
|
|
22
22
|
/**
|
|
23
23
|
* Gets an island by id
|
|
24
|
+
* @throws Errors if the island does not exist
|
|
24
25
|
*/
|
|
25
26
|
get(islandId: IslandId): Island;
|
|
27
|
+
/**
|
|
28
|
+
* Gets an island by id. Try to use "get" instead!
|
|
29
|
+
* @returns Island or undefined if it does not exist
|
|
30
|
+
*/
|
|
31
|
+
getIfExists(islandId: IslandId): Island | undefined;
|
|
26
32
|
/**
|
|
27
33
|
* Gets an island by position
|
|
28
34
|
*/
|
|
@@ -112,7 +112,7 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
|
|
|
112
112
|
getPoint(itemOrContainer?: Item | IContainer): Vector3 | undefined;
|
|
113
113
|
resolveContainer(container?: IContainer): Doodad | Item | Player | NPC | IContainer | ITile | undefined;
|
|
114
114
|
getContainerReference(containable: IContainable | undefined, showWarnings?: boolean): ContainerReference;
|
|
115
|
-
derefenceContainerReference(containerReference: ContainerReference): IContainable | undefined;
|
|
115
|
+
derefenceContainerReference(containerReference: ContainerReference, showWarnings?: boolean): IContainable | undefined;
|
|
116
116
|
hashContainer(containable: IContainable): string;
|
|
117
117
|
hashContainerReference(containerReference: ContainerReference): string;
|
|
118
118
|
updateContainedWithin(containable: IContainable, containedWithin: IContainer | undefined): void;
|
|
@@ -16,6 +16,6 @@ declare module ItemReferenceManager {
|
|
|
16
16
|
*/
|
|
17
17
|
function getContainerReferenceSlow(containable: IContainable, includeIsland?: boolean): ContainerReference;
|
|
18
18
|
function getContainerReferenceInIsland(island: Island, containable: IContainable | undefined, showWarnings?: boolean): ContainerReference;
|
|
19
|
-
function derefenceContainerReference(containerRef: ContainerReference, island?: Island): object | undefined;
|
|
19
|
+
function derefenceContainerReference(containerRef: ContainerReference, island?: Island, showWarnings?: boolean): object | undefined;
|
|
20
20
|
}
|
|
21
21
|
export default ItemReferenceManager;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { BiomeTypes } from "game/biome/IBiome";
|
|
12
|
+
import type { MapGenDoodadTrees } from "game/doodad/IDoodad";
|
|
12
13
|
import type Island from "game/island/Island";
|
|
13
14
|
import type { ITemplateOptions } from "game/mapgen/MapGenHelpers";
|
|
14
15
|
import type { Load } from "game/meta/Loading";
|
|
@@ -51,7 +52,7 @@ export interface IMapGenGenerateInput {
|
|
|
51
52
|
getBiomeHeightMap(x: number, y: number): number;
|
|
52
53
|
getRandomQuality(tileType: number): number;
|
|
53
54
|
setTileGen(x: number, y: number, z: number, value: number): void;
|
|
54
|
-
setTree(type:
|
|
55
|
+
setTree(type: MapGenDoodadTrees, override?: number): number;
|
|
55
56
|
setTileVein(x: number, y: number, z: number, value: number, terrainType: number): void;
|
|
56
57
|
setCaveOres(dValue: number, tileData: number, x: number, y: number, z: number): void;
|
|
57
58
|
}
|
|
@@ -30,7 +30,7 @@ export default class Notifier {
|
|
|
30
30
|
private spriteAtlas;
|
|
31
31
|
constructor(context: RendererContext, capacity: number);
|
|
32
32
|
setResources(resourceContainer: IResourceContainer): void;
|
|
33
|
-
|
|
33
|
+
delete(): void;
|
|
34
34
|
addItem(location: INotificationLocation, itemNotifierType: ItemNotifierType, type: ItemType, _broken?: boolean): void;
|
|
35
35
|
addCreature(location: INotificationLocation, creatureNotifierType: CreatureNotifierType, type: CreatureType, aberrant?: boolean): void;
|
|
36
36
|
addStat(location: INotificationLocation, type: StatNotificationType, value: number): void;
|
|
@@ -177,6 +177,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
|
177
177
|
* Called when a networking messages session fails
|
|
178
178
|
*/
|
|
179
179
|
private onSteamNetworkingMessagesSessionFailed;
|
|
180
|
+
setSteamNetworkingSendRates(min: number, max: number): void;
|
|
180
181
|
/**
|
|
181
182
|
* Insanely expensive to do and it's possible for it to cause crashes
|
|
182
183
|
*/
|
|
@@ -8,13 +8,13 @@
|
|
|
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 Component from "ui/component/Component";
|
|
11
12
|
export declare class ScrollableHandler {
|
|
12
13
|
private readonly id;
|
|
13
14
|
private readonly elementRef;
|
|
14
|
-
get element(): HTMLElement;
|
|
15
|
+
get element(): HTMLElement | undefined;
|
|
15
16
|
constructor(element: HTMLElement, id: string);
|
|
16
|
-
watchAnimations(): void;
|
|
17
|
-
watchTransitions(): void;
|
|
17
|
+
watchAnimations(parent: Component): void;
|
|
18
18
|
private onAnimationStart;
|
|
19
19
|
private onAnimationEnd;
|
|
20
20
|
}
|
|
@@ -104,6 +104,7 @@ export interface ISteamworksNetworking {
|
|
|
104
104
|
setSteamNetworkingMessagesSessionRequestCallback(callback: (steamIdRemote: string) => void): void;
|
|
105
105
|
setSteamNetworkingMessagesSessionFailedCallback(callback: (steamIdRemote: string, state: SteamNetworkingConnectionState, endReason: number) => void): void;
|
|
106
106
|
setSteamNetworkingConnectionStatusCallback(callback: (steamIdRemote: string, state: SteamNetworkingConnectionState, endReason: number, oldState: SteamNetworkingConnectionState) => void): void;
|
|
107
|
+
setSteamNetworkingSendRates(min: number, max: number): void;
|
|
107
108
|
setSteamNetworkingDebugCallback(callback: (type: number, message: string) => void): void;
|
|
108
109
|
}
|
|
109
110
|
export interface ISteamFriend {
|
|
@@ -14,6 +14,7 @@ import { Direction } from "../../game/utilities/math/Direction";
|
|
|
14
14
|
import type { Random, SeededGenerator } from "../../game/utilities/random/Random";
|
|
15
15
|
import type { INewGameOptions } from "../interfaces";
|
|
16
16
|
import { GameMode } from "../interfaces";
|
|
17
|
+
import type { IslandId } from "../../game/game/island/IIsland";
|
|
17
18
|
import ApplicationDom from "./applicationDom";
|
|
18
19
|
import ApplicationLogger from "./applicationLogger";
|
|
19
20
|
export default class ApplicationInteractions {
|
|
@@ -64,6 +65,8 @@ export default class ApplicationInteractions {
|
|
|
64
65
|
joinMultiplayerDedicatedServer(gameCode: string): Promise<void>;
|
|
65
66
|
pauseGame(): Promise<void>;
|
|
66
67
|
unpauseGame(): Promise<void>;
|
|
68
|
+
moveToIslandId(islandId: IslandId): Promise<void>;
|
|
69
|
+
verifyIslandReferences(islandId: IslandId): Promise<void>;
|
|
67
70
|
getGameStateAsJson(): Promise<string>;
|
|
68
71
|
saveStateAndVerifyWithPrevious(): Promise<void>;
|
|
69
72
|
clearSavedStates(): void;
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
export default class ChromeDriver {
|
|
12
|
+
private readonly appId;
|
|
12
13
|
readonly port: number;
|
|
13
14
|
private process;
|
|
14
15
|
private exitHandler;
|
|
15
|
-
constructor();
|
|
16
|
+
constructor(appId: string);
|
|
16
17
|
start(): Promise<void>;
|
|
17
18
|
stop(): void;
|
|
18
19
|
}
|
package/package.json
CHANGED