@wayward/types 2.12.2-beta.dev.20221109.1 → 2.12.2-beta.dev.20221111.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.
@@ -11,6 +11,7 @@
11
11
  import EventEmitter from "event/EventEmitter";
12
12
  import type { ActionId, IUsableActionDefinition, IUsableActionDefinitionExecutable, IUsableActionExecutionContext, IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, UsableActionUsability } from "game/entity/action/usable/IUsableAction";
13
13
  import { IUsableActionNotUsable, UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
14
+ import UsableActionRegistrar from "game/entity/action/usable/UsableActionRegistrar";
14
15
  import type Player from "game/entity/player/Player";
15
16
  import type { IIcon } from "game/inspection/InfoProvider";
16
17
  import type Item from "game/item/Item";
@@ -21,6 +22,7 @@ export declare const USABLE_ACTION_USE_ON_MOVE_UNLOCK_AT = 20;
21
22
  export interface IUsableActionEvents {
22
23
  preExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
23
24
  postExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
25
+ showContextMenu(registrar: UsableActionRegistrar): any;
24
26
  }
25
27
  /**
26
28
  * Create a basic usable action:
@@ -101,9 +101,9 @@ declare module Translation {
101
101
  function growthStage(stage?: GrowingStage, spores?: boolean): TranslationImpl | undefined;
102
102
  const getString: typeof TranslationImpl.getString;
103
103
  const resolve: typeof TranslationImpl.resolve;
104
- function colorizeQuality(quality: Quality | string): Translation;
105
- function colorizeQuality(quality: Quality | string, text: string | IStringSection): IStringSection;
106
- function colorizeQuality(quality: Quality | string, text: IStringSection[]): IStringSection[];
104
+ function colorizeQuality(quality: Quality | string | undefined): Translation;
105
+ function colorizeQuality(quality: Quality | string | undefined, text: string | IStringSection): IStringSection;
106
+ function colorizeQuality(quality: Quality | string | undefined, text: IStringSection[]): IStringSection[];
107
107
  function colorizeMessageType(type: MessageType): Translation;
108
108
  function colorizeMessageType(type: MessageType, text: string | IStringSection): IStringSection;
109
109
  function colorizeMessageType(type: MessageType, text: IStringSection[]): IStringSection[];
@@ -124,21 +124,19 @@ export declare enum MiscTranslation {
124
124
  ExpressionSeparator = 22,
125
125
  ItemMagicalProperty = 23,
126
126
  ListItemSeparator = 24,
127
- MacroInputSeparator = 25,
128
- Multiply = 26,
129
- NPCName = 27,
130
- NumberSingleDecimal = 28,
131
- OwnName = 29,
132
- Percent = 30,
133
- PercentInteger = 31,
134
- PercentRaw = 32,
135
- PlayerName = 33,
136
- Quality = 34,
137
- Range = 35,
138
- ReformatSingularNoun = 36,
139
- Renamed = 37,
140
- Thing = 38,
141
- Tilled = 39,
142
- Unknown = 40,
143
- UnknownItem = 41
127
+ Multiply = 25,
128
+ NPCName = 26,
129
+ NumberSingleDecimal = 27,
130
+ OwnName = 28,
131
+ Percent = 29,
132
+ PercentInteger = 30,
133
+ PercentRaw = 31,
134
+ PlayerName = 32,
135
+ Range = 33,
136
+ ReformatSingularNoun = 34,
137
+ Renamed = 35,
138
+ Thing = 36,
139
+ Tilled = 37,
140
+ Unknown = 38,
141
+ UnknownItem = 39
144
142
  }
@@ -93,6 +93,7 @@ export default class TranslationImpl implements Omit<ISerializable, "deserialize
93
93
  * Returns this translation as a list of string sections
94
94
  */
95
95
  get(...args: any[]): IStringSection[];
96
+ private resolveSections;
96
97
  /**
97
98
  * Returns the translation as a string
98
99
  */
@@ -24,11 +24,12 @@ export declare enum CanLoadState {
24
24
  ModRequiresItself = 4,
25
25
  MissingRequiredMod = 5,
26
26
  CannotLoadRequiredMod = 6,
27
- ReqiredModNotLoaded = 7,
27
+ RequiredModNotLoaded = 7,
28
28
  LocalModPrecedence = 8,
29
- IncompatibleVersion = 9,
30
- DisabledInMultiplayer = 10,
31
- ServerSideOnNonDedicatedServer = 11
29
+ WorkshopModPrecedence = 9,
30
+ IncompatibleVersion = 10,
31
+ DisabledInMultiplayer = 11,
32
+ ServerSideOnNonDedicatedServer = 12
32
33
  }
33
34
  export declare enum ModLoadFailureReason {
34
35
  IsDisabled = 0,
@@ -96,7 +96,8 @@ export declare enum DialogClasses {
96
96
  Header = "dialog-header",
97
97
  EndsIconsLeft = "dialog-ends-icons-left",
98
98
  EndsIconsRight = "dialog-ends-icons-right",
99
- EndsContent = "dialog-ends-content"
99
+ EndsContent = "dialog-ends-content",
100
+ FooterContent = "dialog-footer-content"
100
101
  }
101
102
  export default abstract class Dialog extends Component implements IDialog {
102
103
  readonly subId: string;
@@ -22,6 +22,7 @@ export default class BindingsMenu extends Menu {
22
22
  private filterBindRows;
23
23
  filter(...bindables: Bindable[]): void;
24
24
  private filterToBindables;
25
+ private filterToMacros;
25
26
  private getSelector;
26
27
  private createBindRow;
27
28
  }
@@ -15,8 +15,9 @@ import type { TranslationGenerator } from "ui/component/IComponent";
15
15
  import type { IRefreshable } from "ui/component/Refreshable";
16
16
  import Bindable from "ui/input/Bindable";
17
17
  import type { Binding } from "ui/input/Bindings";
18
+ import { Macro } from "ui/input/Macros";
18
19
  export interface IBindRowEvents extends Events<Button> {
19
- requestFilter(bindables: Iterable<Bindable>): any;
20
+ requestFilter(macro: Macro): any;
20
21
  update(): any;
21
22
  }
22
23
  export declare class BindRow extends Button implements IRefreshable {
@@ -35,6 +35,7 @@ export interface IStringSection {
35
35
  classes?: Set<string>;
36
36
  icon?: ISerializedIcon;
37
37
  forceInclude?: true;
38
+ stringOnly?: true;
38
39
  }
39
40
  export declare namespace IStringSection {
40
41
  function get(content?: string | IStringSection | Iterable<IStringSection>): Iterable<IStringSection>;
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.20221109.1",
4
+ "version": "2.12.2-beta.dev.20221111.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",