@wayward/types 2.11.3-beta.dev.20220112.1 → 2.11.3-beta.dev.20220113.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;
@@ -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;
@@ -39,9 +39,8 @@ export default class OldUi {
39
39
  isOptionsOverlayEnabled(): boolean;
40
40
  tooltipRefresh(): void;
41
41
  updateCraftingDialog(craftableItemTypes: ItemType[], nonCraftableItemTypes: ItemType[]): void;
42
- updateDismantleTab(dismantleItems: IDismantleComponent): void;
42
+ updateDismantleTab(dismantleItems: IDismantleComponent, force?: boolean): void;
43
43
  filterContainers(): void;
44
- invalidateTableTargets(): void;
45
44
  getInventoryItemOrder(): any[];
46
45
  updateItem(item: Item, updateChildren?: boolean): void;
47
46
  syncDecayBar(item: Item, syncDamage?: boolean): void;
@@ -69,7 +68,6 @@ export default class OldUi {
69
68
  addItemToContainer(item: Item, container: IContainer, internal?: boolean, isAddingMultipleItems?: boolean, updateTables?: boolean): void;
70
69
  afterAddingMultipleItemsToContainer(container: IContainer): void;
71
70
  removeItemFromContainer(item: Item, container: IContainer): void;
72
- updateInventorySort(): void;
73
71
  getDialogInfo(dialogId: DialogId): IDialogInfo;
74
72
  setVersionExtra(msg: string): void;
75
73
  openDialogs(): void;
@@ -89,6 +89,7 @@ export default class InGameScreen extends BaseScreen {
89
89
  private lastGlobalMouseInfo;
90
90
  private craftableItemTypes;
91
91
  private nonCraftableItemTypes;
92
+ private dismantleItems;
92
93
  private craftingDialogDirty;
93
94
  constructor();
94
95
  selector(): string;
@@ -142,7 +143,7 @@ export default class InGameScreen extends BaseScreen {
142
143
  refreshQuickSlots(): void;
143
144
  getInventoryItemsInOrder(): any[];
144
145
  loadQuickSlots(): void;
145
- saveItemOrder(containerElement: JQuery): void;
146
+ saveItemOrder(containerElement: JQuery, activeSort?: boolean): void;
146
147
  showItemContextMenu(element: JQuery, skipSound?: boolean): void;
147
148
  onContextMenuAction(element: JQuery, action: IContextMenuAction, toElement?: JQuery): void;
148
149
  runContextMenuItemAction(itemId: number, action: IContextMenuAction, skipSound?: boolean, usedFromQuickSlot?: boolean, itemTypeBypass?: ItemType): boolean;
@@ -174,7 +175,7 @@ export default class InGameScreen extends BaseScreen {
174
175
  setEquipSlot(equip: EquipType, itemId?: number, internal?: boolean): void;
175
176
  removeItemFromEquipSlot(equip: EquipType): void;
176
177
  updateCraftingDialog(craftableItemTypes: ItemType[], nonCraftableItemTypes: ItemType[]): void;
177
- updateDismantleTab(dismantleItems: IDismantleComponent): void;
178
+ updateDismantleTab(dismantleItems: IDismantleComponent, force?: boolean): void;
178
179
  createCraftItemElements(containerSortInfo: IContainerSortInfo): void;
179
180
  updateItem(item: Item, updateChildren?: boolean): void;
180
181
  onGlobalMouseMove(mouseInfo: GlobalMouseInfo, _: Vector2): void;
@@ -218,13 +219,12 @@ export default class InGameScreen extends BaseScreen {
218
219
  */
219
220
  filterContainers(): void;
220
221
  /**
221
- * Invalidates and updates mouse targets when crafting/dismantle table updates are called whether or not tables updates are defered.
222
+ * Invalidates and updates mouse targets when mouse is inside crafting/dismantle containers
222
223
  */
223
224
  invalidateTableTargets(): void;
224
225
  showSortContextMenu(element: JQuery, container: JQuery, messageType: Message): void;
225
226
  getContainerId(containerElement: JQuery): string;
226
- sortItems(containerElement: JQuery, sortType: SortType, messageType?: Message, canReverse?: boolean): void;
227
- updateInventorySort(): void;
227
+ sortItems(containerElement: JQuery, sortType: SortType, messageType?: Message, canReverse?: boolean, activeSort?: boolean): void;
228
228
  onUpdateContainer(containerElement: JQuery, activeSort: boolean): void;
229
229
  updateSort(containerElement: JQuery, activeSort: boolean): void;
230
230
  isContainerDialogOver(x: number, y: number): boolean;
@@ -13,7 +13,6 @@ import type Player from "game/entity/player/Player";
13
13
  import type { Game } from "game/Game";
14
14
  import { TickFlag } from "game/IGame";
15
15
  import type Island from "game/island/Island";
16
- import type { BookType } from "game/item/IItem";
17
16
  import type Item from "game/item/Item";
18
17
  import DrawnMap from "game/mapping/DrawnMap";
19
18
  import Component from "ui/component/Component";
@@ -74,7 +73,7 @@ export default class GameScreen extends Screen {
74
73
  */
75
74
  private refreshRespawnButton;
76
75
  onExploreAsGhost(): void;
77
- onOpenBook(human: Human, book: BookType): void;
76
+ onOpenBook(human: Human, item: Item): void;
78
77
  protected onReadMap1(map: DrawnMap, item: Item, reader: Human): void;
79
78
  protected onSailOffMapEdge(player: Player, direction: Direction): void;
80
79
  protected onDie(player: Player, showingGameEndScreen: boolean): void;
@@ -8,13 +8,19 @@
8
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
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { BookType } from "game/item/IItem";
11
+ import type Player from "game/entity/player/Player";
12
+ import type Item from "game/item/Item";
12
13
  import Dialog from "ui/screen/screens/game/component/Dialog";
13
14
  export default class BookDialog extends Dialog {
15
+ private item?;
14
16
  private book?;
15
17
  private readonly text;
16
18
  constructor();
17
19
  getName(): import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/dictionary/UiTranslation").default | import("../../../../../language/impl/TranslationImpl").default | Iterable<import("../../../../../utilities/string/Interpolator").IStringSection> | undefined;
18
- setBook(book: BookType): void;
20
+ openBook(item: Item): void;
19
21
  private getText;
22
+ protected onInventoryItemRemove(_: any, item: Item): void;
23
+ protected onInventoryItemUpdate(_: any, item: Item): void;
24
+ protected onPostMove(player: Player): void;
25
+ private closeIfItemIsGone;
20
26
  }
@@ -47,7 +47,6 @@ export default class Application extends ApplicationInteractions {
47
47
  readonly basePath: string;
48
48
  readonly userDataDirectory: string;
49
49
  private readonly chromeDriver;
50
- private readonly remoteOptions;
51
50
  manager: Apps;
52
51
  private screenshotPath;
53
52
  private heapSnapshotPath;
@@ -66,4 +65,5 @@ export default class Application extends ApplicationInteractions {
66
65
  requestHeapSnapshot(heapSnapshotPath: string): void;
67
66
  requestVideo(videoPath: string): void;
68
67
  private recordVideoFrame;
68
+ private configureDirectories;
69
69
  }
@@ -13,10 +13,9 @@ export default class ChromeDriver {
13
13
  private readonly safeTestTile;
14
14
  private readonly appId;
15
15
  private readonly logger;
16
- readonly port: number;
17
16
  private process;
18
17
  private exitHandler;
19
18
  constructor(safeTestTile: string, appId: string, logger: ApplicationLogger);
20
- start(): Promise<void>;
19
+ start(): Promise<number>;
21
20
  stop(): void;
22
21
  }
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.11.3-beta.dev.20220112.1",
4
+ "version": "2.11.3-beta.dev.20220113.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",