@wayward/types 2.14.1-beta.dev.20241217.2 → 2.14.2-beta.dev.20241219.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.
@@ -96,8 +96,8 @@ export default abstract class Entity<DescriptionType = unknown, TypeType extends
96
96
  */
97
97
  get tile(): Tile | undefined;
98
98
  get tilesAround(): Tile[] | undefined;
99
- protected setCachedTile(tile: Tile): void;
100
- clearTileCache(): void;
99
+ protected setCachedTile(tile: Tile | undefined): void;
100
+ clearTileCache(): Tile | undefined;
101
101
  isNearby(entity: Entity | Tile, includeCurrentTile?: boolean): boolean;
102
102
  /**
103
103
  * Updates the world renderer & flow field state for the tile
@@ -22,7 +22,7 @@ import { FieldOfView } from "@wayward/game/renderer/fieldOfView/FieldOfView";
22
22
  import type { CanASeeBType } from "@wayward/game/renderer/fieldOfView/IFieldOfView";
23
23
  import type { INotificationLocation } from "@wayward/game/renderer/notifier/INotifier";
24
24
  import type { Direction } from "@wayward/game/utilities/math/Direction";
25
- import type { IVector2 } from "@wayward/game/utilities/math/IVector";
25
+ import type { IVector2, IVector3 } from "@wayward/game/utilities/math/IVector";
26
26
  import Vector2 from "@wayward/game/utilities/math/Vector2";
27
27
  import type { IEventEmitter } from "@wayward/utilities/event/EventEmitter";
28
28
  export interface IEntityMovableEvents extends IEntityEvents {
@@ -107,6 +107,7 @@ export default abstract class EntityMovable<DescriptionType = unknown, TypeType
107
107
  canSeeTile(type: CanASeeBType, tile: Tile, fieldOfView?: FieldOfView, customRadius?: number): boolean;
108
108
  canSeePosition(type: CanASeeBType, islandId: IslandId, x: number, y: number, z: number, fieldOfView?: FieldOfView | undefined, customRadius?: number): boolean;
109
109
  queueSoundEffectInFront(type: SfxType, delay?: number, speed?: number): void;
110
+ runWhileFacing<T>(lambda: () => T, position: IVector3, direction?: Direction.Cardinal): T;
110
111
  getMovementDelay(): number;
111
112
  /**
112
113
  * Move the entity to the tile
@@ -208,8 +208,11 @@ export declare enum ActionFlag {
208
208
  * Used for hiding actions that can't currently be used from context menus.
209
209
  */
210
210
  export declare enum ActionDisplayLevel {
211
+ /** This action is always displayed, whether usable or not. */
211
212
  Always = 0,
213
+ /** When the action can't be used, it is not displayed, *unless* you are right clicking on an item that has the action. */
212
214
  Direct = 1,
215
+ /** When the action can't be used, it is not displayed. */
213
216
  Never = 2
214
217
  }
