@wayward/types 2.15.0-beta.dev.20250912.1 → 2.15.0-beta.dev.20250914.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.
@@ -662,6 +662,7 @@ export interface ICreateOnBreak {
662
662
  tileEventType?: TileEventType;
663
663
  itemType?: ItemType;
664
664
  excludeDamageTypes?: DamageType[];
665
+ disassemblyItem?: ItemType | ItemTypeGroup;
665
666
  }
666
667
  export type IDismantleComponent = Record<number, number>;
667
668
  export interface IItemChangeIntoOptions {
@@ -101,6 +101,7 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
101
101
  weight: number;
102
102
  private decay?;
103
103
  addOrder?: number[];
104
+ baseItem?: ItemType;
104
105
  bonusAttack?: number;
105
106
  bonusDefense?: number;
106
107
  book?: BookType;
@@ -126,7 +127,6 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
126
127
  vehicleFacingDirection?: Direction.Cardinal;
127
128
  weightCapacity?: number;
128
129
  weightFraction?: number;
129
- baseItem?: ItemType;
130
130
  /**
131
131
  * Includes merchant identifiers for each instance of the item being traded to/from the merchant.
132
132
  * (The property name is out of date.)
@@ -519,6 +519,12 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
519
519
  * Sets the base item type based on the disassembly items and the overlayItem property.
520
520
  */
521
521
  setBaseItemType(): void;
522
+ /**
523
+ * Gets the item type that should be returned when the item is used up or decays.
524
+ * @returns The item type that should be returned when the item is used up or decays, or ItemType.None if nothing should be returned.
525
+ */
526
+ getReturnType(): ItemType;
527
+ createReturnItem(returnType: ItemType, container?: IContainer): Item | undefined;
522
528
  private checkIfItemsMatch;
523
529
  private checkIfItemArraysMatch;
524
530
  }
@@ -20,7 +20,7 @@ declare enum Type {
20
20
  }
21
21
  type BackgroundIDTypeSuffix = "" | `-${Lowercase<keyof typeof Type>}`;
22
22
  type BackgroundIDQuality = Lowercase<Exclude<keyof typeof Quality, "None" | "Random">>;
23
- type BackgroundID = `default${BackgroundIDTypeSuffix}` | `quality-${BackgroundIDQuality}${BackgroundIDTypeSuffix}` | `damaged${BackgroundIDTypeSuffix}` | `trading${BackgroundIDTypeSuffix}` | "overlay" | "non-craftable" | "discovery-active" | "non-craftable-discovery";
23
+ type BackgroundID = `default${BackgroundIDTypeSuffix}` | `quality-${BackgroundIDQuality}${BackgroundIDTypeSuffix}` | `damaged${BackgroundIDTypeSuffix}` | `trading${BackgroundIDTypeSuffix}` | `overlay${BackgroundIDTypeSuffix}` | "non-craftable" | "discovery-active" | "non-craftable-discovery";
24
24
  export default class ItemStylesheetHandler {
25
25
  private readonly backgroundDefinitions;
26
26
  readonly editor: SpriteEditor;
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.15.0-beta.dev.20250912.1",
4
+ "version": "2.15.0-beta.dev.20250914.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",