@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.
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +2 -0
- package/definitions/game/language/Translation.d.ts +3 -3
- package/definitions/game/language/dictionary/Misc.d.ts +15 -17
- package/definitions/game/language/impl/TranslationImpl.d.ts +1 -0
- package/definitions/game/mod/IModManager.d.ts +5 -4
- package/definitions/game/ui/screen/screens/game/component/Dialog.d.ts +2 -1
- package/definitions/game/ui/screen/screens/menu/menus/BindingsMenu.d.ts +1 -0
- package/definitions/game/ui/screen/screens/menu/menus/options/BindRow.d.ts +2 -1
- package/definitions/game/utilities/string/Interpolator.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
27
|
+
RequiredModNotLoaded = 7,
|
|
28
28
|
LocalModPrecedence = 8,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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;
|
|
@@ -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(
|
|
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