@wayward/types 2.13.0-beta.dev.20230510.1 → 2.13.0-beta.dev.20230511.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.
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import EventEmitter from "event/EventEmitter";
12
+ import type { IIcon } from "game/inspection/InfoProvider";
12
13
  import Dictionary from "language/Dictionary";
13
14
  import Language from "language/Language";
14
15
  import LanguageExtension from "language/LanguageExtension";
@@ -101,5 +102,6 @@ export interface ITranslationInjection {
101
102
  selector: string;
102
103
  translation: TranslationGenerator;
103
104
  type?: "title" | "generic";
105
+ icon?: IIcon;
104
106
  }
105
107
  export {};
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import type { Events, IEventEmitter } from "event/EventEmitter";
12
12
  import type { EmitterOrBus, Event, Handler } from "event/EventManager";
13
+ import type { IIcon } from "game/inspection/InfoProvider";
13
14
  import UiTranslation from "language/dictionary/UiTranslation";
14
15
  import type { IBindingsSection } from "language/segment/BindSegment";
15
16
  import type { IColorSection } from "language/segment/ColorSegment";
@@ -84,6 +85,7 @@ export interface IBasicTextEvents extends Events<Component> {
84
85
  handleLink(link: BasicTextLink): true | void;
85
86
  }
86
87
  export declare class BasicText extends Component {
88
+ static applyIcon(component?: Component, icon?: IIcon): void;
87
89
  event: IEventEmitter<this, IBasicTextEvents>;
88
90
  private _link;
89
91
  inputIndex?: number;
@@ -236,7 +236,6 @@ export default class InGameScreen extends BaseScreen {
236
236
  onDropItem(api: IBindHandlerApi): boolean;
237
237
  onReleaseDrop(): void;
238
238
  onMoreInformation(api: IBindHandlerApi): boolean;
239
- onDismantleTab(): boolean;
240
239
  private isOverlayVisible;
241
240
  private readonly onInterrupt;
242
241
  private readonly onInterruptClosed;
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { Events, IEventEmitter } from "event/EventEmitter";
12
+ import type { IIcon } from "game/inspection/InfoProvider";
12
13
  import UiTranslation from "language/dictionary/UiTranslation";
13
14
  import type { ISerializedTranslation } from "language/ITranslation";
14
15
  import Translation from "language/Translation";
@@ -21,6 +22,7 @@ import type Bindable from "ui/input/Bindable";
21
22
  import type { IDialogDescription } from "ui/screen/screens/game/Dialogs";
22
23
  import { DialogId, Edge } from "ui/screen/screens/game/Dialogs";
23
24
  import type { IDialog } from "ui/screen/screens/game/IGameScreenApi";
25
+ import type { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
24
26
  import type TooltipLocationHandler from "ui/tooltip/TooltipLocationHandler";
25
27
  import type { IDraggableEvents } from "ui/util/Draggable";
26
28
  import Draggable from "ui/util/Draggable";
@@ -190,6 +192,7 @@ declare abstract class Dialog extends Component implements IDialog {
190
192
  */
191
193
  getName(): Translation | UiTranslation | ISerializedTranslation | undefined;
192
194
  getBindable(): Bindable | undefined;
195
+ getIcon(): MenuBarButtonType | IIcon | undefined;
193
196
  /**
194
197
  * Event handler for when this dialog is appended
195
198
  */
@@ -10,13 +10,17 @@
10
10
  */
11
11
  import type { IContainer } from "game/item/IItem";
12
12
  import type Item from "game/item/Item";
13
+ import Bindable from "ui/input/Bindable";
13
14
  import Dialog from "ui/screen/screens/game/component/Dialog";
15
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
14
16
  export default class CraftingDialog extends Dialog {
15
17
  private readonly craftableRecipes;
16
18
  private accessible;
17
19
  private readonly sort;
18
20
  private readonly craftableWrapper;
19
21
  constructor();
22
+ getBindable(): Bindable;
23
+ getIcon(): MenuBarButtonType;
20
24
  protected updateCraftableInventories(): void;
21
25
  protected onContainerItemAdd(_: any, items: Item[], container: IContainer): void;
22
26
  protected onInventoryItemAdd(_: any, items: Item[]): void;
@@ -17,6 +17,7 @@ import Dialog from "ui/screen/screens/game/component/Dialog";
17
17
  import type { IItemDropApi, IItemPickUpApi, ItemSlot } from "ui/screen/screens/game/component/Item";
18
18
  import ItemComponent, { ItemRefreshType } from "ui/screen/screens/game/component/Item";
19
19
  import EquipmentSlotTooltipHandler from "ui/screen/screens/game/dialog/equipment/EquipmentSlotTooltip";
20
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
20
21
  export declare enum EquipmentClasses {
21
22
  Main = "game-dialog-equipment",
22
23
  Body = "game-dialog-equipment-body",
@@ -34,7 +35,8 @@ export default class EquipmentDialog extends Dialog {
34
35
  readonly slots: Component<HTMLElement>;
35
36
  readonly tooltipHandler: EquipmentSlotTooltipHandler;
36
37
  constructor();
37
- getBindable(): Bindable | undefined;
38
+ getBindable(): Bindable;
39
+ getIcon(): MenuBarButtonType;
38
40
  protected onClearActionSlot(api: IBindHandlerApi): boolean;
39
41
  }
40
42
  export declare class EquipmentSlot extends ItemComponent {
@@ -12,11 +12,15 @@ import type { IIslandPort } from "game/island/IIsland";
12
12
  import type Island from "game/island/Island";
13
13
  import Button from "ui/component/Button";
14
14
  import type Component from "ui/component/Component";
15
+ import Bindable from "ui/input/Bindable";
15
16
  import IslandsDialog from "ui/screen/screens/game/dialog/islands/IslandsDialog";
17
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
16
18
  export default class IslandsSailDialog extends IslandsDialog {
17
19
  closeOnTravel: boolean;
18
20
  constructor();
19
21
  protected createExecuteButton(port?: IIslandPort): Button;
22
+ getBindable(): Bindable;
23
+ getIcon(): MenuBarButtonType;
20
24
  protected onAppend(): void;
21
25
  protected initializeSettingsPanel(panel: Component): void;
22
26
  protected onChangedSelectedIsland(animate?: boolean): void;
@@ -10,9 +10,11 @@
10
10
  */
11
11
  import Bindable from "ui/input/Bindable";
12
12
  import Dialog from "ui/screen/screens/game/component/Dialog";
13
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
13
14
  export default class MessagesDialog extends Dialog {
14
15
  constructor();
15
- getBindable(): Bindable | undefined;
16
+ getBindable(): Bindable;
17
+ getIcon(): MenuBarButtonType;
16
18
  protected onAppend2(): void;
17
19
  protected willRemove(): void;
18
20
  private onFocus;
@@ -12,11 +12,13 @@ import type Player from "game/entity/player/Player";
12
12
  import { Milestone } from "game/milestones/IMilestone";
13
13
  import Bindable from "ui/input/Bindable";
14
14
  import Dialog from "ui/screen/screens/game/component/Dialog";
15
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
15
16
  export default class MilestonesDialog extends Dialog {
16
17
  private readonly milestones;
17
18
  private readonly sortRow;
18
19
  constructor();
19
- getBindable(): Bindable | undefined;
20
+ getBindable(): Bindable;
21
+ getIcon(): MenuBarButtonType;
20
22
  onPlayerChangeTitle(player: Player, milestone?: Milestone): void;
21
23
  onMilestoneUpdate(_: any, milestone: Milestone): void;
22
24
  private sort;
@@ -12,6 +12,7 @@ import type { Events, IEventEmitter } from "event/EventEmitter";
12
12
  import type Player from "game/entity/player/Player";
13
13
  import Bindable from "ui/input/Bindable";
14
14
  import Dialog from "ui/screen/screens/game/component/Dialog";
15
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
15
16
  interface INotesDialogEvents extends Events<Dialog> {
16
17
  /**
17
18
  * @param noteId The note that was shown
@@ -26,7 +27,8 @@ export default class NotesDialog extends Dialog {
26
27
  private note;
27
28
  private current;
28
29
  constructor();
29
- getBindable(): Bindable | undefined;
30
+ getBindable(): Bindable;
31
+ getIcon(): MenuBarButtonType;
30
32
  onWrittenNote(_player: Player, _id: number): void;
31
33
  showNote(noteId: number): this;
32
34
  showFirstUnreadNote(): void;
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import Bindable from "ui/input/Bindable";
12
12
  import Dialog from "ui/screen/screens/game/component/Dialog";
13
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
13
14
  export default class QuestDialog extends Dialog {
14
15
  private readonly questsActiveWrapper;
15
16
  private readonly questsActiveHeading;
@@ -22,7 +23,8 @@ export default class QuestDialog extends Dialog {
22
23
  private readonly completeQuestButton;
23
24
  private current;
24
25
  constructor();
25
- getBindable(): Bindable | undefined;
26
+ getBindable(): Bindable;
27
+ getIcon(): MenuBarButtonType;
26
28
  protected onDialogRemove(): void;
27
29
  showQuest(id: number): this;
28
30
  protected onSwitchPanel(panelId: string | number): void;
@@ -11,10 +11,12 @@
11
11
  import type { IRefreshable } from "ui/component/Refreshable";
12
12
  import Bindable from "ui/input/Bindable";
13
13
  import Dialog from "ui/screen/screens/game/component/Dialog";
14
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
14
15
  export default class QuickSettingsDialog extends Dialog implements IRefreshable {
15
16
  private readonly refreshables;
16
17
  constructor();
17
- getBindable(): Bindable | undefined;
18
+ getBindable(): Bindable;
19
+ getIcon(): MenuBarButtonType;
18
20
  refresh(): this;
19
21
  private addRefreshable;
20
22
  }
@@ -10,12 +10,14 @@
10
10
  */
11
11
  import Bindable from "ui/input/Bindable";
12
12
  import Dialog from "ui/screen/screens/game/component/Dialog";
13
+ import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
13
14
  export default class SkillsDialog extends Dialog {
14
15
  private readonly skills;
15
16
  private readonly inputFilter;
16
17
  private readonly sortRow;
17
18
  constructor();
18
- getBindable(): Bindable | undefined;
19
+ getBindable(): Bindable;
20
+ getIcon(): MenuBarButtonType;
19
21
  protected onDialogRemove(): void;
20
22
  private updateSkill;
21
23
  private sort;
@@ -14,7 +14,6 @@ import type Island from "game/island/Island";
14
14
  import type Button from "ui/component/Button";
15
15
  import Component from "ui/component/Component";
16
16
  import Input from "ui/component/Input";
17
- import Bindable from "ui/input/Bindable";
18
17
  import CanvasDialog from "ui/screen/screens/game/component/CanvasDialog";
19
18
  import type { DialogId } from "ui/screen/screens/game/Dialogs";
20
19
  import type { IVector2 } from "utilities/math/IVector";
@@ -50,7 +49,6 @@ export default abstract class IslandsDialog extends CanvasDialog {
50
49
  readonly portsWrapper: Component<HTMLElement>;
51
50
  readonly ports: IIslandsDialogPort[];
52
51
  constructor(dialogId: DialogId, options: IIslandDialogOptions);
53
- getBindable(): Bindable | undefined;
54
52
  protected get island(): Island | undefined;
55
53
  selectIsland(x: number, y: number): void;
56
54
  protected onLoad(initial: boolean): Promise<void>;
@@ -30,7 +30,8 @@ export declare enum MenuBarButtonType {
30
30
  Equipment = 11,
31
31
  Skills = 12,
32
32
  Islands = 13,
33
- ActionsItems = 14
33
+ ActionsItems = 14,
34
+ Dismantle = 15
34
35
  }
35
36
  export declare const DEFAULT_MENU_BAR_BUTTON_ORDER: {
36
37
  0: number;
@@ -48,6 +49,7 @@ export declare const DEFAULT_MENU_BAR_BUTTON_ORDER: {
48
49
  12: number;
49
50
  13: number;
50
51
  14: number;
52
+ 15: number;
51
53
  };
52
54
  export interface IMenuBarButtonDescription extends IModdable, IHasImagePath {
53
55
  /**
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.13.0-beta.dev.20230510.1",
4
+ "version": "2.13.0-beta.dev.20230511.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",