@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.
@@ -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
- CannotBeCrafted = 207,
220
- CannotBePerformedOverWater = 208,
221
- CannotBePlacedHere = 209,
222
- CannotBePreserved = 210,
223
- CannotBeRefined = 211,
224
- CannotBeRefinedReinforcementNeeded = 212,
225
- CannotBeReinforced = 213,
226
- CannotBeRepaired = 214,
227
- CannotBuildHere = 215,
228
- CannotDigWithHands = 216,
229
- CannotHere = 217,
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
- CannotAnythingHere = 220,
233
- CannotToAnythingHere = 221,
234
- CannotInWater = 222,
235
- CannotLeave = 223,
236
- CannotNoTreasure = 224,
237
- CannotPickUpLockedContainer = 225,
238
- CannotPickUpWhileLit = 226,
239
- CannotPlaceContainerInItself = 227,
240
- CannotPlaceHere = 228,
241
- CannotPlaceThatFromHere = 229,
242
- CannotPlaceThatHere = 230,
243
- CannotPlaceThatOverWater = 231,
244
- CannotPlantHereTilled = 232,
245
- CannotRepairWhileLit = 233,
246
- CannotRestHere = 234,
247
- CannotShipNoItems = 235,
248
- CannotShipNoPath = 236,
249
- CannotSleepHere = 237,
250
- CannotStartFireHere = 238,
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,
@@ -93,6 +93,7 @@ declare class ContextMenu<O extends number | string | symbol = number | string |
93
93
  private hiding;
94
94
  private silent?;
95
95
  hideAndRemove(): void;
96
+ protected onRemove(): void;
96
97
  private getDescription;
97
98
  protected onAppend(): void;
98
99
  }
@@ -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 { IUsableActionPossibleUsing } from "@wayward/game/game/entity/action/usable/IUsableAction";
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wayward/types",
3
3
  "description": "TypeScript declarations for Wayward, used for modding.",
4
- "version": "2.14.0-beta.dev.20240911.1",
4
+ "version": "2.14.0-beta.dev.20240912.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",