@wayward/types 2.12.1-beta.dev.20221006.1 → 2.12.1-beta.dev.20221007.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.
@@ -208,13 +208,14 @@ export declare enum TileUpdateType {
208
208
  DoodadRemove = 13,
209
209
  Item = 14,
210
210
  ItemDrop = 15,
211
- Mod = 16,
212
- NPC = 17,
213
- NPCSpawn = 18,
214
- Player = 19,
215
- Terrain = 20,
216
- TileEventManager = 21,
217
- Tilled = 22
211
+ ItemMovement = 16,
212
+ Mod = 17,
213
+ NPC = 18,
214
+ NPCSpawn = 19,
215
+ Player = 20,
216
+ Terrain = 21,
217
+ TileEventManager = 22,
218
+ Tilled = 23
218
219
  }
219
220
  export declare enum CreationId {
220
221
  Doodad = 0,
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2021 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type { IBiomeMapGen } from "game/mapgen/IMapGen";
12
+ export declare const coastalMapGen2121: IBiomeMapGen;
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2011-2021 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type { IBiomeMapGen } from "game/mapgen/IMapGen";
12
+ export declare const iceCapMapGen2121: IBiomeMapGen;
@@ -187,7 +187,7 @@ export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements
187
187
  getDefaultDurability(random?: import("../../utilities/random/Random").Random<import("../../utilities/random/Random").SeededGenerator>): number;
188
188
  addTreasureChestLoot(): void;
189
189
  attachStillContainer(item: Item): void;
190
- detachStillContainer(human?: Human): Item | undefined;
190
+ detachStillContainer(human: Human): Item | undefined;
191
191
  blocksMove(): boolean;
192
192
  update(ticks: number, playingHumans: Human[], updatesPerTick?: number): void;
193
193
  canCauseStatus(): boolean;
@@ -399,7 +399,9 @@ export interface IItemReturn {
399
399
  }
400
400
  export interface IMoveToTileOptions {
401
401
  fromPoint?: IVector3;
402
+ fromPointApplyPlayerOffset?: boolean;
402
403
  toPoint: IVector3;
404
+ toPointApplyPlayerOffset?: boolean;
403
405
  toContainer?: IContainer;
404
406
  toContainerOptions?: IAddToContainerOptions;
405
407
  beforeMovement?: IMoveToTileBeforeMovementOptions;
@@ -414,6 +416,7 @@ export interface IMoveToTileBeforeMovementOptions {
414
416
  export interface IMoveToTileAfterMovementOptions {
415
417
  soundEffect?: SfxType;
416
418
  particles?: IRGB;
419
+ updateTileLayer?: boolean;
417
420
  }
418
421
  export interface IRecipe {
419
422
  baseComponent?: ItemType | ItemTypeGroup;
@@ -226,7 +226,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
226
226
  * @returns True if the movement is happening, false if it wasn't able to move
227
227
  */
228
228
  moveToTile(options: IMoveToTileOptions): boolean;
229
- isMoving(): boolean;
229
+ isMoving(): IMoveToTileOptions | undefined;
230
230
  getMovementProgress(timeStamp: number): number;
231
231
  setQuality(human: Human | undefined, quality?: Quality): void;
232
232
  getValidMagicalProperties(): MagicalPropertyType[];
@@ -16,7 +16,7 @@ import type NPC from "game/entity/npc/NPC";
16
16
  import type Player from "game/entity/player/Player";
17
17
  import { CreationId } from "game/IGame";
18
18
  import { Quality } from "game/IObject";
19
- import type { ContainerReference, IContainable, IContainer, IItemDescription, IItemWeightComponent, IRecipe } from "game/item/IItem";
19
+ import type { ContainerReference, IContainable, IContainer, IItemDescription, IItemWeightComponent, IMoveToTileOptions, IRecipe } from "game/item/IItem";
20
20
  import { CraftResult, ItemType, ItemTypeGroup } from "game/item/IItem";
21
21
  import type { IAddToContainerOptions, IDoodadsUsed, IGetBestItemsOptions, IGetItemOptions, IGetItemsOptions, IRequirementInfo } from "game/item/IItemManager";
22
22
  import { ContainerReferenceSource, CraftStatus, ICraftResultChances, WeightType } from "game/item/IItemManager";
@@ -144,15 +144,16 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
144
144
  moveAllFromContainerToInventory(human: Human, container: IContainer, ofQuality?: Quality): Item[];
145
145
  computeContainerWeight(container: IContainer): number;
146
146
  getMagicalWeightCapacity(container: IContainer): number;
147
- moveAllFromContainerToContainer(human: Human | undefined, fromContainer: IContainer, toContainer: IContainer, itemType?: ItemType | undefined, ofQuality?: Quality | undefined, checkWeight?: boolean, filterText?: string | undefined, onMoveItem?: (item: Item) => void): Item[];
147
+ moveAllFromContainerToContainer(human: Human | undefined, fromContainer: IContainer, toContainer: IContainer, itemType?: ItemType | undefined, ofQuality?: Quality | undefined, checkWeight?: boolean, filterText?: string | undefined, onMoveItem?: (item: Item) => void, moveToTileOptions?: IMoveToTileOptions): Item[];
148
148
  /**
149
149
  * Moves an item into a container when the container has enough room for it
150
150
  * @param human Human causing the item movement
151
151
  * @param item Item to move
152
152
  * @param container Container to move the item to
153
+ * @param moveToTileOptions When set, the movement will be animated
153
154
  * @returns True if the item was moved, false if it wasn't
154
155
  */
155
- moveToContainer(human: Human | undefined, item: Item, container: IContainer, animateToTarget?: IVector3): boolean;
156
+ moveToContainer(human: Human | undefined, item: Item, container: IContainer, moveToTileOptions?: IMoveToTileOptions): boolean;
156
157
  hasRoomInContainer(targetContainer: IContainer, itemToMove: Item): boolean;
157
158
  /**
158
159
  * Gets the name of a container
@@ -15,9 +15,7 @@ import type MapGenHelpers from "game/mapgen/MapGenHelpers";
15
15
  import type { Load } from "game/meta/Loading";
16
16
  import type { TileTemplateType } from "game/tile/ITerrain";
17
17
  import type { IVector3 } from "utilities/math/IVector";
18
- export declare type MapGenVersions<T> = Descriptions<number, T> & {
19
- latest: [string, T];
20
- };
18
+ export declare type MapGenVersions<T> = Descriptions<string, T>;
21
19
  export interface IMapGen {
22
20
  generateWorld(options: IMapGenOptions): void;
23
21
  }
@@ -15,7 +15,10 @@ import type { MapGenVersions } from "game/mapgen/IMapGen";
15
15
  import type { ITile, TileTemplateType } from "game/tile/ITerrain";
16
16
  import type { TileEventType } from "game/tile/ITileEvent";
17
17
  export declare module MapGenHelpers {
18
- function pickBasedOnVersion<T>(version: string, versions: MapGenVersions<T>): [string, T];
18
+ function pickBasedOnVersion<T>(version: string, versions: MapGenVersions<T>): {
19
+ version: string;
20
+ selection: T;
21
+ };
19
22
  function startLoading(): Promise<void>;
20
23
  function setFinishedLoading(): void;
21
24
  function spawnTileEvent(island: Island, type: TileEventType, x: number, y: number, z: number): void;
@@ -0,0 +1,16 @@
1
+ /*!
2
+ * Copyright 2011-2021 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import type IMapGen from "game/mapgen/IMapGen";
12
+ import type { IMapGenOptions } from "game/mapgen/IMapGen";
13
+ export default class MapGen2121 implements IMapGen {
14
+ generateWorld({ island, generateNewWorld, biomeType, mapGenVersion, load, loadArgs }: IMapGenOptions): void;
15
+ private setupTiles;
16
+ }
@@ -25,13 +25,17 @@ export default class World extends EventEmitter.Host<IWorldEvents> implements IS
25
25
  layers: Record<number, WorldLayer>;
26
26
  _loaded: boolean;
27
27
  private batchTileUpdate;
28
+ private layerUpdatesSuspended;
28
29
  constructor(island: Island, width: number, height: number);
29
30
  delete(): void;
30
31
  get loaded(): boolean;
31
32
  toLocal(world: number, local: number): number;
32
33
  addLayer(level: WorldZ): void;
33
34
  load(): void;
35
+ suspendLayerUpdates(): void;
36
+ resumeLayerUpdates(): void;
34
37
  updateTile(x: number, y: number, z: number, tile: ITile, tileUpdateType: TileUpdateType, updateNeighbors?: boolean, flush?: boolean): void;
38
+ updateTileLayer(x: number, y: number, z: number, tile: ITile, updateNeighbors?: boolean, flush?: boolean): void;
35
39
  startUpdateTileBatch(): void;
36
40
  endUpdateTileBatch(): void;
37
41
  serializeObject(_serializer: ISerializer): undefined;
@@ -19,6 +19,8 @@ export interface IVersionInfo {
19
19
  date?: Date;
20
20
  }
21
21
  declare module Version {
22
+ const versionInfoRegExp: RegExp;
23
+ const versionInfoRegExpSemver: RegExp;
22
24
  /**
23
25
  * Returns whether the given version is compatible with the game's version. This is used to check, for example,
24
26
  * if a mod is compatible with the game's version.
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.12.1-beta.dev.20221006.1",
4
+ "version": "2.12.1-beta.dev.20221007.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",