@wayward/types 2.13.2-beta.dev.20230612.1 → 2.13.3-beta

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.
Files changed (104) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +27 -27
  3. package/definitions/game/game/doodad/IDoodad.d.ts +6 -3
  4. package/definitions/game/game/entity/action/IAction.d.ts +1 -1
  5. package/definitions/game/game/entity/action/actions/Summon.d.ts +0 -2
  6. package/definitions/game/game/entity/action/actions/TestDepth.d.ts +0 -2
  7. package/definitions/game/game/entity/action/usable/IUsableAction.d.ts +11 -5
  8. package/definitions/game/game/entity/action/usable/UsableAction.d.ts +4 -1
  9. package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +4 -2
  10. package/definitions/game/game/entity/action/usable/UsableActionTranslator.d.ts +6 -2
  11. package/definitions/game/game/entity/action/usable/actions/item/UsableActionsUseItem.d.ts +3 -1
  12. package/definitions/game/game/entity/player/PlayerManager.d.ts +5 -0
  13. package/definitions/game/game/entity/player/note/NoteManager.d.ts +1 -1
  14. package/definitions/game/game/inspection/IInspection.d.ts +2 -1
  15. package/definitions/game/game/inspection/InfoProviderContext.d.ts +9 -4
  16. package/definitions/game/game/inspection/infoProviders/LabelledValue.d.ts +3 -1
  17. package/definitions/game/game/inspection/infoProviders/Uses.d.ts +8 -5
  18. package/definitions/game/game/inspection/infoProviders/creature/CreatureTamedInfo.d.ts +1 -1
  19. package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
  20. package/definitions/game/game/inspection/infoProviders/item/ItemProtected.d.ts +3 -1
  21. package/definitions/game/game/inspection/infoProviders/item/ItemUses.d.ts +18 -3
  22. package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
  23. package/definitions/game/game/inspection/infoProviders/stat/FerocityInfo.d.ts +1 -1
  24. package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +9 -9
  25. package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
  26. package/definitions/game/game/island/IIsland.d.ts +6 -0
  27. package/definitions/game/game/island/Island.d.ts +5 -3
  28. package/definitions/game/game/item/IItem.d.ts +2 -0
  29. package/definitions/game/game/meta/prompt/IPrompt.d.ts +10 -9
  30. package/definitions/game/game/meta/prompt/PromptDescriptionFactory.d.ts +9 -5
  31. package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +2 -1
  32. package/definitions/game/game/reference/IReferenceManager.d.ts +2 -5
  33. package/definitions/game/game/reference/ReferenceManager.d.ts +4 -3
  34. package/definitions/game/game/tile/Tile.d.ts +22 -13
  35. package/definitions/game/language/Dictionary.d.ts +112 -111
  36. package/definitions/game/language/DictionaryMap.d.ts +222 -220
  37. package/definitions/game/language/dictionary/Message.d.ts +360 -358
  38. package/definitions/game/language/dictionary/Misc.d.ts +41 -39
  39. package/definitions/game/language/dictionary/UiTranslation.d.ts +734 -729
  40. package/definitions/game/language/english/ui/ActionSlotItemMethods.d.ts +13 -0
  41. package/definitions/game/language/english/ui/HelpArticles.d.ts +1 -1
  42. package/definitions/game/language/impl/TranslationImpl.d.ts +1 -0
  43. package/definitions/game/language/segment/BindSegment.d.ts +2 -1
  44. package/definitions/game/language/segment/TooltipSegment.d.ts +1 -1
  45. package/definitions/game/mod/BaseMod.d.ts +1 -1
  46. package/definitions/game/mod/ModManager.d.ts +3 -1
  47. package/definitions/game/mod/ModRegistry.d.ts +6 -3
  48. package/definitions/game/multiplayer/Multiplayer.d.ts +6 -0
  49. package/definitions/game/multiplayer/matchmaking/IMatchmaking.d.ts +8 -0
  50. package/definitions/game/multiplayer/networking/Connection.d.ts +1 -0
  51. package/definitions/game/multiplayer/networking/IConnection.d.ts +1 -0
  52. package/definitions/game/renderer/context/RendererContext.d.ts +1 -1
  53. package/definitions/game/renderer/overlay/UniversalOverlay.d.ts +30 -0
  54. package/definitions/game/renderer/particle/IParticle.d.ts +1 -3
  55. package/definitions/game/renderer/tile/TileAdaptors.d.ts +1 -2
  56. package/definitions/game/renderer/world/WorldLayer.d.ts +2 -0
  57. package/definitions/game/renderer/world/WorldLayerRenderer.d.ts +1 -1
  58. package/definitions/game/renderer/world/WorldRenderer.d.ts +2 -1
  59. package/definitions/game/save/clientStore/IClientStore.d.ts +4 -1
  60. package/definitions/game/save/clientStore/clientData/MultiplayerClientData.d.ts +13 -0
  61. package/definitions/game/save/datastorage/LocalStorageDataStorage.d.ts +1 -0
  62. package/definitions/game/steamworks/Steamworks.d.ts +2 -1
  63. package/definitions/game/ui/PromptsBridge.d.ts +2 -1
  64. package/definitions/game/ui/Ui.d.ts +1 -0
  65. package/definitions/game/ui/component/Bindings.d.ts +8 -5
  66. package/definitions/game/ui/component/Dropdown.d.ts +1 -1
  67. package/definitions/game/ui/component/SortRow.d.ts +1 -0
  68. package/definitions/game/ui/component/Text.d.ts +2 -1
  69. package/definitions/game/ui/input/Bind.d.ts +4 -0
  70. package/definitions/game/ui/input/Bindings.d.ts +2 -4
  71. package/definitions/game/ui/input/IIInput.d.ts +2 -1
  72. package/definitions/game/ui/input/IInput.d.ts +6 -0
  73. package/definitions/game/ui/input/InputManager.d.ts +1 -1
  74. package/definitions/game/ui/input/Macros.d.ts +9 -1
  75. package/definitions/game/ui/screen/Screen.d.ts +5 -0
  76. package/definitions/game/ui/screen/screens/game/component/ItemComponent.d.ts +1 -0
  77. package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +2 -0
  78. package/definitions/game/ui/screen/screens/game/dialog/SkillsDialog.d.ts +2 -0
  79. package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +2 -0
  80. package/definitions/game/ui/screen/screens/game/static/actions/ActionSlotTooltip.d.ts +1 -1
  81. package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +5 -8
  82. package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +25 -0
  83. package/definitions/game/ui/screen/screens/game/static/actions/IActionsDrawer.d.ts +6 -0
  84. package/definitions/game/ui/screen/screens/menu/menus/{HelpArticle.d.ts → HelpArticleMenu.d.ts} +1 -1
  85. package/definitions/game/ui/screen/screens/menu/menus/HelpMenu.d.ts +1 -1
  86. package/definitions/game/ui/screen/screens/menu/menus/MainMenu.d.ts +1 -0
  87. package/definitions/game/ui/screen/screens/menu/menus/help/HelpArticleDescriptions.d.ts +3 -43
  88. package/definitions/game/ui/screen/screens/menu/menus/help/IHelpArticle.d.ts +53 -0
  89. package/definitions/game/ui/screen/screens/menu/menus/mods/ModRow.d.ts +1 -1
  90. package/definitions/game/ui/tooltip/TooltipLocationHandler.d.ts +1 -0
  91. package/definitions/game/ui/tooltip/TooltipManager.d.ts +1 -0
  92. package/definitions/game/ui/util/Misc.d.ts +4 -2
  93. package/definitions/game/utilities/Version.d.ts +13 -0
  94. package/definitions/game/utilities/enum/EnumManager.d.ts +2 -1
  95. package/definitions/game/utilities/random/generators/specific/RandomItem.d.ts +1 -1
  96. package/definitions/game/utilities/string/Interpolator.d.ts +0 -1
  97. package/definitions/hosts/shared/globals.d.ts +1 -1
  98. package/definitions/matchmakingserver/globalMatchmaking.d.ts +0 -1
  99. package/definitions/matchmakingserver/shared.d.ts +1 -0
  100. package/definitions/test/core/applicationInteractions.d.ts +4 -0
  101. package/definitions/test/core/applicationManager.d.ts +1 -2
  102. package/package.json +24 -24
  103. package/tsconfig.json +7 -7
  104. package/tsconfig.mod.base.json +44 -44
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2019 Wayward
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Wayward
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,27 +1,27 @@
1
- # [Wayward Modding Guide](https://github.com/WaywardGame/types/wiki)
2
- Learn how to mod Wayward.
3
-
4
- ## **[➡ New Modders Start Here! ⬅](https://github.com/WaywardGame/types/wiki)**
5
-
6
- ## Documentation
7
- - [`+mod create` & `+mod update`](https://github.com/WaywardGame/types/wiki/mod-create-&-update) — Documentation on the commands used to generate starter files for modding, and updating script mods.
8
- - [`mod.json`](https://github.com/WaywardGame/types/wiki/mod.json) — Documentation on what all can be declared in the main mod metadata file.
9
- - [Extracting assets](https://github.com/WaywardGame/types/wiki/Extracting-Wayward-Assets) — A guide on extracting textures, sounds, and more from Wayward.
10
-
11
- ## Mod Content
12
- - [Scripts](https://github.com/WaywardGame/types/wiki/Script-Mods) — Create mods that change the functionality of the game, or add new content
13
- - [Languages & Extensions](https://github.com/WaywardGame/types/wiki/Languages-&-Extensions) — Adding new languages to Wayward, or adding translatable strings to mods.
14
- - [Customizations](https://github.com/WaywardGame/types/wiki/Customizations) — Adding new hair styles, hair colours, and skin tones
15
- - [Image Overrides](https://github.com/WaywardGame/types/wiki/Image-Overrides) — Replacing default sprites & textures
16
- - [Stylesheets](https://github.com/WaywardGame/types/wiki/Stylesheets) — Changing the appearance of the UI
17
-
18
- # Other Useful Links
19
-
20
- ## [Wayward Types Viewer](https://waywardgame.github.io/)
21
- A pretty, searchable list of all the type definitions in Wayward. This `types` repository is actually the same stuff you can find on this website, but it's the *raw* form of it!
22
-
23
- ## [Modding Examples](https://github.com/WaywardGame)
24
- Every official mod created for Wayward, and some other Wayward-related projects.
25
-
26
- ## [Steam Workshop](http://steamcommunity.com/app/379210/workshop/)
27
- Where Wayward mods are published.
1
+ # [Wayward Modding Guide](https://github.com/WaywardGame/types/wiki)
2
+ Learn how to mod Wayward.
3
+
4
+ ## **[➡ New Modders Start Here! ⬅](https://github.com/WaywardGame/types/wiki)**
5
+
6
+ ## Documentation
7
+ - [`+mod create` & `+mod update`](https://github.com/WaywardGame/types/wiki/mod-create-&-update) — Documentation on the commands used to generate starter files for modding, and updating script mods.
8
+ - [`mod.json`](https://github.com/WaywardGame/types/wiki/mod.json) — Documentation on what all can be declared in the main mod metadata file.
9
+ - [Extracting assets](https://github.com/WaywardGame/types/wiki/Extracting-Wayward-Assets) — A guide on extracting textures, sounds, and more from Wayward.
10
+
11
+ ## Mod Content
12
+ - [Scripts](https://github.com/WaywardGame/types/wiki/Script-Mods) — Create mods that change the functionality of the game, or add new content
13
+ - [Languages & Extensions](https://github.com/WaywardGame/types/wiki/Languages-&-Extensions) — Adding new languages to Wayward, or adding translatable strings to mods.
14
+ - [Customizations](https://github.com/WaywardGame/types/wiki/Customizations) — Adding new hair styles, hair colours, and skin tones
15
+ - [Image Overrides](https://github.com/WaywardGame/types/wiki/Image-Overrides) — Replacing default sprites & textures
16
+ - [Stylesheets](https://github.com/WaywardGame/types/wiki/Stylesheets) — Changing the appearance of the UI
17
+
18
+ # Other Useful Links
19
+
20
+ ## [Wayward Types Viewer](https://waywardgame.github.io/)
21
+ A pretty, searchable list of all the type definitions in Wayward. This `types` repository is actually the same stuff you can find on this website, but it's the *raw* form of it!
22
+
23
+ ## [Modding Examples](https://github.com/WaywardGame)
24
+ Every official mod created for Wayward, and some other Wayward-related projects.
25
+
26
+ ## [Steam Workshop](http://steamcommunity.com/app/379210/workshop/)
27
+ Where Wayward mods are published.
@@ -456,7 +456,10 @@ export declare enum DoodadTypeGroup {
456
456
  Last = 420
457
457
  }
458
458
  export declare enum DoorOrientation {
459
- Default = 0,
459
+ /**
460
+ * Horizontal (handle on right)
461
+ */
462
+ Horizontal = 0,
460
463
  Vertical = 1
461
464
  }
462
465
  export declare enum GrowingStage {
@@ -472,7 +475,7 @@ export interface IHasBuilder {
472
475
  getBuilder(): Human | undefined;
473
476
  }
474
477
  export interface IHasWater {
475
- top?: boolean;
476
- bottom?: boolean;
478
+ top?: true;
479
+ bottom?: true;
477
480
  }
478
481
  export {};
@@ -189,7 +189,7 @@ export declare enum ActionDisplayLevel {
189
189
  export interface IActionUsable {
190
190
  usable: true;
191
191
  /**
192
- * Whether this action is currently usable with the "use on move" feature. Defaults to `true`
192
+ * Whether this action is currently usable with the "auto-use" feature. Defaults to `true`
193
193
  */
194
194
  usableOnMove?: boolean;
195
195
  displayLevel?: ActionDisplayLevel;
@@ -11,11 +11,9 @@
11
11
  import { Action } from "game/entity/action/Action";
12
12
  import type { IActionUsable } from "game/entity/action/IAction";
13
13
  import { ActionArgument } from "game/entity/action/IAction";
14
- import type { ISummon } from "game/item/IItem";
15
14
  import type Tile from "game/tile/Tile";
16
15
  export interface ISummonAction extends IActionUsable {
17
16
  tile: Tile;
18
- creatureSummon: ISummon;
19
17
  }
20
18
  /**
21
19
  * Summon a creature (golem) from an item.
@@ -12,11 +12,9 @@ import type Doodad from "game/doodad/Doodad";
12
12
  import { Action } from "game/entity/action/Action";
13
13
  import type { IActionUsable } from "game/entity/action/IAction";
14
14
  import { ActionArgument } from "game/entity/action/IAction";
15
- import type { ITerrainDescription } from "game/tile/ITerrain";
16
15
  import type Tile from "game/tile/Tile";
17
16
  export interface ITestDepthCanUse extends IActionUsable {
18
17
  doodad: Doodad;
19
- terrainDescription: ITerrainDescription;
20
18
  tile: Tile;
21
19
  }
22
20
  declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default<number>, void, ITestDepthCanUse, [(import("../../../item/Item").default | undefined)?]>;
@@ -24,6 +24,7 @@ import type { Quality } from "game/IObject";
24
24
  import type { ItemType } from "game/item/IItem";
25
25
  import type Item from "game/item/Item";
26
26
  import type ItemFinder from "game/item/ItemFinder";
27
+ import type { IItemFinderOptions } from "game/item/ItemFinder";
27
28
  import type Message from "language/dictionary/Message";
28
29
  import Translation from "language/Translation";
29
30
  import type Bindable from "ui/input/Bindable";
@@ -39,8 +40,9 @@ export interface IUsableActionRequirement<TYPE> {
39
40
  }
40
41
  export interface IUsableActionItemRequirement extends Omit<IUsableActionRequirement<Item>, "find"> {
41
42
  allowOnlyItemType?(player: Player, type: ItemType): boolean;
42
- finder?(player: Player): ItemFinder | undefined;
43
+ finder?(player: Player, defaultOptions?: IItemFinderOptions, provided?: Omit<IUsableActionPossibleUsing, "item">): ItemFinder | undefined;
43
44
  requiresQuality?: true;
45
+ requiresType?: true;
44
46
  }
45
47
  export declare namespace IUsableActionRequirement {
46
48
  interface Maybe<TYPE> {
@@ -182,6 +184,10 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
182
184
  bindable?: Bindable | ((using: IUsableActionUsing<REQUIREMENTS>) => Bindable | undefined);
183
185
  inspectTypes?: InspectType[];
184
186
  inspect?(type: InspectType, using: IUsableActionPossibleUsing): HashSet<Inspection<any>> | Inspection<any> | undefined;
187
+ /**
188
+ * A hint for the inspection system that this UA is internally using a specific action. Use tooltip filtering checks this.
189
+ */
190
+ useHintAction?: ActionType;
185
191
  /**
186
192
  * The contexts this action appears in.
187
193
  * - "Always" means whenever an action of this type is shown, it will be. For example, the "item actions" menu.
@@ -216,19 +222,19 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
216
222
  * as internal actions are called on all sides, rather than only clientside*.
217
223
  *
218
224
  * ***Warning:** While usable actions appear to only ever be client-side, they're *not always.*
219
- * The "use when moving" feature for action slots results in actions being executed *only* on the server's side.
220
- * **If you try to perform a client-side UI function here, such as showing a prompt, and a player puts the action in a "use when moving" action slot,
225
+ * The "auto-use" feature for action slots results in actions being executed *only* on the server's side.
226
+ * **If you try to perform a client-side UI function here, such as showing a prompt, and a player puts the action in a "auto-use" action slot,
221
227
  * the host will receive the prompt instead!**
222
228
  *
223
229
  * If you'd like to execute some things on clientside, you can check if the player is the local player by checking `if (player.asLocalPlayer)`,
224
- * or ensure that this action is only executed clientside by setting `clientSide: true`, which disables support for the "use when moving" feature.
230
+ * or ensure that this action is only executed clientside by setting `clientSide: true`, which disables support for the "auto-use" feature.
225
231
  * @param player The player executing this action. This isn't always the local player!
226
232
  * @param using What the player is using — items, doodads, etc.
227
233
  * @param context Context to do with this action execution — where it's executed from, etc.
228
234
  */
229
235
  execute?(player: Player, using: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): any;
230
236
  /**
231
- * Marks this usable action as only executable client-side. This disables support for "use when moving" in action slots.
237
+ * Marks this usable action as only executable client-side. This disables support for "auto-use" in action slots.
232
238
  */
233
239
  clientSide?: true;
234
240
  /**
@@ -16,6 +16,7 @@ import type { ActionWhichTranslation } from "game/entity/action/usable/UsableAct
16
16
  import type Player from "game/entity/player/Player";
17
17
  import type { IIcon } from "game/inspection/InfoProvider";
18
18
  import type Item from "game/item/Item";
19
+ import Message from "language/dictionary/Message";
19
20
  import type Translation from "language/Translation";
20
21
  import type { HighlightSelector } from "ui/util/IHighlight";
21
22
  export declare const USABLE_ACTION_USE_ON_MOVE_UNLOCK_AT = 20;
@@ -44,7 +45,8 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
44
45
  constructor(requirements: REQUIREMENTS, definition: DEFINITION);
45
46
  isExecutable(): this is UsableAction<REQUIREMENTS, IUsableActionDefinitionExecutable<REQUIREMENTS>>;
46
47
  execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): boolean;
47
- resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>): false | IUsableActionUsing<REQUIREMENTS>;
48
+ resolveUsing(player: Player, using: IUsableActionUsing<REQUIREMENTS>): Message.UiActionCannotUseRequiresCreature | Message.UiActionCannotUseRequiresDoodad | Message.UiActionCannotUseRequiresItem | Message.UiActionCannotUseRequiresNPC | IUsableActionUsing<REQUIREMENTS>;
49
+ resolveUsingOrUndefined(player: Player, using: IUsableActionUsing<REQUIREMENTS>): IUsableActionUsing<REQUIREMENTS> | undefined;
48
50
  isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: UsableActionExecutionContext | IUsableActionExecutionContext): UsableActionUsability<REQUIREMENTS>;
49
51
  isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
50
52
  private isItemApplicable;
@@ -56,6 +58,7 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
56
58
  getItem(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): Item | false | undefined;
57
59
  private requirementsItemFinders?;
58
60
  private getItemFinder;
61
+ private createItemFinder;
59
62
  private itemFinderFullCheck?;
60
63
  private itemFinderSimpleCheck?;
61
64
  private getItemByType;
@@ -15,9 +15,11 @@ import type { ActionId, IUsableActionPossibleUsing, IUsableActionRequirements }
15
15
  import type UsableAction from "game/entity/action/usable/UsableAction";
16
16
  import ContextMenu from "ui/component/ContextMenu";
17
17
  export default class UsableActionRegistrar {
18
+ private readonly id;
18
19
  readonly actions: Array<[string, UsableAction]>;
19
20
  readonly actionIndices: Record<string, number>;
20
21
  readonly actionIds: string[];
22
+ constructor(id: string);
21
23
  byId(id?: ActionId): UsableAction | undefined;
22
24
  filter(filter: (action: UsableAction, id: string) => any): UsableActionRegistrar;
23
25
  private contextMenuInitializer?;
@@ -70,8 +72,8 @@ export declare class UsableActionGenerator<ARGS extends any[] = []> extends Even
70
72
  * Forcibly regenerates and returns a new action registrar from this generator.
71
73
  * If this generator is marked for persistence, the generated registrar will be cached and accessible thereafter by `get()`.
72
74
  */
73
- generate(...args: ARGS): UsableActionRegistrar;
74
- private activePersistences;
75
+ private generate;
76
+ private existingPersistenceId?;
75
77
  /**
76
78
  * Marks this generator for persistence when the "when" event occurs,
77
79
  * and unmarks this generator for persistence when the "until" event occurs.
@@ -11,9 +11,11 @@
11
11
  import type { ActionId, IUsableActionPossibleUsing } from "game/entity/action/usable/IUsableAction";
12
12
  import { UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
13
13
  import type UsableAction from "game/entity/action/usable/UsableAction";
14
+ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
14
15
  import { ActionTranslation } from "language/dictionary/Misc";
16
+ import type { TranslationArg } from "language/ITranslation";
15
17
  import Translation from "language/Translation";
16
- export type UsableActionTranslationArguments = [using: IUsableActionPossibleUsing, action: UsableAction, context: UsableActionDisplayContext];
18
+ export type UsableActionTranslationArguments = [using: IUsableActionPossibleUsing, action: UsableAction, context: UsableActionDisplayContext, inspectionContext?: InfoProviderContext];
17
19
  export type ActionWhichTranslation = ActionTranslation | "useExact" | "useByTypeAndQuality" | "useByType" | "useAny";
18
20
  export declare class UsableActionTranslator {
19
21
  readonly id: ActionId;
@@ -24,14 +26,16 @@ export declare class UsableActionTranslator {
24
26
  private useByTypeAndQualitySupplier?;
25
27
  private useByTypeSupplier?;
26
28
  private useAnySupplier?;
29
+ private readonly args;
27
30
  constructor(id: ActionId);
28
31
  name(id: ActionId): this;
29
32
  name(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
33
+ addArgs(...args: Array<Exclude<TranslationArg, () => TranslationArg> | Supplier<TranslationArg, UsableActionTranslationArguments>>): this;
30
34
  description(id: ActionId): this;
31
35
  description(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
32
36
  useExact(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
33
37
  useByTypeAndQuality(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
34
38
  useByType(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
35
39
  useAny(supplier: SupplierOr<Translation, UsableActionTranslationArguments>): this;
36
- get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionWhichTranslation, context?: UsableActionDisplayContext): Translation | undefined;
40
+ get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionWhichTranslation, context?: UsableActionDisplayContext, inspectionContext?: InfoProviderContext): Translation | undefined;
37
41
  }
@@ -18,15 +18,17 @@ import type { IGetBestItemsOptions } from "game/item/IItemManager";
18
18
  import type Item from "game/item/Item";
19
19
  export interface IUseItemAction extends IUsableActionDynamicDefinition {
20
20
  canDamageItem?: true;
21
- allowProtectedItems?: true;
22
21
  allowAnyItems?: true;
23
22
  allowNoItem?: true;
24
23
  hasNoBestItem?: true;
24
+ skipUseCheck?: true;
25
25
  filterFind?(item: Item, player: Player): boolean;
26
26
  validate?(item: Item, player: Player): boolean;
27
27
  initialiseFinder?(finder: UsableActionItemFinder): any;
28
28
  onFinderTrack?(finder: UsableActionItemFinder): any;
29
29
  onFinderDispose?(finder: UsableActionItemFinder): any;
30
+ requiresQuality?: true;
31
+ requiresType?: true;
30
32
  }
31
33
  export declare namespace IUseItemAction {
32
34
  function getGetItemOptions(actionType: ActionType, useItemAction?: Omit<IUseItemAction, keyof IUsableActionDynamicDefinition>): Partial<IGetBestItemsOptions>;
@@ -83,4 +83,9 @@ export default class PlayerManager extends EventEmitter.Host<IPlayerManagerEvent
83
83
  * Finds the first available player id in the array
84
84
  */
85
85
  private findAvailablePlayerId;
86
+ /**
87
+ * Clears the existing client secret for the player
88
+ * @param playerIdentifier Player identifier
89
+ */
90
+ clearClientSecret(playerIdentifier: string): void;
86
91
  }
@@ -15,7 +15,7 @@ import type { TranslationArg } from "language/ITranslation";
15
15
  import Translation from "language/Translation";
16
16
  import Note from "language/dictionary/Note";
17
17
  import type { IModdable } from "mod/ModRegistry";
18
- import { HelpArticle } from "ui/screen/screens/menu/menus/help/HelpArticleDescriptions";
18
+ import { HelpArticle } from "ui/screen/screens/menu/menus/help/IHelpArticle";
19
19
  export interface INoteDescription extends IModdable {
20
20
  learnMore?: HelpArticle;
21
21
  }
@@ -44,5 +44,6 @@ export declare enum InfoIcon {
44
44
  PinFriend = 3,
45
45
  PinMap = 4,
46
46
  ActionUndiscovered = 5,
47
- PinLighthouse = 6
47
+ ActionUsingAnyItem = 6,
48
+ PinLighthouse = 7
48
49
  }
@@ -10,17 +10,22 @@
10
10
  */
11
11
  import type { IInspector } from "game/inspection/IInfoProvider";
12
12
  import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
13
+ export interface InfoProviderContextRegistration {
14
+ }
13
15
  export declare enum InfoProviderContextType {
14
- Tooltip = 0,
15
- Generic = 1
16
+ Generic = 0,
17
+ Tooltip = 1
16
18
  }
17
19
  export declare class InfoProviderContext {
18
20
  static readonly GENERIC: new (inspector?: IInspector | undefined, maxDisplayLevel?: InfoDisplayLevel | undefined) => InfoProviderContext;
19
21
  static readonly TOOLTIP: new (inspector?: IInspector | undefined, maxDisplayLevel?: InfoDisplayLevel | undefined) => InfoProviderContext;
20
22
  protected readonly _inspector: WeakRef<IInspector>;
21
- readonly type: InfoProviderContextType;
23
+ readonly type: InfoProviderContextType | keyof InfoProviderContextRegistration;
22
24
  readonly maxDisplayLevel: InfoDisplayLevel;
23
25
  constructor(context: InfoProviderContext);
24
- constructor(type: InfoProviderContextType, inspector?: IInspector, maxDisplayLevel?: InfoDisplayLevel);
26
+ constructor(type: InfoProviderContextType | keyof InfoProviderContextRegistration, inspector?: IInspector, maxDisplayLevel?: InfoDisplayLevel);
25
27
  get inspector(): IInspector | undefined;
28
+ is(...types: Array<InfoProviderContextType | keyof InfoProviderContextRegistration>): boolean;
29
+ as<TYPE extends keyof InfoProviderContextRegistration>(type: TYPE): InfoProviderContextRegistration[TYPE] | undefined;
30
+ as(type: InfoProviderContextType): InfoProviderContext | undefined;
26
31
  }
@@ -8,7 +8,7 @@
8
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
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
- import type { InfoDisplayLevel } from "game/inspection/IInfoProvider";
11
+ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
12
12
  import { InfoProvider } from "game/inspection/InfoProvider";
13
13
  import UiTranslation from "language/dictionary/UiTranslation";
14
14
  import Translation from "language/Translation";
@@ -38,6 +38,8 @@ export default class LabelledValue extends InfoProvider {
38
38
  getClass(): string[];
39
39
  addClasses(...classes: string[]): this;
40
40
  private getLabel;
41
+ private getPunctuation;
42
+ private getContent;
41
43
  get(): Array<Translation | InfoProvider>;
42
44
  protected initChildTextComponent(text: TranslationGenerator): Text;
43
45
  setDisplayMode(mode: keyof typeof LabelledValueDisplayMode): this;
@@ -9,19 +9,21 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { ActionType } from "game/entity/action/IAction";
12
+ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
12
13
  import { InfoProvider } from "game/inspection/InfoProvider";
13
14
  import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
14
15
  import type UseInfo from "game/inspection/infoProviders/UseInfo";
15
16
  import type { DescribedDescription, IDescribed } from "game/inspection/infoProviders/UseInfo";
16
17
  import UiTranslation from "language/dictionary/UiTranslation";
18
+ import type TranslationImpl from "language/impl/TranslationImpl";
17
19
  import Translation from "language/Translation";
18
20
  import type { TranslationGenerator } from "ui/component/IComponent";
19
21
  export default abstract class Uses<T extends IDescribed> extends InfoProvider {
20
22
  private label?;
21
- private readonly value?;
22
- private readonly type;
23
- private readonly entityType;
24
- private readonly description?;
23
+ protected readonly value?: T;
24
+ protected readonly type: T["type"];
25
+ protected readonly entityType: T["entityType"];
26
+ protected readonly description?: DescribedDescription<T>;
25
27
  protected abstract getEntityType(): T["entityType"];
26
28
  protected abstract getDescription(type: T["type"]): DescribedDescription<T> | undefined;
27
29
  constructor(value: T["type"]);
@@ -34,7 +36,8 @@ export default abstract class Uses<T extends IDescribed> extends InfoProvider {
34
36
  addDetails(...details: symbol[]): this;
35
37
  get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
36
38
  private getUseExtraInfo;
39
+ protected getUseDisplayLevel(action: ActionType, context: InfoProviderContext): InfoDisplayLevel;
37
40
  private getDetailsHandlerResolver;
38
- private getUse;
41
+ protected getUse(description: DescribedDescription<T>, action: ActionType): TranslationImpl;
39
42
  private getUseName;
40
43
  }
@@ -22,6 +22,6 @@ export default class CreatureTamedInfoProvider extends InfoProvider {
22
22
  constructor(creature: Creature);
23
23
  getClass(): string[];
24
24
  hasContent(): boolean;
25
- get(): (import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
25
+ get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
26
26
  private getHappinessMessage;
27
27
  }
@@ -19,7 +19,7 @@ export default class ItemDetailsInfoProvider extends InfoProvider {
19
19
  private readonly description;
20
20
  constructor(item: Item | ItemType);
21
21
  getClass(): string[];
22
- get(): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue | ItemWorthInfoProvider)[];
22
+ get(): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider | ItemWorthInfoProvider)[];
23
23
  private getInsulation;
24
24
  private getPreservation;
25
25
  private getGroupings;
@@ -9,6 +9,8 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import { InfoProvider } from "game/inspection/InfoProvider";
12
+ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
13
+ import LabelledValue from "game/inspection/infoProviders/LabelledValue";
12
14
  import type Item from "game/item/Item";
13
15
  import { PathType } from "resource/IResourceLoader";
14
16
  import ImagePath from "ui/util/ImagePath";
@@ -24,6 +26,6 @@ export default class ItemProtectedInfoProvider extends InfoProvider {
24
26
  height: number;
25
27
  };
26
28
  hasContent(): boolean;
27
- get(): import("../../../../language/impl/TranslationImpl").default;
29
+ get(context: InfoProviderContext): LabelledValue;
28
30
  protected onToggleProtected(item: Item): void;
29
31
  }
@@ -10,13 +10,18 @@
10
10
  */
11
11
  import { ActionType } from "game/entity/action/IAction";
12
12
  import { EntityType } from "game/entity/IEntity";
13
+ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
14
+ import { InfoProviderContext } from "game/inspection/InfoProviderContext";
13
15
  import Uses from "game/inspection/infoProviders/Uses";
14
16
  import type { IItemDescription, ItemType } from "game/item/IItem";
15
17
  import type Item from "game/item/Item";
18
+ import UiTranslation from "language/dictionary/UiTranslation";
19
+ import type TranslationImpl from "language/impl/TranslationImpl";
16
20
  export default class ItemUses extends Uses<Item> {
17
21
  protected getEntityType(): EntityType.Item;
18
22
  protected getDescription(type: ItemType): IItemDescription;
19
23
  protected getUses(description: IItemDescription): ActionType[];
24
+ protected getUseDisplayLevel(action: ActionType, context: InfoProviderContext): InfoDisplayLevel;
20
25
  protected getUseInfoHandlers(): (import("../UseInfo").default<{
21
26
  doodadContainer: import("../../../doodad/IDoodad").IDoodadDescription | undefined;
22
27
  civilizationScore: number | undefined;
@@ -83,7 +88,7 @@ export default class ItemUses extends Uses<Item> {
83
88
  union: import("../UseInfo").IUseInfoBase<Item, ActionType.Disassemble>;
84
89
  details: Set<symbol>;
85
90
  }, ActionType.Disassemble, {
86
- getRequiredItems: () => import("../../../../language/impl/TranslationImpl").default[];
91
+ getRequiredItems: () => TranslationImpl[];
87
92
  }, Item> | import("../UseInfo").default<{
88
93
  dismantle: import("game/item/IItem").IDismantleDescription;
89
94
  entityType: EntityType.Item;
@@ -107,7 +112,7 @@ export default class ItemUses extends Uses<Item> {
107
112
  }, ActionType.Equip, {
108
113
  getMagicalEquipTypes: () => Set<import("../../../magic/MagicalPropertyType").MagicalPropertyType>;
109
114
  } & {
110
- getMagicalPropertyLabels: () => Map<import("../../../magic/MagicalPropertyType").MagicalPropertyType, import("../../../../language/dictionary/UiTranslation").default>;
115
+ getMagicalPropertyLabels: () => Map<import("../../../magic/MagicalPropertyType").MagicalPropertyType, UiTranslation>;
111
116
  } & {
112
117
  isMagicalPropertyPercentage: (property: import("../../../magic/MagicalPropertyType").MagicalPropertyType) => boolean;
113
118
  } & {
@@ -115,7 +120,7 @@ export default class ItemUses extends Uses<Item> {
115
120
  } & {
116
121
  getAttack: () => import("../MagicalPropertyValue").default | undefined;
117
122
  } & {
118
- getDefense: () => (import("../../../../language/impl/TranslationImpl").default | import("../MagicalPropertyValue").default)[];
123
+ getDefense: () => (TranslationImpl | import("../MagicalPropertyValue").default)[];
119
124
  } & {
120
125
  formatInsulation: (insulation?: number | undefined, type?: import("../../../temperature/ITemperature").TempType | undefined) => import("../LabelledValue").default;
121
126
  } & {
@@ -201,4 +206,14 @@ export default class ItemUses extends Uses<Item> {
201
206
  union: import("../UseInfo").IUseInfoBase<Item, ActionType.Build>;
202
207
  details: Set<symbol>;
203
208
  }, ActionType.Build, {}, Item> | import("../UseInfo").default<import("../UseInfo").IUseInfoBase<Item, ActionType.StartFire | ActionType.Ignite | ActionType.Equip>, ActionType.StartFire | ActionType.Ignite | ActionType.Equip, {}, Item>)[];
209
+ protected getUse(description: IItemDescription, action: ActionType): TranslationImpl;
210
+ }
211
+ declare module "game/inspection/InfoProviderContext" {
212
+ interface InfoProviderContextRegistration {
213
+ ItemUse: ItemUseContext;
214
+ }
215
+ }
216
+ export declare class ItemUseContext extends InfoProviderContext {
217
+ readonly item?: Item | undefined;
218
+ constructor(item?: Item | undefined);
204
219
  }
@@ -12,7 +12,7 @@ import LabelledValue from "game/inspection/infoProviders/LabelledValue";
12
12
  import { StatInfo } from "game/inspection/infoProviders/stat/StatInfo";
13
13
  export default class AttackInfo extends StatInfo {
14
14
  getClass(): string[];
15
- get(): (import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
15
+ get(): (LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
16
16
  private getTactics;
17
17
  private getMainHand;
18
18
  private getOffHand;
@@ -24,5 +24,5 @@ export default class FerocityInfo extends StatInfo {
24
24
  readonly ticks: InfoProvider.Observer<number>;
25
25
  getTitle(stat: Stat): SimpleInfoProvider;
26
26
  getClass(): string[];
27
- get(): (SimpleInfoProvider | LabelledValue)[];
27
+ get(): (LabelledValue | SimpleInfoProvider)[];
28
28
  }
@@ -12,26 +12,26 @@ import type { ActionId, IUsableActionPossibleUsing } from "game/entity/action/us
12
12
  import { UsableActionDisplayContext } from "game/entity/action/usable/IUsableAction";
13
13
  import { InspectType } from "game/inspection/IInspection";
14
14
  import { InfoProvider } from "game/inspection/InfoProvider";
15
- import { InfoProviderContext } from "game/inspection/InfoProviderContext";
15
+ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
16
16
  import Inspection from "game/inspection/Inspection";
17
17
  import type { EnumReferenceResolved } from "game/reference/IReferenceManager";
18
18
  import { ReferenceType } from "game/reference/IReferenceManager";
19
19
  import type { TranslationGenerator } from "ui/component/IComponent";
20
- import type { ActionSlot } from "ui/screen/screens/game/static/ActionBar";
21
20
  export default class ActionInspection extends Inspection<ActionId | undefined> {
22
- private readonly slot?;
23
21
  static handles: (type: InspectType, value: unknown, context?: InfoProviderContext | undefined) => boolean;
24
- private readonly item?;
25
- using?: IUsableActionPossibleUsing;
26
- constructor(value?: string | EnumReferenceResolved<ReferenceType.Action>, slot?: ActionSlot | undefined);
27
- setUsing(using?: IUsableActionPossibleUsing): this;
28
- setContext(context: UsableActionDisplayContext): this;
22
+ constructor(value?: string | EnumReferenceResolved<ReferenceType.Action>);
23
+ private get using();
24
+ private get item();
29
25
  getId(): string;
30
26
  private getActionId;
31
27
  get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
28
+ private getActionSlotItemMode;
32
29
  private getTranslation;
30
+ static getActionNameWithTier(id: ActionId, context: UsableActionDisplayContext, provided: IUsableActionPossibleUsing | undefined, resolveUsing: boolean): import("../../../language/impl/TranslationImpl").default | undefined;
31
+ private static getTranslation;
33
32
  private getActionDiscovered;
34
- private getActionTier;
33
+ private static getActionTier;
34
+ private getActionTierInfo;
35
35
  private getActionUsability;
36
36
  private getActionExample;
37
37
  }
@@ -19,7 +19,7 @@ export default class CorpseInspection extends Inspection<Corpse> {
19
19
  static getFromTile(tile: Tile): CorpseInspection[];
20
20
  static handles(type: InspectType, corpse: unknown): boolean;
21
21
  constructor(corpse: Corpse);
22
- get(context: InfoProviderContext): (0 | import("game/inspection/InfoProvider").SimpleInfoProvider | LabelledValue)[];
22
+ get(context: InfoProviderContext): (0 | LabelledValue | import("game/inspection/InfoProvider").SimpleInfoProvider)[];
23
23
  private getDecay;
24
24
  private decay;
25
25
  private shouldRefreshDecay;
@@ -96,6 +96,12 @@ export interface IIslandEvents {
96
96
  portsChanged(addedPort?: Port, removedPort?: Port): any;
97
97
  getDefense(defense: Defense | undefined, target: Human | Creature | CreatureType, damageType?: DamageType): Defense | undefined;
98
98
  calculateAttackOutcome(damageOutcome: IDamageOutcome, input: IDamageOutcomeInput, attackValue: number, defenseValue: number): IDamageOutcome | undefined;
99
+ /**
100
+ * Called when determining how many ticks to process when fast forwarding an island during traveling
101
+ * @param fastForwardAmount Fast forward amount
102
+ * @param travelTime Travel time
103
+ */
104
+ getFastForwardAmount(fastForwardAmount: number, travelTime: number): number | undefined;
99
105
  }
100
106
  export interface ILegacySeeds {
101
107
  type: SeedType.Legacy;