@wayward/types 2.12.0-beta.dev.20221005.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.
@@ -49,18 +49,20 @@ export declare enum SfxType {
49
49
  Trample = 22,
50
50
  TreeHit = 23,
51
51
  UiActivate = 24,
52
- UiClose = 25,
53
- UiDisable = 26,
54
- UiEnable = 27,
55
- UiInput = 28,
56
- UiInputdelete = 29,
57
- UiInvalid = 30,
58
- UiOpen = 31,
59
- UiProtect = 32,
60
- UiSelect = 33,
61
- UiUnprotect = 34,
62
- Walk = 35,
63
- Water = 36
52
+ UiChoose = 25,
53
+ UiClose = 26,
54
+ UiDisable = 27,
55
+ UiEnable = 28,
56
+ UiInput = 29,
57
+ UiInputdelete = 30,
58
+ UiInvalid = 31,
59
+ UiOpen = 32,
60
+ UiOpensmall = 33,
61
+ UiProtect = 34,
62
+ UiSelect = 35,
63
+ UiUnprotect = 36,
64
+ Walk = 37,
65
+ Water = 38
64
66
  }
65
67
  export declare type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
66
68
  export declare enum Music {
@@ -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;
@@ -19,6 +19,7 @@ import type { Stat } from "game/entity/IStats";
19
19
  import type { IDecayTemperatureRange } from "game/IGame";
20
20
  import type { IObjectDescription, Quality } from "game/IObject";
21
21
  import type { IslandId } from "game/island/IIsland";
22
+ import type { IAddToContainerOptions } from "game/item/IItemManager";
22
23
  import type Item from "game/item/Item";
23
24
  import type Recipe from "game/item/recipe/Recipe";
24
25
  import type MagicalPropertyManager from "game/magic/MagicalPropertyManager";
@@ -398,9 +399,15 @@ export interface IItemReturn {
398
399
  }
399
400
  export interface IMoveToTileOptions {
400
401
  fromPoint?: IVector3;
402
+ fromPointApplyPlayerOffset?: boolean;
401
403
  toPoint: IVector3;
404
+ toPointApplyPlayerOffset?: boolean;
402
405
  toContainer?: IContainer;
406
+ toContainerOptions?: IAddToContainerOptions;
403
407
  beforeMovement?: IMoveToTileBeforeMovementOptions;
408
+ /**
409
+ * Note: Everything done in afterMovement must be clientside only
410
+ */
404
411
  afterMovement?: IMoveToTileAfterMovementOptions;
405
412
  }
406
413
  export interface IMoveToTileBeforeMovementOptions {
@@ -409,6 +416,7 @@ export interface IMoveToTileBeforeMovementOptions {
409
416
  export interface IMoveToTileAfterMovementOptions {
410
417
  soundEffect?: SfxType;
411
418
  particles?: IRGB;
419
+ updateTileLayer?: boolean;
412
420
  }
413
421
  export interface IRecipe {
414
422
  baseComponent?: ItemType | ItemTypeGroup;
@@ -100,6 +100,7 @@ export interface IPlaceOnTileOptions {
100
100
  force?: boolean;
101
101
  skipMessage?: boolean;
102
102
  skipTileUpdate?: boolean;
103
+ animate?: boolean;
103
104
  }
104
105
  export declare enum ContainerReferenceSource {
105
106
  ContainerWeightReduction = 0,
@@ -220,8 +220,13 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
220
220
  getPoint(): import("../../utilities/math/Vector3").default | undefined;
221
221
  dropInWater(human: Human, x?: number, y?: number, skipParticles?: boolean): void;
222
222
  placeOnTile(x: number, y: number, z: number, options?: IPlaceOnTileOptions): boolean;
223
- moveToTile(options: IMoveToTileOptions): void;
224
- isMoving(): boolean;
223
+ /**
224
+ * Moves an item to a target point / container while animating it
225
+ * @param options Movement options
226
+ * @returns True if the movement is happening, false if it wasn't able to move
227
+ */
228
+ moveToTile(options: IMoveToTileOptions): boolean;
229
+ isMoving(): IMoveToTileOptions | undefined;
225
230
  getMovementProgress(timeStamp: number): number;
226
231
  setQuality(human: Human | undefined, quality?: Quality): void;
227
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,8 +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[];
148
- moveToContainer(human: Human | undefined, item: Item, container: IContainer): boolean;
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
+ /**
149
+ * Moves an item into a container when the container has enough room for it
150
+ * @param human Human causing the item movement
151
+ * @param item Item to move
152
+ * @param container Container to move the item to
153
+ * @param moveToTileOptions When set, the movement will be animated
154
+ * @returns True if the item was moved, false if it wasn't
155
+ */
156
+ moveToContainer(human: Human | undefined, item: Item, container: IContainer, moveToTileOptions?: IMoveToTileOptions): boolean;
149
157
  hasRoomInContainer(targetContainer: IContainer, itemToMove: Item): boolean;
150
158
  /**
151
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
+ }