215
218
  export interface IActionUsable {
@@ -229,6 +232,7 @@ export interface IActionNotUsable {
229
232
  mobCheckTile?: Tile;
230
233
  message?: Message | INotUsableMessage;
231
234
  sources?: ArrayOr<Source>;
235
+ /** Whether the action should display or not in context menus due to this error. */
232
236
  errorDisplayLevel?: ActionDisplayLevel;
233
237
  args?: never;
234
238
  arg?: never;
@@ -27,7 +27,6 @@ import Message from "@wayward/game/language/dictionary/Message";
27
27
  import type { HighlightSelector } from "@wayward/game/ui/util/IHighlight";
28
28
  import Observer from "@wayward/game/utilities/Observer";
29
29
  import EventEmitter from "@wayward/utilities/event/EventEmitter";
30
- export declare const USABLE_ACTION_USE_ON_MOVE_UNLOCK_AT = 20;
31
30
  export interface IUsableActionEvents {
32
31
  preExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
33
32
  postExecute(player: Player, using: IUsableActionPossibleUsing, context: IUsableActionExecutionContext): any;
@@ -314,66 +314,66 @@ declare enum UiTranslation {
314
314
  GameActionBarConfigurationDrawerButtonUseOnMoveDescription = 299,
315
315
  GameActionBarConfigurationDrawerButtonUseOnHoveredTile = 300,
316
316
  GameActionBarConfigurationDrawerButtonUseOnHoveredTileDescription = 301,
317
- GameActionBarConfigurationDrawerHintDiscoverMore = 302,
318
- GameActionBarConfigurationDrawerModeUseExact = 303,
319
- GameActionBarConfigurationDrawerModeUseExactNoItemSelected = 304,
320
- GameActionBarConfigurationDrawerModeUseBest = 305,
321
- GameActionBarConfigurationDrawerModeUseNone = 306,
322
- GameActionBarConfigurationDrawerModeUseHovered = 307,
323
- GameActionBarConfigurationDrawerItemDropdownAny = 308,
324
- GameActionBarConfigurationDrawerItemDropdownNoTypeSelected = 309,
325
- GameActionBarConfigurationDrawerButtonDone = 310,
326
- GameActionBarConfigurationDrawerButtonCraftType = 311,
327
- GameActionBarSlotTooltipHintUse = 312,
328
- GameActionBarSlotTooltipHintConfigure = 313,
329
- GameActionBarSlotTooltipHintUseOnMove = 314,
330
- GameActionBarSlotTooltipHintUseSlottedItem = 315,
331
- GameActionBarSlotTooltipHintClear = 316,
332
- GameActionBarButtonToggleUseWhenMovingTooltip = 317,
333
- GameActionBarButtonRemoveActionBarRowTooltip = 318,
334
- GameActionBarButtonAddActionBarRowTooltip = 319,
335
- GameActionBarButtonConfigureOptions = 320,
336
- GameMessagesButtonSend = 321,
337
- GameMessagesContextMenuShowAsDialog = 322,
338
- GameMessagesContextMenuClear = 323,
339
- GameMessagesContextMenuCopy = 324,
340
- GameMessagesContextMenuExport = 325,
341
- GameMessagesFilter = 326,
342
- GameMessagesFiltersEdit = 327,
343
- GameMessagesNewNote = 328,
344
- GameMessagesTurn = 329,
345
- GameMessagesDedicatedServerBackup = 330,
346
- GameMessagesDedicatedServerBackupLimitReached = 331,
347
- GameMessagesPlaceholderChat = 332,
348
- GameMessagesButtonShowNewest = 333,
349
- GameTileInspectionCannotSeeTile = 334,
350
- MenuAboutTitle = 335,
351
- MenuAboutDescription = 336,
352
- MenuAboutGameDescription = 337,
353
- MenuAboutSectionTeam = 338,
354
- MenuAboutTeamMemberName = 339,
355
- MenuAboutTeamMemberNickname = 340,
356
- MenuAboutSectionContributors = 341,
357
- MenuAboutSectionSpecialThanks = 342,
358
- MenuAboutTextSpecialThanksTestorsAndDonators = 343,
359
- MenuAboutSectionLibraries = 344,
360
- MenuAboutSectionLibrariesDescription = 345,
361
- MenuAboutLabelVersion = 346,
362
- MenuAboutLabelVersionBuild = 347,
363
- MenuAboutLabelVersionBuildTime = 348,
364
- MenuBindings = 349,
365
- MenuBindingsDescription = 350,
366
- MenuBindingsTooltipBindConflicts = 351,
367
- MenuBindingsManagedBindableGameActionBarUseSlot = 352,
368
- MenuBindingsManagedBindableGameActionBarAssignSlot = 353,
369
- MenuBindingsManagedBindableGameActionBarToggleUseOnMoveSlot = 354,
370
- MenuChangelogTitle = 355,
371
- MenuChangelogDescription = 356,
372
- MenuChangelogHeadingUnchartedWaters = 357,
373
- MenuChangelogFailedToLoadTitle = 358,
374
- MenuChangelogFailedToLoadDescription = 359,
375
- MenuChangelogHeadingChangeCount = 360,
376
- MenuChangelogButtonCopyChangelog = 361,
317
+ GameActionBarConfigurationDrawerModeUseExact = 302,
318
+ GameActionBarConfigurationDrawerModeUseExactNoItemSelected = 303,
319
+ GameActionBarConfigurationDrawerModeUseBest = 304,
320
+ GameActionBarConfigurationDrawerModeUseNone = 305,
321
+ GameActionBarConfigurationDrawerModeUseHovered = 306,
322
+ GameActionBarConfigurationDrawerItemDropdownAny = 307,
323
+ GameActionBarConfigurationDrawerItemDropdownNoTypeSelected = 308,
324
+ GameActionBarConfigurationDrawerButtonDone = 309,
325
+ GameActionBarConfigurationDrawerButtonCraftType = 310,
326
+ GameActionBarSlotTooltipHintUse = 311,
327
+ GameActionBarSlotTooltipHintConfigure = 312,
328
+ GameActionBarSlotTooltipHintUseOnMove = 313,
329
+ GameActionBarSlotTooltipHintUseSlottedItem = 314,
330
+ GameActionBarSlotTooltipHintClear = 315,
331
+ GameActionBarButtonToggleUseWhenMovingTooltip = 316,
332
+ GameActionBarButtonRemoveActionBarRowTooltip = 317,
333
+ GameActionBarButtonAddActionBarRowTooltip = 318,
334
+ GameActionBarButtonConfigureOptions = 319,
335
+ GameMessagesButtonSend = 320,
336
+ GameMessagesContextMenuShowAsDialog = 321,
337
+ GameMessagesContextMenuClear = 322,
338
+ GameMessagesContextMenuCopy = 323,
339
+ GameMessagesContextMenuExport = 324,
340
+ GameMessagesFilter = 325,
341
+ GameMessagesFiltersEdit = 326,
342
+ GameMessagesNewNote = 327,
343
+ GameMessagesTurn = 328,
344
+ GameMessagesDedicatedServerBackup = 329,
345
+ GameMessagesDedicatedServerBackupLimitReached = 330,
346
+ GameMessagesPlaceholderChat = 331,
347
+ GameMessagesButtonShowNewest = 332,
348
+ GameTileInspectionCannotSeeTile = 333,
349
+ MenuAboutTitle = 334,
350
+ MenuAboutDescription = 335,
351
+ MenuAboutGameDescription = 336,
352
+ MenuAboutSectionTeam = 337,
353
+ MenuAboutTeamMemberName = 338,
354
+ MenuAboutTeamMemberNickname = 339,
355
+ MenuAboutSectionContributors = 340,
356
+ MenuAboutSectionSpecialThanks = 341,
357
+ MenuAboutTextSpecialThanksTestorsAndDonators = 342,
358
+ MenuAboutSectionLibraries = 343,
359
+ MenuAboutSectionLibrariesDescription = 344,
360
+ MenuAboutLabelVersion = 345,
361
+ MenuAboutLabelVersionBuild = 346,
362
+ MenuAboutLabelVersionBuildTime = 347,
363
+ MenuBindings = 348,
364
+ MenuBindingsDescription = 349,
365
+ MenuBindingsTooltipBindConflicts = 350,
366
+ MenuBindingsManagedBindableGameActionBarUseSlot = 351,
367
+ MenuBindingsManagedBindableGameActionBarAssignSlot = 352,
368
+ MenuBindingsManagedBindableGameActionBarToggleUseOnMoveSlot = 353,
369
+ MenuChangelogTitle = 354,
370
+ MenuChangelogDescription = 355,
371
+ MenuChangelogHeadingUnchartedWaters = 356,
372
+ MenuChangelogFailedToLoadTitle = 357,
373
+ MenuChangelogFailedToLoadDescription = 358,
374
+ MenuChangelogHeadingChangeCount = 359,
375
+ MenuChangelogButtonCopyChangelog = 360,
376
+ MenuChangelogButtonCopyAltChangelog = 361,
377
377
  MenuCharacterCreationButtonRandomizeName = 362,
378
378
  MenuCharacterCreationButtonExportTooltip = 363,
379
379
  MenuCharacterCreationButtonImportTooltip = 364,
@@ -241,7 +241,7 @@ export default class ItemComponent extends Component implements ItemSlot {
241
241
  get actionSlots(): ReadonlySet<number> | undefined;
242
242
  private _equipSlot;
243
243
  get equipSlot(): EquipType;
244
- refresh(refreshType: ItemRefreshType): this;
244
+ refresh(refreshType: ItemRefreshType, skipPlayingCheck?: boolean): this;
245
245
  clone(): this | undefined;
246
246
  setItemMenu(initialiser?: (contextMenu: ContextMenu<ActionId>) => any): this;
247
247
  private registeredItemHighlights;
@@ -45,7 +45,7 @@ export declare class EquipmentSlot extends ItemComponent {
45
45
  private overriddenItem?;
46
46
  equipItem(item: Item): Promise<void>;
47
47
  clear(): void;
48
- refresh(refreshType: ItemRefreshType): this;
48
+ refresh(refreshType: ItemRefreshType, skipPlayingCheck?: boolean): this;
49
49
  protected onEquipEvent(): void;
50
50
  protected onPickUp(api: IItemPickUpApi): void;
51
51
  protected onDropInto(api: IItemDropApi, fromSlot?: ItemSlot): boolean;
@@ -10,10 +10,6 @@
10
10
  */
11
11
  import BindableManager from "@wayward/game/ui/input/BindableManager";
12
12
  export default class ActionBarBindableManager extends BindableManager {
13
- /**
14
- * Default to 1 full action bar
15
- */
16
- static readonly DEFAULT_ACTION_BAR_SLOTS = 12;
17
13
  static readonly DEFAULT_ACTION_BAR_ROW_MODIFIER_ORDER: string;
18
14
  static readonly INSTANCE: ActionBarBindableManager;
19
15
  private requiredSlots;
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright 2011-2024 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 type { IActionBarSlotData } from "@wayward/game/ui/screen/screens/game/static/actions/IActionBar";
12
+ export declare const ACTION_BAR_DEFAULT_SLOT_COUNT = 12;
13
+ declare const ACTION_BAR_DEFAULT_SLOTS: readonly IActionBarSlotData[];
14
+ export default ACTION_BAR_DEFAULT_SLOTS;
@@ -72,7 +72,6 @@ export default class ActionSlotConfigurationColumn extends Component {
72
72
  readonly hr0: HorizontalLine;
73
73
  readonly targetHoveredTileCheckButton: CheckButton;
74
74
  readonly autoUseCheckButton: CheckButton;
75
- readonly hintDiscoverMore: Paragraph;
76
75
  readonly hr1: HorizontalLine;
77
76
  readonly clearSlotButton: Button;
78
77
  readonly hr2: HorizontalLine;
@@ -19,6 +19,7 @@ export declare enum Website {
19
19
  Generic = 7,
20
20
  SteamStorePage = 8,
21
21
  Unlok = 9,
22
- Wayward = 10
22
+ Wayward = 10,
23
+ Bsky = 11
23
24
  }
24
25
  export declare const websiteLinks: Readonly<Record<Website, string>>;
@@ -18,7 +18,7 @@ export default class HighlightManager {
18
18
  *
19
19
  * Note: When not providing `until` events, the `remove` event will be subscribed to automatically.
20
20
  */
21
- register<C extends Component>(component: C, selector: HighlightSelector, ...until: Array<keyof Events<C>>): void;
21
+ register<C extends Component>(component: C, selector: HighlightSelector | undefined, ...until: Array<keyof Events<C>>): void;
22
22
  is(component: Component, selector: HighlightSelector): boolean;
23
23
  private getHighlightSelectorId;
24
24
  private getHighlightableComponents;
@@ -18,7 +18,7 @@ export interface IHighlight {
18
18
  class?: string;
19
19
  }
20
20
  export declare namespace IHighlight {
21
- function item(item: Item): HighlightSelector;
21
+ function item(item: Item): HighlightSelector | undefined;
22
22
  function optionalItem(item?: Item): HighlightSelector | undefined;
23
23
  function optionalEquipSlot(item?: Item): HighlightSelector | undefined;
24
24
  function container(container: IContainer): HighlightSelector;
@@ -9,8 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type { IWaywardTitle } from "@wayward/hosts/shared/globalTypes";
12
- export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch = 1, gameVersionName = "Runekeeper", gameVersionColor = 11015763;
13
- export declare const gameVersion = "beta2.14.1";
12
+ export declare const gameVersionStage = "beta", gameVersionMajor = 2, gameVersionMinor = 14, gameVersionPatch = 2, gameVersionName = "Runekeeper", gameVersionColor = 11015763;
13
+ export declare const gameVersion = "beta2.14.2";
14
14
  export declare const gameVersionTitleMajor = "Wayward: Runekeeper";
15
15
  export declare const gameVersionTitleMinor: string;
16
16
  export declare const gameVersionTitle: string;
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.1-beta.dev.20241217.2",
4
+ "version": "2.14.2-beta.dev.20241219.1",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",