@wayward/types 2.14.0-beta.dev.20240911.1 → 2.14.0-beta.dev.20240912.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/IUsableAction.d.ts +10 -6
- package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +30 -30
- package/definitions/game/ui/component/ContextMenu.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts +2 -1
- package/package.json +1 -1
|
@@ -45,12 +45,6 @@ export interface IUsableActionRequirement<TYPE> {
|
|
|
45
45
|
find?(player: Player, provided?: IUsableActionPossibleUsing): TYPE | false | undefined;
|
|
46
46
|
getMissingName?(): Translation;
|
|
47
47
|
}
|
|
48
|
-
export interface IUsableActionItemRequirement extends Omit<IUsableActionRequirement<Item>, "find"> {
|
|
49
|
-
validateType?(player: Player, value: ItemType, description?: IItemDescription): boolean;
|
|
50
|
-
finder?: false | ((player: Player, defaultOptions?: IItemFinderOptions, provided?: Omit<IUsableActionPossibleUsing, "item">) => ItemFinder | undefined);
|
|
51
|
-
requiresQuality?: true;
|
|
52
|
-
requiresType?: true;
|
|
53
|
-
}
|
|
54
48
|
export declare namespace IUsableActionRequirement {
|
|
55
49
|
interface Maybe<TYPE> {
|
|
56
50
|
allowNone: true;
|
|
@@ -58,6 +52,16 @@ export declare namespace IUsableActionRequirement {
|
|
|
58
52
|
}
|
|
59
53
|
type Always = true;
|
|
60
54
|
}
|
|
55
|
+
export interface IUsableActionItemRequirement extends Omit<IUsableActionRequirement<Item>, "find"> {
|
|
56
|
+
validateType?(player: Player, value: ItemType, description?: IItemDescription): boolean;
|
|
57
|
+
finder?: false | ((player: Player, defaultOptions?: IItemFinderOptions, provided?: Omit<IUsableActionPossibleUsing, "item">) => ItemFinder | undefined);
|
|
58
|
+
requiresQuality?: true;
|
|
59
|
+
requiresType?: true;
|
|
60
|
+
}
|
|
61
|
+
export declare namespace IUsableActionItemRequirement {
|
|
62
|
+
function hasFinder(requirements?: IUsableActionRequirements): boolean;
|
|
63
|
+
function allowsNoItem(requirements?: IUsableActionRequirements): boolean;
|
|
64
|
+
}
|
|
61
65
|
export interface IUsableActionRequirements {
|
|
62
66
|
/**
|
|
63
67
|
* For reference: I hate this.
|
|
@@ -31,7 +31,7 @@ import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
|
|
31
31
|
export default class ActionInspection extends Inspection<ActionId | undefined> {
|
|
32
32
|
static handles: (type: InspectType, value: unknown, context?: InfoProviderContext) => boolean;
|
|
33
33
|
static getAction(id: ActionId): UsableAction<IUsableActionRequirements, IUsableActionDefinition> | undefined;
|
|
34
|
-
static getActionNameWithTier(id: ActionId, context: UsableActionDisplayContext, provided: IUsableActionPossibleUsing | undefined, resolveUsing: boolean): TranslationImpl | undefined;
|
|
34
|
+
static getActionNameWithTier(id: ActionId | UsableAction, context: UsableActionDisplayContext, provided: IUsableActionPossibleUsing | undefined, resolveUsing: boolean): TranslationImpl | undefined;
|
|
35
35
|
private static getTranslation;
|
|
36
36
|
static getRuneInfo(id: ActionId, itemType?: ItemType, item?: Item): SimpleInfoProvider | undefined;
|
|
37
37
|
constructor(value?: ActionId | EnumReferenceResolved<ReferenceType.Action>, context?: InfoProviderContext);
|
|
@@ -216,38 +216,38 @@ declare enum Message {
|
|
|
216
216
|
Build = 204,
|
|
217
217
|
Burned = 205,
|
|
218
218
|
CannotAddAnyMoreFuel = 206,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
219
|
+
CannotAnythingHere = 207,
|
|
220
|
+
CannotBeCrafted = 208,
|
|
221
|
+
CannotBePerformedOverWater = 209,
|
|
222
|
+
CannotBePlacedHere = 210,
|
|
223
|
+
CannotBePreserved = 211,
|
|
224
|
+
CannotBeRefined = 212,
|
|
225
|
+
CannotBeRefinedReinforcementNeeded = 213,
|
|
226
|
+
CannotBeReinforced = 214,
|
|
227
|
+
CannotBeRepaired = 215,
|
|
228
|
+
CannotBuildHere = 216,
|
|
229
|
+
CannotDigWithHands = 217,
|
|
230
230
|
CannotEquipThatThere = 218,
|
|
231
231
|
CannotFishFor = 219,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
232
|
+
CannotHere = 220,
|
|
233
|
+
CannotInWater = 221,
|
|
234
|
+
CannotLeave = 222,
|
|
235
|
+
CannotNoTreasure = 223,
|
|
236
|
+
CannotPickUpLockedContainer = 224,
|
|
237
|
+
CannotPickUpWhileLit = 225,
|
|
238
|
+
CannotPlaceContainerInItself = 226,
|
|
239
|
+
CannotPlaceHere = 227,
|
|
240
|
+
CannotPlaceThatFromHere = 228,
|
|
241
|
+
CannotPlaceThatHere = 229,
|
|
242
|
+
CannotPlaceThatOverWater = 230,
|
|
243
|
+
CannotPlantHereTilled = 231,
|
|
244
|
+
CannotRepairWhileLit = 232,
|
|
245
|
+
CannotRestHere = 233,
|
|
246
|
+
CannotShipNoItems = 234,
|
|
247
|
+
CannotShipNoPath = 235,
|
|
248
|
+
CannotSleepHere = 236,
|
|
249
|
+
CannotStartFireHere = 237,
|
|
250
|
+
CannotToAnythingHere = 238,
|
|
251
251
|
CannotToTellTime = 239,
|
|
252
252
|
CannotUseCommand = 240,
|
|
253
253
|
CannotWhenProtected = 241,
|
package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotConfigurationColumn.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { Quality } from "@wayward/game/game/IObject";
|
|
12
|
-
import type
|
|
12
|
+
import { type IUsableActionPossibleUsing } from "@wayward/game/game/entity/action/usable/IUsableAction";
|
|
13
13
|
import type UsableAction from "@wayward/game/game/entity/action/usable/UsableAction";
|
|
14
14
|
import type Item from "@wayward/game/game/item/Item";
|
|
15
15
|
import { Milestone } from "@wayward/game/game/milestones/IMilestone";
|
|
@@ -100,6 +100,7 @@ export default class ActionSlotConfigurationColumn extends Component {
|
|
|
100
100
|
private setUseOnMove;
|
|
101
101
|
private setUseOnHoveredTile;
|
|
102
102
|
private onDropIntoUseExact;
|
|
103
|
+
private onDropFromUseExact;
|
|
103
104
|
}
|
|
104
105
|
interface ActionSlotModeChoiceUseExactEvents extends Events<Choice<Mode>>, IItemSlotEvents {
|
|
105
106
|
}
|
package/package.json
CHANGED