@wayward/types 2.12.2-beta.dev.20221031.1 → 2.12.2-beta.dev.20221102.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.
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Copyright 2011-2021 Unlok
3
+ * https://www.unlok.ca
4
+ *
5
+ * Credits & Thanks:
6
+ * https://www.unlok.ca/credits-thanks/
7
+ *
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
+ * https://github.com/WaywardGame/types/wiki
10
+ */
11
+ import { TooltipVisibilityOption } from "save/data/ISaveDataGlobal";
12
+ declare const tooltipVisibilityOptions: Descriptions<TooltipVisibilityOption, string>;
13
+ export default tooltipVisibilityOptions;
@@ -19,7 +19,6 @@ import type UiExperiment from "ui/UiExperiments";
19
19
  import type { ISourceFilter } from "utilities/Log";
20
20
  export interface IOptions {
21
21
  alternatingDirectionMovement: boolean;
22
- alwaysShowMoreInformation: boolean;
23
22
  autoAttack: boolean;
24
23
  autoPickup: boolean;
25
24
  autoPickupOnIdle: boolean;
@@ -66,6 +65,7 @@ export interface IOptions {
66
65
  tooltips: {
67
66
  [key in InspectType]: boolean | undefined;
68
67
  };
68
+ tooltipVisibility?: TooltipVisibilityOption;
69
69
  uiExperiments: UiExperiment.Any[];
70
70
  uiScale?: number;
71
71
  useAdjacentContainers: boolean;
@@ -94,7 +94,13 @@ export declare enum MusicPlaylist {
94
94
  Shuffle = 1,
95
95
  Dynamic = 2
96
96
  }
97
+ export declare enum TooltipVisibilityOption {
98
+ HiddenUnlessBind = 0,
99
+ ShowMoreInformationWithBind = 1,
100
+ AlwaysShowMoreInformation = 2
101
+ }
97
102
  export declare type IOptionsOld = Partial<Pick<IOptions, "bindings">> & Partial<{
103
+ alwaysShowMoreInformation: boolean;
98
104
  keyBinds: Record<number, number>;
99
105
  bindings: IBindingsOld;
100
106
  directionTurnDelay: boolean;
@@ -15,6 +15,7 @@ import type { PlayerState } from "game/entity/player/IPlayer";
15
15
  import type { Game } from "game/Game";
16
16
  import type { Prompt } from "game/meta/prompt/IPrompt";
17
17
  import type InterruptChoice from "language/dictionary/InterruptChoice";
18
+ import { TooltipVisibilityOption } from "save/data/ISaveDataGlobal";
18
19
  import Component from "ui/component/Component";
19
20
  import type { IBindHandlerApi } from "ui/input/Bind";
20
21
  import LoadingBridge from "ui/LoadingBridge";
@@ -34,7 +35,7 @@ export interface IUiEvents {
34
35
  interrupt(options: Partial<InterruptOptions>, interrupt?: Prompt): string | boolean | InterruptChoice | undefined | void;
35
36
  interruptClose(options: Partial<InterruptOptions>, result?: string | boolean | InterruptChoice): any;
36
37
  loadedFromSave(): any;
37
- toggleShowMoreInformation(showingMoreInformation: boolean): any;
38
+ changeInformationVisibility(informationVisibility: TooltipVisibilityOption): any;
38
39
  toggleHealthVignette(healthVignette: boolean): any;
39
40
  toggleDeveloperMode(developerMode: boolean): any;
40
41
  }
@@ -66,8 +67,8 @@ export declare class Ui extends EventEmitter.Host<IUiEvents> {
66
67
  */
67
68
  registerDataHost(id: string | number, host: any): void;
68
69
  playSound(sound: SfxType | SfxUi): void;
69
- shouldShowMoreInformation(): boolean;
70
- toggleShowMoreInformation(showMoreInformation: boolean): void;
70
+ getTooltipVisibility(): TooltipVisibilityOption;
71
+ protected onChangeInformationVisibility(): void;
71
72
  /**
72
73
  * Toggle health vignette
73
74
  */
@@ -42,6 +42,8 @@ export declare type ContextMenuOptionKeyValuePair<O extends number | string | sy
42
42
  export declare type ContextMenuOptionDescription<O extends number | string | symbol = number | string | symbol> = ContextMenuOptionKeyValuePair<O> | typeof ContextMenu.Divider;
43
43
  export declare type ContextMenuDescriptions<O extends number | string | symbol = number | string | symbol> = Array<ContextMenuOptionDescription<O>>;
44
44
  export interface IContextMenuEvents extends Events<Component> {
45
+ setPosition(): any;
46
+ interactable(): any;
45
47
  chosen(choice: ContextMenuOption): any;
46
48
  becomeActive(): any;
47
49
  }
@@ -9,7 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Doodad from "game/doodad/Doodad";
12
- import type { EquipType } from "game/entity/IHuman";
12
+ import { EquipType } from "game/entity/IHuman";
13
13
  import NPC from "game/entity/npc/NPC";
14
14
  import type { IContainer, IDismantleComponent } from "game/item/IItem";
15
15
  import { ItemType } from "game/item/IItem";
@@ -11,6 +11,7 @@
11
11
  import type { IHasImagePath } from "game/IObject";
12
12
  import type { IModdable } from "mod/ModRegistry";
13
13
  import type Button from "ui/component/Button";
14
+ import type { IBindHandlerApi } from "ui/input/Bind";
14
15
  import type Bindable from "ui/input/Bindable";
15
16
  import type Tooltip from "ui/tooltip/Tooltip";
16
17
  import type { IVector2 } from "utilities/math/IVector";
@@ -72,7 +73,7 @@ export interface IMenuBarButtonDescription extends IModdable, IHasImagePath {
72
73
  /**
73
74
  * What should happen when this button is clicked.
74
75
  */
75
- onActivate(): any;
76
+ onActivate(api?: IBindHandlerApi): any;
76
77
  onCreate?(button: Button): any;
77
78
  onDispose?(button: Button): any;
78
79
  tooltip?(tooltip: Tooltip, button: Button, addBindLabel: (tooltip: Tooltip) => void): Tooltip;
@@ -106,6 +106,9 @@ export default class Tooltip extends Component {
106
106
  setInitialPositionAndShownHandledExternally(): this;
107
107
  private dumpOnShow;
108
108
  setDumpOnShow(dumpOnShow?: boolean): this;
109
+ private showId?;
110
+ reshow(force?: boolean): void;
111
+ private reshowInternal;
109
112
  protected onShow(): void;
110
113
  dump(): this;
111
114
  }
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.12.2-beta.dev.20221031.1",
4
+ "version": "2.12.2-beta.dev.20221102.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",