@wayward/types 2.13.2-beta.dev.20230609.1 → 2.13.2-beta.dev.20230611.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/island/IIsland.d.ts +1 -0
- package/definitions/game/game/island/Island.d.ts +12 -3
- package/definitions/game/game/item/IItemManager.d.ts +1 -1
- package/definitions/game/game/mapping/Background.d.ts +1 -1
- package/definitions/game/game/mapping/DrawnMap.d.ts +3 -1
- package/definitions/game/game/mapping/Obfuscation.d.ts +1 -1
- package/definitions/game/language/dictionary/UiTranslation.d.ts +608 -609
- package/definitions/game/ui/component/dropdown/EnumDropdown.d.ts +1 -0
- package/definitions/game/ui/component/dropdown/IslandDropdown.d.ts +7 -2
- package/definitions/game/utilities/Version.d.ts +1 -1
- package/definitions/test/core/application.d.ts +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ export type IslandId = `${number},${number}`;
|
|
|
27
27
|
export declare module IslandPosition {
|
|
28
28
|
function toId(position: IVector2): IslandId;
|
|
29
29
|
function fromId(id: IslandId): IVector2 | undefined;
|
|
30
|
+
function isTransient(id: IslandId): boolean;
|
|
30
31
|
function calculateBaseSeed(x: number, y: number, initialSeed: number): number;
|
|
31
32
|
}
|
|
32
33
|
export interface IIslandEvents {
|
|
@@ -75,15 +75,25 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
75
75
|
readonly tileEvents: TileEventManager;
|
|
76
76
|
readonly time: TimeManager;
|
|
77
77
|
readonly world: World;
|
|
78
|
-
|
|
78
|
+
/**
|
|
79
|
+
* The version this island was originally made on
|
|
80
|
+
*/
|
|
81
|
+
version: Version.String;
|
|
82
|
+
/**
|
|
83
|
+
* The version the mapgen for this island uses
|
|
84
|
+
*/
|
|
85
|
+
mapGenVersion: Version.String;
|
|
86
|
+
/**
|
|
87
|
+
* The version this island was last loaded on
|
|
88
|
+
*/
|
|
79
89
|
saveVersion: Version.String;
|
|
90
|
+
saveBuildTime: number;
|
|
80
91
|
biomeType: BiomeTypes;
|
|
81
92
|
civilizationScore: number;
|
|
82
93
|
civilizationScoreTiles: Record<number, number>;
|
|
83
94
|
contaminatedWater: IWaterContamination[];
|
|
84
95
|
creatureSpawnTimer: number;
|
|
85
96
|
loadCount: number;
|
|
86
|
-
mapGenVersion: Version.String;
|
|
87
97
|
name?: string;
|
|
88
98
|
position: IVector2;
|
|
89
99
|
readonly mapSize: number;
|
|
@@ -92,7 +102,6 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
|
|
|
92
102
|
referenceId?: number;
|
|
93
103
|
templateBiomeOptions: ITemplateBiomeOptions | undefined;
|
|
94
104
|
tileContainers: ITileContainer[];
|
|
95
|
-
version: Version.String;
|
|
96
105
|
tileData: SaferNumberIndexedObject<SaferNumberIndexedObject<SaferNumberIndexedObject<ITileData[]>>>;
|
|
97
106
|
readonly seeds: ISeeds;
|
|
98
107
|
readonly seededRandom: Random<LegacySeededGenerator | PCGSeededGenerator>;
|
|
@@ -30,7 +30,7 @@ export interface IGetItemOptions {
|
|
|
30
30
|
* True to only include protected items if they pass an item.willBreakOnDamage() check.
|
|
31
31
|
* excludeProtectedItems must be set to true for this to work.
|
|
32
32
|
*/
|
|
33
|
-
includeProtectedItemsThatWillNotBreak: ActionType;
|
|
33
|
+
includeProtectedItemsThatWillNotBreak: ActionType | true;
|
|
34
34
|
/**
|
|
35
35
|
* Item will be ignored
|
|
36
36
|
*/
|
|
@@ -13,7 +13,7 @@ export type CanvasImage = HTMLImageElement | HTMLCanvasElement | ImageBitmap;
|
|
|
13
13
|
export default class MapBackground {
|
|
14
14
|
private readonly seed?;
|
|
15
15
|
private readonly canvas;
|
|
16
|
-
constructor(radius: number, seed?: Uint16Array | undefined);
|
|
16
|
+
constructor(radius: number, seed?: number | Uint16Array | undefined);
|
|
17
17
|
render(mapImage: CanvasImage, theme: DrawnMapTheme): Promise<HTMLCanvasElement>;
|
|
18
18
|
private lastTheme?;
|
|
19
19
|
private renderBackground;
|
|
@@ -23,6 +23,8 @@ import type { IPreSerializeCallback, IUnserializedCallback } from "save/serializ
|
|
|
23
23
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
24
24
|
import { IRange } from "utilities/math/Range";
|
|
25
25
|
import Sampler from "utilities/math/Sampler";
|
|
26
|
+
import { LegacySeededGenerator } from "utilities/random/generators/LegacySeededGenerator";
|
|
27
|
+
import { PCGSeededGenerator } from "utilities/random/generators/PCGSeededGenerator";
|
|
26
28
|
import type { Random } from "utilities/random/Random";
|
|
27
29
|
export declare enum DrawnMapType {
|
|
28
30
|
Treasure = 0,
|
|
@@ -103,7 +105,7 @@ export default class DrawnMap extends EventEmitter.Host<IDrawnMapEvents> impleme
|
|
|
103
105
|
*/
|
|
104
106
|
static initializeIslandTreasureMaps(island: Island, generationSettings: ITreasureMapGenerationSettings, mapGenOutput: IMapGenGenerateOutput): void;
|
|
105
107
|
static initializeIslandTreasureMapsDifferences(island: Island): void;
|
|
106
|
-
static plotRegion(island: Island, x: number, y: number, z: number, random?: Random
|
|
108
|
+
static plotRegion(island: Island, x: number, y: number, z: number, random?: Random<PCGSeededGenerator | LegacySeededGenerator>, map?: DrawnMap, radius?: number): DrawnMap;
|
|
107
109
|
private static plotTreasure;
|
|
108
110
|
private static findValidTreasureLocation;
|
|
109
111
|
private static getMapTile;
|
|
@@ -13,7 +13,7 @@ import type { DrawnMapTheme } from "game/mapping/IMapRender";
|
|
|
13
13
|
export default class Obfuscation {
|
|
14
14
|
private readonly seed?;
|
|
15
15
|
private readonly canvas;
|
|
16
|
-
constructor(radius: number, seed?: Uint16Array | undefined);
|
|
16
|
+
constructor(radius: number, seed?: number | Uint16Array | undefined);
|
|
17
17
|
obfuscate(mapImage: CanvasImage, obfuscation: number, theme: DrawnMapTheme): Promise<HTMLCanvasElement>;
|
|
18
18
|
private render;
|
|
19
19
|
}
|