@wayward/types 2.14.0-beta.dev.20240612.1 → 2.14.0-beta.dev.20240617.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.
@@ -362,6 +362,10 @@ export interface IItemDescription extends IObjectDescription, IModdable, ITemper
362
362
  onContainerItemRemove?(container: Item & IContainer, items: Item[]): void;
363
363
  onCreate?(item: Item): void;
364
364
  onChangeInto?(item: Item, fromItemType: ItemType): void;
365
+ /**
366
+ * When this item (or as a doodad) is melted, item types that match this array in the disassembly object will be left behind
367
+ */
368
+ dropDissassemblyItemsOnMelt?: Array<ItemType | ItemTypeGroup>;
365
369
  }
366
370
  export interface IConsumeItemStat {
367
371
  stat: Stat;
@@ -29,7 +29,7 @@ import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
29
29
  import type NPC from "@wayward/game/game/entity/npc/NPC";
30
30
  import type Player from "@wayward/game/game/entity/player/Player";
31
31
  import type { IMobCheck, IslandId } from "@wayward/game/game/island/IIsland";
32
- import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag, ItemTypeExtra } from "@wayward/game/game/item/IItem";
32
+ import type { ContainerReference, DisplayableItemType, IConstructedInfo, IContainable, IContainer, IItemChangeIntoOptions, IItemDescription, IItemDisassembleResult, IItemDisassembly, IItemGetNameOptions, IItemUsed, IItemVehicle, IMagicalPropertyInfo, IItemMovementResult as IMoveToTileMobCheckResult, IMoveToTileOptions, ItemTag, ItemTypeExtra } from "@wayward/game/game/item/IItem";
33
33
  import { BookType, ContainerSort, ItemDamageResult, ItemType, ItemTypeGroup, ItemWeightChange, SYMBOL_CONTAINER_CACHED_REFERENCE } from "@wayward/game/game/item/IItem";
34
34
  import type { IPlaceOnTileOptions } from "@wayward/game/game/item/IItemManager";
35
35
  import ItemMapManager from "@wayward/game/game/item/ItemMapManager";
@@ -319,6 +319,12 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
319
319
  */
320
320
  getDurabilityCharge(): number;
321
321
  removeMagic(): void;
322
+ /**
323
+ * Reverts properties of an item from a disassembly item (IItemDisassembly)
324
+ * @param disassemblyItem Disassembly item to revert from
325
+ * @param placeOnTile Place the item on a tile after reverting if set to a tile
326
+ */
327
+ revertFromDisassembly(disassemblyItem: IItemDisassembly, placeOnTile?: Tile): void;
322
328
  revertFromDoodad(doodad: Doodad): void;
323
329
  copyPropertiesFrom(fromItem: Item): void;
324
330
  getWeightCapacity(): number | undefined;
@@ -466,6 +472,11 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
466
472
  * @returns number The base defense value.
467
473
  */
468
474
  getBaseDefenseWithBonus(): number;
475
+ /**
476
+ * When the item melts, it will leave behind items that are specified in the leaveDissassemblyItemsOnMelt property
477
+ * @param container The container to leave the items in or on
478
+ */
479
+ dropItemsOnMelt(container: IContainer): void;
469
480
  private checkIfItemsMatch;
470
481
  private checkIfItemArraysMatch;
471
482
  }
@@ -16,7 +16,7 @@ import type { ITemplate, TileTemplateType } from "@wayward/game/game/tile/ITerra
16
16
  import type Tile from "@wayward/game/game/tile/Tile";
17
17
  import Version from "@wayward/game/utilities/Version";
18
18
  export declare namespace MapGenHelpers {
19
- function pickBasedOnVersion<T>(version: Version.String, versions: MapGenVersions<T>): {
19
+ function pickBasedOnVersion<T>(targetVersion: Version.String, versions: MapGenVersions<T>): {
20
20
  version: Version.String;
21
21
  selection: T;
22
22
  };
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.14.0-beta.dev.20240612.1",
4
+ "version": "2.14.0-beta.dev.20240617.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",