@wayward/types 2.11.0-beta.dev.20211210.2 → 2.11.0-beta.dev.20211212.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/cplusplus/index.d.ts +12 -1
- package/definitions/game/game/Game.d.ts +2 -0
- package/definitions/game/game/doodad/Doodad.d.ts +1 -5
- package/definitions/game/game/doodad/IDoodad.d.ts +4 -3
- package/definitions/game/game/entity/flowfield/FlowField.d.ts +16 -9
- package/definitions/game/game/entity/flowfield/FlowFieldManager.d.ts +2 -1
- package/definitions/game/game/island/Island.d.ts +4 -0
- package/definitions/game/game/item/IItem.d.ts +9 -3
- package/definitions/game/language/dictionary/Message.d.ts +459 -459
- package/definitions/game/multiplayer/IMultiplayer.d.ts +43 -34
- package/definitions/game/save/ISaveManager.d.ts +1 -1
- package/definitions/game/save/serializer/ISerializer.d.ts +1 -1
- package/definitions/game/save/serializer/Serializer.d.ts +1 -1
- package/definitions/game/save/serializer/StringTokenizer.d.ts +2 -4
- package/definitions/game/steamworks/ISteamworks.d.ts +2 -1
- package/definitions/game/ui/Ui.d.ts +0 -3
- package/definitions/game/ui/UiExperiments.d.ts +1 -2
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/utilities/game/TileHelpers.d.ts +1 -5
- package/definitions/test/core/applicationManager.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,12 +16,13 @@ export interface IWaywardCPP {
|
|
|
16
16
|
ByteGrid: IByteGridConstructor;
|
|
17
17
|
DijkstraMap: IDijkstraMapConstructor;
|
|
18
18
|
FieldOfView: any;
|
|
19
|
-
FlowField:
|
|
19
|
+
FlowField: IFlowFieldConstructor;
|
|
20
20
|
Game: IWaywardCPPGame;
|
|
21
21
|
KDTree: IKDTreeConstructor;
|
|
22
22
|
Navigation: INavigationConstructor;
|
|
23
23
|
WorldLayer: IWorldLayerConstructor;
|
|
24
24
|
}
|
|
25
|
+
export declare type IFlowFieldConstructor = new (x: number, y: number, size: number, z: number, moveType: number) => IWaywardCPPFlowField;
|
|
25
26
|
export declare type IByteGridConstructor = new (width: number, height: number) => IByteGrid;
|
|
26
27
|
export declare type IBitGridConstructor = new (count: number) => IBitGrid;
|
|
27
28
|
export declare type IDijkstraMapConstructor = new () => IDijkstraMap;
|
|
@@ -31,6 +32,16 @@ export declare type IWorldLayerConstructor = new (width: number, height: number,
|
|
|
31
32
|
export interface IWaywardCPPGame {
|
|
32
33
|
setMapSize(size: number): void;
|
|
33
34
|
}
|
|
35
|
+
export interface IWaywardCPPFlowField {
|
|
36
|
+
delete(): void;
|
|
37
|
+
reset(): void;
|
|
38
|
+
getFlowField(): Uint8Array;
|
|
39
|
+
getPenaltyField(): Uint8Array;
|
|
40
|
+
getFieldValue(x: number, y: number): number | undefined;
|
|
41
|
+
prepareUpdate(): void;
|
|
42
|
+
addPlayer(x: number, y: number): void;
|
|
43
|
+
finalizeUpdate(): void;
|
|
44
|
+
}
|
|
34
45
|
export interface IByteGrid {
|
|
35
46
|
width: number;
|
|
36
47
|
height: number;
|
|
@@ -33,6 +33,7 @@ import type ITextureDebugRenderer from "renderer/ITextureDebugRenderer";
|
|
|
33
33
|
import type WebGlContext from "renderer/WebGlContext";
|
|
34
34
|
import ReplayManager from "replay/ReplayManager";
|
|
35
35
|
import type { IOptions } from "save/data/ISaveDataGlobal";
|
|
36
|
+
import type StringTokenizer from "save/serializer/StringTokenizer";
|
|
36
37
|
import ItemStylesheetHandler from "ui/screen/screens/game/util/item/ItemStylesheet";
|
|
37
38
|
import type { IVersionInfo } from "utilities/Version";
|
|
38
39
|
export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
@@ -78,6 +79,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
78
79
|
private queueDedicatedServerFovUpdate?;
|
|
79
80
|
private gameOptionsCached?;
|
|
80
81
|
private synchronizeStateId;
|
|
82
|
+
protected stringTokenizer: StringTokenizer | undefined;
|
|
81
83
|
initializeRenderer(): void;
|
|
82
84
|
globalSlotReady(): void;
|
|
83
85
|
/**
|
|
@@ -264,11 +264,7 @@ export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements
|
|
|
264
264
|
/**
|
|
265
265
|
* Gives civilization score based on how much is defined for this doodad.
|
|
266
266
|
*/
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
* Reduces civilization score based on how much is defined for this doodad.
|
|
270
|
-
*/
|
|
271
|
-
reduceCivilizationScore(): void;
|
|
267
|
+
changeCivilizationScore(add: boolean): void;
|
|
272
268
|
/**
|
|
273
269
|
* Decay over time
|
|
274
270
|
*/
|
|
@@ -77,7 +77,7 @@ export interface IDoodadDescription extends IObjectDescription, IModdable, ICaus
|
|
|
77
77
|
isDoor?: boolean;
|
|
78
78
|
isFence?: boolean;
|
|
79
79
|
isFlammable?: boolean;
|
|
80
|
-
|
|
80
|
+
usesSpores?: boolean;
|
|
81
81
|
isGate?: boolean;
|
|
82
82
|
isTall?: boolean;
|
|
83
83
|
isTrap?: boolean;
|
|
@@ -280,13 +280,14 @@ export declare enum DoodadType {
|
|
|
280
280
|
Tanglehead = 121,
|
|
281
281
|
StrawScarecrow = 122,
|
|
282
282
|
CactusScarecrow = 123,
|
|
283
|
-
PapayaTree = 124
|
|
283
|
+
PapayaTree = 124,
|
|
284
|
+
Palapalai = 125
|
|
284
285
|
}
|
|
285
286
|
/**
|
|
286
287
|
* All tree types that can be spawned during map gen
|
|
287
288
|
* !! This must be kept in sync with the tree list in setupTiles !!
|
|
288
289
|
*/
|
|
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;
|
|
290
|
+
export declare type MapGenDoodadTrees = DoodadType.MapleTree | DoodadType.CoconutTree | DoodadType.JoshuaTree | DoodadType.SpruceTree | DoodadType.CypressTree | DoodadType.AppleTree | DoodadType.SpruceTreeWithSnow | DoodadType.WhitePineTree | DoodadType.WhitePineTreeWithSnow | DoodadType.PapayaTree | DoodadType.Palapalai;
|
|
290
291
|
export declare enum DoodadTypeGroup {
|
|
291
292
|
Invalid = 400,
|
|
292
293
|
LitCampfire = 401,
|
|
@@ -10,26 +10,33 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { MoveType } from "game/entity/IEntity";
|
|
12
12
|
import type Player from "game/entity/player/Player";
|
|
13
|
-
import type { IPreSerializeCallback
|
|
14
|
-
export default class FlowField implements IPreSerializeCallback
|
|
15
|
-
x: number;
|
|
16
|
-
y: number;
|
|
17
|
-
z: number;
|
|
18
|
-
size: number;
|
|
19
|
-
moveType: MoveType;
|
|
13
|
+
import type { IPreSerializeCallback } from "save/serializer/ISerializer";
|
|
14
|
+
export default class FlowField implements IPreSerializeCallback {
|
|
15
|
+
readonly x: number;
|
|
16
|
+
readonly y: number;
|
|
17
|
+
readonly z: number;
|
|
18
|
+
readonly size: number;
|
|
19
|
+
readonly moveType: MoveType;
|
|
20
20
|
encodedFlowField: Uint32Array | undefined;
|
|
21
21
|
encodedPenaltyField: Uint32Array | undefined;
|
|
22
22
|
private instance;
|
|
23
23
|
private flowField;
|
|
24
24
|
private penaltyField;
|
|
25
25
|
constructor(x: number | undefined, y: number, z: number, size: number, moveType: MoveType);
|
|
26
|
+
toString(): string;
|
|
26
27
|
preSerializeObject(): void;
|
|
27
|
-
|
|
28
|
+
load(): void;
|
|
29
|
+
unload(): void;
|
|
28
30
|
getZ(): number;
|
|
29
|
-
delete(): void;
|
|
30
31
|
getHashCodes(): string[];
|
|
31
32
|
getFieldValue(x: number, y: number): number;
|
|
32
33
|
updateField(flowFieldPlayers: Player[]): void;
|
|
33
34
|
resetPenalty(gridIndex: number): void;
|
|
34
35
|
reset(): void;
|
|
36
|
+
/**
|
|
37
|
+
* The pointer to the views might change when emscripten grows memory
|
|
38
|
+
* So we need to refetch it sometimes
|
|
39
|
+
* The array length is 0 when the view is invalid
|
|
40
|
+
*/
|
|
41
|
+
private updateViews;
|
|
35
42
|
}
|
|
@@ -24,13 +24,14 @@ export default class FlowFieldManager {
|
|
|
24
24
|
private _flowFieldPlayers;
|
|
25
25
|
constructor(island: Island, size: number);
|
|
26
26
|
private get flowFieldPlayers();
|
|
27
|
+
load(): void;
|
|
28
|
+
unload(): void;
|
|
27
29
|
/**
|
|
28
30
|
* Remove the player from the flow field when they leave the game
|
|
29
31
|
* Using preRemove because we are relying on the player id
|
|
30
32
|
*/
|
|
31
33
|
protected onPlayerIdChanged(player: Player, currentId: number, newId: number, isAbsentPlayer: boolean): void;
|
|
32
34
|
protected onMoveToIsland(player: Player, oldIsland: Island): void;
|
|
33
|
-
delete(): void;
|
|
34
35
|
setDelegate(delegate: DebugRendererDelegate): void;
|
|
35
36
|
getWidth(): number;
|
|
36
37
|
getHeight(): number;
|
|
@@ -238,6 +238,10 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
238
238
|
* @param point x/y/z of the water tile created.
|
|
239
239
|
*/
|
|
240
240
|
contaminateWater(point: IVector3): void;
|
|
241
|
+
/**
|
|
242
|
+
* Gives civilization score based on how much is defined for this tile's terrain.
|
|
243
|
+
*/
|
|
244
|
+
changeCivilizationScore(score: number, source: string): void;
|
|
241
245
|
processTickFlags(tickFlag: TickFlag, ticks: number, realPlayers: Player[]): void;
|
|
242
246
|
processTickFlagsAsync(tickFlag: TickFlag, ticks: number, realPlayers: Player[], onProgress: (progess: number) => Promise<void>): Promise<void>;
|
|
243
247
|
private updateEntityFov;
|
|
@@ -1082,7 +1082,11 @@ export declare enum ItemType {
|
|
|
1082
1082
|
ClothTrousers = 623,
|
|
1083
1083
|
UnripePapaya = 624,
|
|
1084
1084
|
Papaya = 625,
|
|
1085
|
-
PapayaSeeds = 626
|
|
1085
|
+
PapayaSeeds = 626,
|
|
1086
|
+
PalapalaiFrond = 627,
|
|
1087
|
+
PalapalaiSpores = 628,
|
|
1088
|
+
ButtonMushroomSpores = 629,
|
|
1089
|
+
FlyAmanitaSpores = 630
|
|
1086
1090
|
}
|
|
1087
1091
|
export declare enum ItemTypeGroup {
|
|
1088
1092
|
Invalid = 800,
|
|
@@ -1178,7 +1182,9 @@ export declare enum ItemTypeGroup {
|
|
|
1178
1182
|
Shirt = 890,
|
|
1179
1183
|
Trousers = 891,
|
|
1180
1184
|
Spine = 892,
|
|
1181
|
-
|
|
1182
|
-
|
|
1185
|
+
Spores = 893,
|
|
1186
|
+
Stick = 894,
|
|
1187
|
+
All = 895,
|
|
1188
|
+
Last = 896
|
|
1183
1189
|
}
|
|
1184
1190
|
export {};
|