@wayward/types 2.11.3-beta.dev.20220112.1 → 2.11.3-beta.dev.20220116.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.
@@ -16,7 +16,7 @@ import type Human from "game/entity/Human";
16
16
  import type { AttackType } from "game/entity/IEntity";
17
17
  import type { ISkillEvents } from "game/entity/skill/SkillManager";
18
18
  import type { IHasImagePath, Quality } from "game/IObject";
19
- import type { BookType, ItemType } from "game/item/IItem";
19
+ import type { ItemType } from "game/item/IItem";
20
20
  import { RecipeLevel } from "game/item/IItem";
21
21
  import type Item from "game/item/Item";
22
22
  import { TempType } from "game/temperature/ITemperature";
@@ -65,7 +65,7 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
65
65
  * Called when a book is opened by a player
66
66
  * @param book The book that was opened
67
67
  */
68
- openBook?(book: BookType): void;
68
+ openBook?(item: Item): void;
69
69
  /**
70
70
  * Called when something is built on a tile
71
71
  * @param item The item used to build the object
@@ -158,7 +158,7 @@ export default class Player extends Human implements IUnserializedCallback {
158
158
  onNoInput(): void;
159
159
  updateTables(deferUpdate?: boolean): void;
160
160
  updateCraftTable(adjacentContainers?: IContainer[]): void;
161
- updateDismantleTable(adjacentContainers?: IContainer[]): void;
161
+ updateDismantleTable(adjacentContainers?: IContainer[], force?: boolean): void;
162
162
  updateWeight(source: string): void;
163
163
  updateTablesAndWeight(source: string, deferTableUpdates?: boolean): void;
164
164
  checkReputationMilestones(): void;
@@ -150,7 +150,11 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
150
150
  getDisassemblyWeight(): number;
151
151
  getDisassemblyItems(): IItemDisassembleResult | undefined;
152
152
  isNearby(executor: Entity, allowNearby?: boolean): boolean;
153
- verifyAndFixItem(): void;
153
+ /**
154
+ * Fixes item issues.
155
+ * Note: Be careful with what gets fixed in multiplayer! (when onlyRestoreIslandIds is set)
156
+ */
157
+ verifyAndFixItem(onlyRestoreIslandIds: boolean): void;
154
158
  /**
155
159
  * @param source A string representing the reason for this damage. Used for multiplayer debugging. Just put a unique string of characters here
156
160
  * @param modifier The amount of damage to take. Defaults to 1.
@@ -168,5 +168,9 @@ declare module Loading {
168
168
  */
169
169
  function waitForAll(): Promise<void>;
170
170
  function progress(load: Load, progress: number): Promise<void>;
171
+ /**
172
+ * Returns true if the load is running
173
+ */
174
+ function exists(load: Load): boolean;
171
175
  }
172
176
  export default Loading;