@wayward/types 2.14.0-beta.dev.20231220.1 → 2.14.0-beta.dev.20231222.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.
@@ -227,7 +227,7 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
227
227
  detachStillContainer(human: Human): Item | undefined;
228
228
  displayItem(item: Item, equipType: EquipType): void;
229
229
  undisplayItem(human: Human, equipType: EquipType): Item | undefined;
230
- undisplayAllItems(human: Human, equip?: boolean): Item[];
230
+ undisplayAllItems(human: Human | undefined, equip?: boolean): Item[];
231
231
  get blocksMove(): boolean;
232
232
  update(ticks: number, playingHumans: Human[], playerHumanTiles: Set<Tile>): void;
233
233
  canCauseStatus(): boolean;
@@ -200,6 +200,7 @@ export default abstract class Human<TypeType extends number = number, EntityRefe
200
200
  removeTamedCreature(creature: Creature): boolean;
201
201
  resetMovementIntent(): void;
202
202
  createItemInInventory(itemType: ItemType | ItemTypeGroup | Array<ItemType | ItemTypeGroup>, quality?: Quality, updateTables?: boolean): Item;
203
+ cloneItemIntoInventory(itemToClone: Item, itemType?: ItemType, updateTables?: boolean): Item;
203
204
  damageRandomEquipment(): void;
204
205
  getDamageModifier(): number;
205
206
  calculateDamageAmount(attackType: AttackType, weapon?: Item, ammoItem?: Item): number;
@@ -424,6 +424,10 @@ export declare namespace ActionArgument {
424
424
  namespace ENUM {
425
425
  let ActionArgumentEnumClass: typeof ActionArgumentEnum;
426
426
  }
427
+ /**
428
+ * An action argument which is bit flags from the given enum. Performs validation.
429
+ */
430
+ function FLAGS<ENUM extends number, K extends string>(object: Record<K, ENUM>): ActionArgumentEnum<ENUM, K>;
427
431
  }
428
432
  export interface IActionArgumentTypeMap {
429
433
  [ActionArgument.Undefined]: undefined;
@@ -12,7 +12,8 @@ import type Entity from "@wayward/game/game/entity/Entity";
12
12
  import { ActionArgumentCustom } from "@wayward/game/game/entity/action/argument/ActionArgumentCustom";
13
13
  export default class ActionArgumentEnum<ENUM extends number, K extends string> extends ActionArgumentCustom<ENUM> {
14
14
  private readonly enumObject;
15
- constructor(enumObject: Record<K, ENUM>);
15
+ private readonly flags;
16
+ constructor(enumObject: Record<K, ENUM>, flags?: boolean);
16
17
  validate(executor: Entity | undefined, value: unknown): value is ENUM;
17
18
  read(): ENUM;
18
19
  write(executor: Entity | undefined, value: ENUM): void;
@@ -276,7 +276,7 @@ export default class Island extends EventEmitter.Host<IIslandEvents> implements
276
276
  * In manual turn mode, it will tick the humans stat timers & the game
277
277
  */
278
278
  passTurn(human: Human, turnType?: TurnTypeFlag, dueToAction?: boolean): void;
279
- fastForward(travelTime: number, multiplayerLoadingDescription?: MultiplayerLoadingDescription): Promise<void>;
279
+ fastForward(travelTime: number, tickFlags?: TickFlag, multiplayerLoadingDescription?: MultiplayerLoadingDescription): Promise<void>;
280
280
  /**
281
281
  * Collection of things to perform on each tick
282
282
  */
@@ -278,6 +278,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
278
278
  getMovementOptions(): IMoveToTileOptions | undefined;
279
279
  protected onMovementCompleted(movingData: IMovingData): void;
280
280
  setQuality(human: Human | undefined, quality?: Quality): void;
281
+ /**
282
+ * Get acceptable magical types based on item
283
+ */
281
284
  getValidMagicalProperties(): MagicalPropertyType[];
282
285
  addMagicalProperties(count: number, source?: string): boolean;
283
286
  rerollMagicalProperty(type: MagicalPropertyType, subType?: MagicalSubPropertySubTypes): boolean;
@@ -295,10 +298,20 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
295
298
  * @param magicalWorth Include the value of `MagicalPropertyType.Worth`, defaults to true
296
299
  */
297
300
  getWorth(human: Human | undefined, magicalWorth?: boolean): number;
301
+ /**
302
+ * Checks to see if the item is in a fire/hot thing
303
+ */
298
304
  canBurnPlayer(): boolean;
305
+ /**
306
+ * Get the base defense of an item plus its magical defense stat if applicable
307
+ */
299
308
  getBaseDefense(): number;
309
+ /**
310
+ * Returns the durability of the item based on the max durability to be used as a pseudo "charge"
311
+ */
300
312
  getDurabilityCharge(): number;
301
313
  revertFromDoodad(doodad: Doodad): void;
314
+ copyPropertiesFrom(fromItem: Item): void;
302
315
  getWeightCapacity(): number | undefined;
303
316
  /**
304
317
  * Returns the container weight reduction
@@ -306,6 +319,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
306
319
  * @returns 1 if there is no reducton or [-50% + magical storing values]
307
320
  */
308
321
  getContainerWeightReduction(container?: IContainer | undefined): number;
322
+ /**
323
+ * Can the item be refined based on disassembly items and minimum getWeight tables?
324
+ */
309
325
  canBeRefined(): boolean;
310
326
  getProducedTemperature(): number | undefined;
311
327
  postProcessDecay(): void;
@@ -360,7 +360,6 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
360
360
  getNPCFromInventoryContainer(containable: IContainable): NPC | undefined;
361
361
  getItemsByWeight(a: number, b: number): number;
362
362
  getItemsWeight(items: Item[]): number;
363
- copyProperties(toItem: Item, fromItem: Item): void;
364
363
  getCraftQualityBonus(item: Item, required?: boolean): number;
365
364
  /**
366
365
  * Returns `true` if the item type or item is filtered out from inventory/crafting/container dialogs.
@@ -166,6 +166,10 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
166
166
  * Opposite of isTileBlocked.
167
167
  */
168
168
  get isOpen(): boolean;
169
+ /**
170
+ * Check if the tile is water or not.
171
+ */
172
+ get isWater(): boolean;
169
173
  /**
170
174
  * Checks if the tile has terrain that blocks
171
175
  */
@@ -363,7 +367,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
363
367
  getTileInDirection(direction: Direction): Tile | undefined;
364
368
  getVariation(noTileDataOffset?: boolean): number;
365
369
  tilesInRange(range: number, includeCurrentTile?: boolean): Tile[];
366
- openTileInRange(range: number, includeCurrentTile?: boolean): Tile | undefined;
370
+ openTileInRange(range: number, includeCurrentTile?: boolean, excludeWater?: boolean): Tile | undefined;
367
371
  /**
368
372
  * Array version of tilesAround
369
373
  */