@wayward/types 2.13.2-beta.dev.20230609.1 → 2.13.2-beta.dev.20230610.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.
@@ -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
- saveBuildTime?: number;
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>;
@@ -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, map?: DrawnMap, radius?: number): DrawnMap;
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
  }
@@ -27,6 +27,7 @@ export default class EnumDropdown<ENUM_OBJECT, OTHER_OPTIONS extends string | ne
27
27
  setExcluded(...excluded: VALUES[]): this;
28
28
  protected getTranslation(id: VALUES): import("../../../language/impl/TranslationImpl").default;
29
29
  protected filterEnum?(id: VALUES): boolean;
30
+ protected getEnumValues(enumObject: any): VALUES[];
30
31
  protected getOptions(enumObject: any): [VALUES, (option: Button) => Button][];
31
32
  protected getOptionTooltipLocation(handler: TooltipLocationHandler): void;
32
33
  protected optionTooltipInitializer?(tooltip: Tooltip, type: VALUES, translation: Translation): any;
@@ -9,15 +9,20 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { BiomeType } from "game/biome/IBiome";
12
- import type { IslandId } from "game/island/IIsland";
12
+ import { type IslandId } from "game/island/IIsland";
13
13
  import type { IDropdownOption } from "ui/component/Dropdown";
14
14
  import GroupDropdown from "ui/component/GroupDropdown";
15
+ import type Tooltip from "ui/tooltip/Tooltip";
15
16
  export default class IslandDropdown<OTHER_OPTIONS extends string = never> extends GroupDropdown<Record<string, string>, OTHER_OPTIONS, BiomeType> {
16
- constructor(defaultOption: string | OTHER_OPTIONS, options?: Iterable<IDropdownOption<OTHER_OPTIONS>>);
17
+ constructor(defaultOption: IslandId | OTHER_OPTIONS, options?: SupplierOr<Iterable<IDropdownOption<OTHER_OPTIONS>>>);
17
18
  protected getTranslation(islandId: IslandId): import("../../../language/impl/TranslationImpl").default;
18
19
  protected getGroupName(biome: BiomeType): string;
20
+ protected optionTooltipInitializer(tooltip: Tooltip, islandId: IslandId): Promise<void> | undefined;
19
21
  protected shouldIncludeOtherOptionsInGroupFilter(): boolean;
20
22
  protected isInGroup(islandId: IslandId, biome: BiomeType): boolean;
21
23
  protected getGroups(): BiomeType[];
24
+ protected getEnumValues(): string[];
22
25
  protected onRefresh(): void;
26
+ protected onAppend1(): void;
27
+ protected onLoadedOnIsland(): void;
23
28
  }
@@ -28,7 +28,7 @@ declare module Version {
28
28
  export type String = `${Stage}${bigint}.${bigint}.${bigint}` | `${Stage}${bigint}.${bigint}` | `${Stage}${bigint}`;
29
29
  export type StringSemVer = `${bigint}.${bigint}.${bigint}-${Stage}` | `${bigint}.${bigint}.${bigint}`;
30
30
  export type Month = "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | "sep" | "oct" | "nov" | "dec";
31
- export type DateString = `${Month} ${bigint} ${bigint} ${bigint}:${bigint | "00"}`;
31
+ export type DateString = `${Month} ${bigint} ${bigint} ${bigint | "00"}:${bigint | "00"}`;
32
32
  export const versionInfoRegExp: RegExp;
33
33
  export const versionInfoRegExpSemver: RegExp;
34
34
  /**
@@ -13,10 +13,10 @@ import type { Prompt } from "@wayward/game/game/meta/prompt/IPrompt";
13
13
  import type { ScreenId } from "@wayward/game/ui/screen/IScreen";
14
14
  import type { MenuId } from "@wayward/game/ui/screen/screens/menu/component/IMenu";
15
15
  import type { Random } from "@wayward/game/utilities/random/Random";
16
- import type { TestRunContext } from "@wayward/test/testRunner";
17
16
  import ApplicationInteractions from "@wayward/test/core/applicationInteractions";
18
17
  import type { Apps } from "@wayward/test/core/applicationManager";
19
18
  import type { IAppPaths } from "@wayward/test/interfaces";
19
+ import type { TestRunContext } from "@wayward/test/testRunner";
20
20
  export interface IApplicationOptions {
21
21
  additionalArgs?: string[];
22
22
  mods?: string[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.13.2-beta.dev.20230609.1",
4
+ "version": "2.13.2-beta.dev.20230610.2",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",