@wayward/types 2.12.0-beta.dev.20220904.1 → 2.12.0-beta.dev.20220907.8

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 (59) hide show
  1. package/definitions/game/IGlobal.d.ts +4 -1
  2. package/definitions/game/game/entity/Entity.d.ts +20 -6
  3. package/definitions/game/game/entity/Human.d.ts +3 -5
  4. package/definitions/game/game/entity/IHuman.d.ts +20 -0
  5. package/definitions/game/game/entity/action/IAction.d.ts +2 -1
  6. package/definitions/game/game/entity/action/usable/UsableAction.d.ts +7 -6
  7. package/definitions/game/game/entity/action/usable/UsableActionType.d.ts +63 -53
  8. package/definitions/game/game/inspection/infoProviders/UseInfo.d.ts +2 -0
  9. package/definitions/game/game/inspection/infoProviders/doodad/Gatherability.d.ts +26 -0
  10. package/definitions/game/game/inspection/infoProviders/doodad/Harvestability.d.ts +1 -1
  11. package/definitions/game/game/item/Item.d.ts +5 -4
  12. package/definitions/game/game/item/ItemManager.d.ts +7 -0
  13. package/definitions/game/game/options/modifiers/milestone/MilestoneModifiersManager.d.ts +1 -1
  14. package/definitions/game/language/Dictionary.d.ts +61 -60
  15. package/definitions/game/language/DictionaryMap.d.ts +122 -118
  16. package/definitions/game/language/dictionary/Message.d.ts +5 -5
  17. package/definitions/game/language/dictionary/UiTranslation.d.ts +563 -556
  18. package/definitions/game/language/english/ui/InventorySorts.d.ts +13 -0
  19. package/definitions/game/mod/ModRegistry.d.ts +36 -2
  20. package/definitions/game/multiplayer/packets/client/EmitPlayerEventPacket.d.ts +2 -2
  21. package/definitions/game/renderer/IRenderer.d.ts +36 -38
  22. package/definitions/game/renderer/context/RendererOrigin.d.ts +3 -2
  23. package/definitions/game/renderer/tile/TileLayer.d.ts +1 -1
  24. package/definitions/game/resource/IResourceLoader.d.ts +2 -1
  25. package/definitions/game/resource/SpritePacker.d.ts +1 -0
  26. package/definitions/game/steamworks/ISteamworks.d.ts +7 -0
  27. package/definitions/game/steamworks/Steamworks.d.ts +5 -2
  28. package/definitions/game/typings/jqueryui.d.ts +1 -3
  29. package/definitions/game/ui/IUi.d.ts +3 -1
  30. package/definitions/game/ui/Ui.d.ts +1 -0
  31. package/definitions/game/ui/component/Button.d.ts +1 -1
  32. package/definitions/game/ui/component/ContextMenu.d.ts +3 -0
  33. package/definitions/game/ui/component/GroupDropdown.d.ts +1 -0
  34. package/definitions/game/ui/component/Input.d.ts +6 -0
  35. package/definitions/game/ui/component/SortRow.d.ts +5 -0
  36. package/definitions/game/ui/component/Text.d.ts +2 -2
  37. package/definitions/game/ui/input/IInput.d.ts +7 -0
  38. package/definitions/game/ui/input/InputManager.d.ts +0 -6
  39. package/definitions/game/ui/input/Macros.d.ts +2 -0
  40. package/definitions/game/ui/old/screens/InGameScreen.d.ts +8 -5
  41. package/definitions/game/ui/screen/screens/game/component/Item.d.ts +1 -0
  42. package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +3 -0
  43. package/definitions/game/ui/screen/screens/game/static/actions/ActionBarBindableManager.d.ts +2 -0
  44. package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +2 -0
  45. package/definitions/game/ui/screen/screens/game/util/movement/MovementHandler.d.ts +1 -1
  46. package/definitions/game/ui/screen/screens/game/util/movement/WalkToTileHandler.d.ts +1 -1
  47. package/definitions/game/ui/screen/screens/menu/menus/BindingsMenu.d.ts +1 -0
  48. package/definitions/game/ui/screen/screens/menu/menus/PauseMenu.d.ts +1 -0
  49. package/definitions/game/ui/screen/screens/menu/menus/main/component/IWebsite.d.ts +5 -2
  50. package/definitions/game/ui/screen/screens/menu/menus/main/component/SocialRow.d.ts +2 -1
  51. package/definitions/game/ui/screen/screens/menu/menus/options/BindRow.d.ts +1 -0
  52. package/definitions/game/ui/tooltip/Tooltip.d.ts +2 -1
  53. package/definitions/game/utilities/enum/EnumManager.d.ts +5 -0
  54. package/definitions/game/utilities/enum/IEnum.d.ts +3 -1
  55. package/definitions/hosts/shared/globalTypes.d.ts +8 -6
  56. package/definitions/hosts/shared/globals.d.ts +4 -1
  57. package/definitions/test/core/application.d.ts +1 -0
  58. package/definitions/test/core/chromeDriver.d.ts +1 -1
  59. package/package.json +1 -1
@@ -9,6 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import "@cplusplus/index";
12
+ import "@hosts/shared/globalTypes";
12
13
  import "@wayward/goodstream/apply";
13
14
  import type WAudio from "audio/Audio";
14
15
  import type CommandManager from "command/CommandManager";
@@ -41,7 +42,6 @@ import "utilities/typesglobal/Iterables";
41
42
  import "utilities/typesglobal/Misc";
42
43
  import "utilities/typesglobal/Objects";
43
44
  import "utilities/typesglobal/Types";
44
- import "@hosts/shared/globalTypes";
45
45
  declare global {
46
46
  let absentPlayers: Player[];
47
47
  let audio: WAudio | undefined;
@@ -69,6 +69,9 @@ declare global {
69
69
  const gameVersionMinor: number;
70
70
  const gameVersionPatch: number;
71
71
  const gameVersionName: string;
72
+ const gameVersionTitleMajor: string;
73
+ const gameVersionTitleMinor: string;
74
+ const gameVersionTitle: string;
72
75
  const isNodeJs: boolean;
73
76
  const isWebWorker: boolean;
74
77
  const overlayWorks: boolean | undefined;
@@ -15,7 +15,7 @@ import type { IDamageInfo } from "game/entity/creature/ICreature";
15
15
  import type Human from "game/entity/Human";
16
16
  import type { IEntityEvents, IProperties, IStatus, Property, StatusEffectChangeReason } from "game/entity/IEntity";
17
17
  import { DamageType, EntityType, MoveType, StatusType } from "game/entity/IEntity";
18
- import { Delay } from "game/entity/IHuman";
18
+ import { Delay, MovingClientSide } from "game/entity/IHuman";
19
19
  import type { IStats } from "game/entity/IStats";
20
20
  import type NPC from "game/entity/npc/NPC";
21
21
  import type Player from "game/entity/player/Player";
@@ -30,14 +30,15 @@ import type { ITemperatureSource } from "game/temperature/ITemperature";
30
30
  import type { ITile } from "game/tile/ITerrain";
31
31
  import type { ISerializedTranslation } from "language/ITranslation";
32
32
  import type Translation from "language/Translation";
33
+ import type { IRendererOrigin } from "renderer/context/RendererOrigin";
33
34
  import FieldOfView from "renderer/fieldOfView/FieldOfView";
34
35
  import type { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
35
- import type { ItemNotifierType, StatNotificationType } from "renderer/notifier/INotifier";
36
+ import type { INotificationLocation, ItemNotifierType, StatNotificationType } from "renderer/notifier/INotifier";
36
37
  import { Direction } from "utilities/math/Direction";
37
38
  import type { IVector2, IVector3 } from "utilities/math/IVector";
38
39
  import Vector2 from "utilities/math/Vector2";
39
40
  import type { IVector4 } from "utilities/math/Vector4";
40
- export default abstract class Entity extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, IVector3 {
41
+ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> implements IReferenceable, IInspector, ITemperatureSource, INotificationLocation, IRendererOrigin, IVector3 {
41
42
  readonly stat: Stats<this>;
42
43
  entityType: EntityType;
43
44
  id: number;
@@ -47,13 +48,21 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
47
48
  x: number;
48
49
  y: number;
49
50
  /**
50
- * Not guaranteed to be synced between the server and client for Player entities
51
+ * Not guaranteed to be synced between the server and client for Human entities
51
52
  */
52
53
  fromX: number;
53
54
  /**
54
- * Not guaranteed to be synced between the server and client for Player entities
55
+ * Not guaranteed to be synced between the server and client for Human entities
55
56
  */
56
57
  fromY: number;
58
+ /**
59
+ * Not guaranteed to be synced between the server and client for Human entities
60
+ */
61
+ isMoving: boolean;
62
+ /**
63
+ * Only used for Human entities
64
+ */
65
+ movementCompleteZ: number | undefined;
57
66
  moveType: MoveType | undefined;
58
67
  anim: number;
59
68
  stopNextMovement: boolean;
@@ -65,7 +74,10 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
65
74
  islandId: IslandId;
66
75
  attackAnimationType: DamageType | undefined;
67
76
  attackAnimationTime: IMovementTime | undefined;
68
- isMovingClientside: boolean;
77
+ /**
78
+ * The state of what the client thinks is happening to this entity (regarding movement)
79
+ */
80
+ movingClientside: MovingClientSide;
69
81
  allowSmartMovementClientside: boolean;
70
82
  protected _movementTime: {
71
83
  start: number;
@@ -118,9 +130,11 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
118
130
  * Faces the target and animates a bump into effect
119
131
  */
120
132
  animateBumpTowards(x: number, y: number): void;
133
+ protected setMoving(delay: Delay, fromX: number, fromY: number, toZ?: number): void;
121
134
  animateAttack(damageType: DamageType[] | undefined): void;
122
135
  getMovementPoint(timeStamp: number): IVector2;
123
136
  getMovementProgress(timeStamp: number): number;
137
+ protected onMovementCompleted(): void;
124
138
  getMoveType(): MoveType;
125
139
  setMoveType(moveType: MoveType): void;
126
140
  isInFov(): boolean;
@@ -65,7 +65,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
65
65
  handEquippedToLast: EquipType.OffHand | EquipType.MainHand;
66
66
  inventory: IContainer;
67
67
  isConnecting: boolean;
68
- movementCompleteZ: number | undefined;
69
68
  options: Readonly<IOptions>;
70
69
  islandId: IslandId;
71
70
  readonly equipEffects: Map<EquipEffect, EquipEffects>;
@@ -80,9 +79,8 @@ export default abstract class Human extends Entity implements IHasInsulation {
80
79
  turns: number;
81
80
  vehicleItemReference: ItemReference | undefined;
82
81
  walkSoundCounter: number;
83
- containerSortInfo: Record<string, IContainerSortInfo>;
84
- dialogContainerInfo: Record<number, IDialogInfo>;
85
- isMoving: boolean;
82
+ containerSortInfo: Record<string, IContainerSortInfo | undefined>;
83
+ dialogContainerInfo: Record<number, IDialogInfo | undefined>;
86
84
  readonly movementIntent: IMovementIntent;
87
85
  walkPath: IWalkPath | undefined;
88
86
  identifier: string;
@@ -91,7 +89,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
91
89
  messages: IMessageManager;
92
90
  notes: INoteManager;
93
91
  private readonly privateStore;
94
- finishedMovingClientside: boolean;
95
92
  nextMoveTime: number;
96
93
  nextMoveDirection: Direction.Cardinal | Direction.None | undefined;
97
94
  private lastVehicleMoveDirection;
@@ -129,6 +126,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
129
126
  */
130
127
  isServer(): boolean;
131
128
  isMultiplayerHost(): boolean;
129
+ protected onMovementCompleted(): void;
132
130
  moveTowardsIsland(direction: Direction.Cardinal | Direction.None, options?: Partial<IMoveToIslandOptions>): Promise<void>;
133
131
  moveToIslandPosition(position: IVector2, options?: Partial<IMoveToIslandOptions>): Promise<void>;
134
132
  /**
@@ -419,6 +419,26 @@ export interface IVoyageInfo {
419
419
  usedItems?: Item[];
420
420
  wantedItems?: ItemType[];
421
421
  }
422
+ export declare enum MovingClientSide {
423
+ /**
424
+ * NoInput = Idle
425
+ */
426
+ NoInput = 0,
427
+ /**
428
+ * Is actively moving
429
+ */
430
+ Moving = 1,
431
+ /**
432
+ * Just completed their movement.
433
+ * They might be about to move again.
434
+ */
435
+ Moved = 2,
436
+ /**
437
+ * The game registered the end of the movement.
438
+ * It's about to check if it will move again or finish (state change into Moving or NoInput)
439
+ */
440
+ PreNoInput = 3
441
+ }
422
442
  /**
423
443
  * The swimming skill required to travel to another island
424
444
  *
@@ -30,6 +30,7 @@ import type { IPromptDescriptionBase, PromptDescriptionArgs } from "game/meta/pr
30
30
  import type { Milestone } from "game/milestones/IMilestone";
31
31
  import type { ITile } from "game/tile/ITerrain";
32
32
  import type TileEvent from "game/tile/TileEvent";
33
+ import type { IModdable } from "mod/ModRegistry";
33
34
  import type { IRGB } from "utilities/Color";
34
35
  import type { Direction } from "utilities/math/Direction";
35
36
  import type { IVector2, IVector3 } from "utilities/math/IVector";
@@ -188,7 +189,7 @@ export interface IActionNotUsable extends Partial<IPackedMessage> {
188
189
  source?: never;
189
190
  }
190
191
  export declare type AnyActionDescription = IActionDescription<Array<ActionArgument | ActionArgument[]>, Entity, any, IActionUsable, any[]>;
191
- export interface IActionDescription<A extends Array<ActionArgument | ActionArgument[]> = Array<ActionArgument | ActionArgument[]>, E extends Entity = Entity, R = void, CU extends IActionUsable = IActionUsable, AV extends any[] = ActionArgumentTupleTypes<A>> {
192
+ export interface IActionDescription<A extends Array<ActionArgument | ActionArgument[]> = Array<ActionArgument | ActionArgument[]>, E extends Entity = Entity, R = void, CU extends IActionUsable = IActionUsable, AV extends any[] = ActionArgumentTupleTypes<A>> extends IModdable {
192
193
  type?: number;
193
194
  argumentTypes: A;
194
195
  usability: {
@@ -9,8 +9,7 @@
9
9
  * https://github.com/WaywardGame/types/wiki
10
10
  */
11
11
  import type Doodad from "game/doodad/Doodad";
12
- import type { ActionDisplayLevel, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
13
- import { ActionType } from "game/entity/action/IAction";
12
+ import type { ActionDisplayLevel, ActionType, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
14
13
  import type UsableActionRegistrar from "game/entity/action/usable/UsableActionRegistrar";
15
14
  import type { UsableActionTypePlaceholder } from "game/entity/action/usable/UsableActionType";
16
15
  import { UsableActionType } from "game/entity/action/usable/UsableActionType";
@@ -64,15 +63,17 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
64
63
  validate(player: Player, value: Item): boolean;
65
64
  } ? Item : never) | (REQUIREMENTS["item"] extends {
66
65
  find(player: Player): Item;
67
- } ? Item : never));
66
+ } ? Item : never) | (REQUIREMENTS["item"] extends {
67
+ allowOnlyItemType(player: Player, type: ItemType): boolean;
68
+ } ? undefined : never));
68
69
  itemType: ((REQUIREMENTS["item"] extends true ? ItemType : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
69
70
  allowNone: true;
70
71
  } ? undefined : never) | (REQUIREMENTS["item"] extends {
71
72
  validate(player: Player, value: Item): boolean;
72
- } ? ItemType : never) | (REQUIREMENTS["item"] extends {
73
+ } ? ItemType | undefined : never) | (REQUIREMENTS["item"] extends {
73
74
  find(player: Player): Item;
74
75
  } ? ItemType : never) | (REQUIREMENTS["item"] extends {
75
- allowOnlyItemType(player: Player): boolean;
76
+ allowOnlyItemType(player: Player, type: ItemType): boolean;
76
77
  } ? ItemType : never));
77
78
  doodad: ((REQUIREMENTS["doodad"] extends true ? Doodad : never) | (undefined extends REQUIREMENTS["doodad"] ? undefined : never) | (REQUIREMENTS["doodad"] extends {
78
79
  allowNone: true;
@@ -139,7 +140,7 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
139
140
  /**
140
141
  * The icon this action should have, if any.
141
142
  */
142
- icon?: SupplierOr<UsableActionIconReference, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>]>;
143
+ icon?: SupplierOr<UsableActionIconReference | false, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>]>;
143
144
  /**
144
145
  * Where the icon should appear, when slotted with an item. Defaults to bottom right.
145
146
  *
@@ -8,60 +8,70 @@
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 { IModdable } from "mod/ModRegistry";
12
+ export declare enum ActionTypeStarts {
13
+ ActionType = 0,
14
+ ModActionType = 10000,
15
+ UsableActionType = 100000,
16
+ UsableActionTypePlaceholder = 200000,
17
+ ModUsableActionType = 300000,
18
+ ModUsableActionTypePlaceholder = 400000
19
+ }
11
20
  export declare enum UsableActionType {
12
- Use = 1000000,
13
- QuickSlotRemove = 1000001,
14
- QuickSlotAdd = 1000002,
15
- QuickSlotAddToFree = 1000003,
16
- QuickSlotAddToSlot = 1000004,
17
- MoveToInventory = 1000005,
18
- DropMenu = 1000006,
19
- DropAll = 1000007,
20
- DropAllOfSameQuality = 1000008,
21
- RepairWithItem = 1000009,
22
- ReinforceWithItem = 1000010,
23
- EnhanceWithItem = 1000011,
24
- EnchantWithItem = 1000012,
25
- TransmogrifyWithItem = 1000013,
26
- UpgradeWithItem = 1000014,
27
- AlterWithItem = 1000015,
28
- RefineWithItem = 1000016,
29
- PreserveWithItem = 1000017,
30
- AddFuelWithItem = 1000018,
31
- IgniteWithItem = 1000019,
32
- AbsorbWithItem = 1000020,
33
- ExudeWithItem = 1000021,
34
- MoveToInventoryMenu = 1000022,
35
- MoveToActiveContainerMenu = 1000023,
36
- MoveToFacingContainerMenu = 1000024,
37
- Move = 1000025,
38
- MoveAll = 1000026,
39
- MoveAllOfSameQuality = 1000027,
40
- TradeTraderSell = 1000028,
41
- TradeTraderBuy = 1000029,
42
- ItemActions = 1000030,
43
- Actions = 1000031,
44
- GatherWithHands = 1000032,
45
- HarvestWithHands = 1000033,
46
- DigWithHands = 1000034,
47
- TillWithHands = 1000035,
48
- PickUpExcrementWithHands = 1000036,
49
- EquipHeld = 1000037,
50
- EquipLegs = 1000038,
51
- EquipChest = 1000039,
52
- EquipHead = 1000040,
53
- EquipBelt = 1000041,
54
- EquipFeet = 1000042,
55
- EquipNeck = 1000043,
56
- EquipHands = 1000044,
57
- EquipBack = 1000045,
58
- EquipMainHand = 1000046,
59
- EquipOffHand = 1000047
21
+ Use = 100000,
22
+ QuickSlotRemove = 100001,
23
+ QuickSlotAdd = 100002,
24
+ QuickSlotAddToFree = 100003,
25
+ QuickSlotAddToSlot = 100004,
26
+ MoveToInventory = 100005,
27
+ DropMenu = 100006,
28
+ DropAll = 100007,
29
+ DropAllOfSameQuality = 100008,
30
+ RepairWithItem = 100009,
31
+ ReinforceWithItem = 100010,
32
+ EnhanceWithItem = 100011,
33
+ EnchantWithItem = 100012,
34
+ TransmogrifyWithItem = 100013,
35
+ UpgradeWithItem = 100014,
36
+ AlterWithItem = 100015,
37
+ RefineWithItem = 100016,
38
+ PreserveWithItem = 100017,
39
+ AddFuelWithItem = 100018,
40
+ IgniteWithItem = 100019,
41
+ AbsorbWithItem = 100020,
42
+ ExudeWithItem = 100021,
43
+ MoveToInventoryMenu = 100022,
44
+ MoveToActiveContainerMenu = 100023,
45
+ MoveToFacingContainerMenu = 100024,
46
+ Move = 100025,
47
+ MoveAll = 100026,
48
+ MoveAllOfSameQuality = 100027,
49
+ TradeTraderSell = 100028,
50
+ TradeTraderBuy = 100029,
51
+ ItemActions = 100030,
52
+ Actions = 100031,
53
+ GatherWithHands = 100032,
54
+ HarvestWithHands = 100033,
55
+ DigWithHands = 100034,
56
+ TillWithHands = 100035,
57
+ PickUpExcrementWithHands = 100036,
58
+ EquipHeld = 100037,
59
+ EquipLegs = 100038,
60
+ EquipChest = 100039,
61
+ EquipHead = 100040,
62
+ EquipBelt = 100041,
63
+ EquipFeet = 100042,
64
+ EquipNeck = 100043,
65
+ EquipHands = 100044,
66
+ EquipBack = 100045,
67
+ EquipMainHand = 100046,
68
+ EquipOffHand = 100047
60
69
  }
61
70
  export declare enum UsableActionTypePlaceholder {
62
- TradeItem = 2000000,
63
- MoveAllToInventory = 2000001,
64
- MoveAllOfSameQualityToInventory = 2000002,
65
- Paddle = 2000003,
66
- Operate = 2000004
71
+ TradeItem = 200000,
72
+ MoveAllToInventory = 200001,
73
+ MoveAllOfSameQualityToInventory = 200002,
74
+ Paddle = 200003,
75
+ Operate = 200004
67
76
  }
77
+ export declare const usableActionDescriptions: PartialRecord<UsableActionType | UsableActionTypePlaceholder, IModdable>;
@@ -14,6 +14,7 @@ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
14
14
  import type { InfoProvider } from "game/inspection/InfoProvider";
15
15
  import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
16
16
  import type { Quality } from "game/IObject";
17
+ import type Island from "game/island/Island";
17
18
  import type Translation from "language/Translation";
18
19
  import type { TranslationGenerator } from "ui/component/IComponent";
19
20
  export interface IDescribed {
@@ -21,6 +22,7 @@ export interface IDescribed {
21
22
  type: number;
22
23
  referenceId?: number;
23
24
  quality?: Quality;
25
+ island: Island;
24
26
  description(): any;
25
27
  }
26
28
  export declare type DescribedDescription<T extends IDescribed> = Exclude<ReturnType<T["description"]>, undefined>;
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2011-2021 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 Doodad from "game/doodad/Doodad";
12
+ import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
13
+ import { InfoProvider } from "game/inspection/InfoProvider";
14
+ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
15
+ export default class GatherabilityInfoProvider extends InfoProvider {
16
+ private readonly doodad;
17
+ static get(doodad: Doodad): false | GatherabilityInfoProvider | undefined;
18
+ private gatherMessage;
19
+ private constructor();
20
+ getClass(): string[];
21
+ getDefaultDisplayLevel(_context: InfoProviderContext): InfoDisplayLevel;
22
+ hasContent(): boolean;
23
+ get(): import("../../../../language/impl/TranslationImpl").default;
24
+ onTickEnd(): void;
25
+ private getGatherabilityMessage;
26
+ }
@@ -15,7 +15,7 @@ import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
15
15
  export default class HarvestabilityInfoProvider extends InfoProvider {
16
16
  private readonly doodad;
17
17
  static get(doodad: Doodad): false | HarvestabilityInfoProvider | undefined;
18
- private message;
18
+ private harvestMessage;
19
19
  private constructor();
20
20
  getClass(): string[];
21
21
  getDefaultDisplayLevel(_context: InfoProviderContext): InfoDisplayLevel;
@@ -51,19 +51,20 @@ export interface IItemEvents {
51
51
  * @param human The human object
52
52
  * @param slot The slot
53
53
  */
54
- equip?(human: Human, slot: EquipType): void;
54
+ equip(human: Human, slot: EquipType): any;
55
55
  /**
56
56
  * Called when the human unequip an item from a slot
57
57
  * @param human The human object
58
58
  * @param slot The slot
59
59
  */
60
- unequip?(human: Human, slot: EquipType): void;
60
+ unequip(human: Human, slot: EquipType): any;
61
61
  /**
62
62
  * Called when an item is damaged
63
63
  * @param modifier The damage modifier
64
64
  * @returns The amount of damage the item shouldd take or undefined to use the default logic
65
65
  */
66
- shouldDamage?(modifier?: number): number | false | undefined;
66
+ shouldDamage(modifier?: number): number | false | undefined;
67
+ qualityChange(quality: Quality, oldQuality: Quality): any;
67
68
  }
68
69
  export default class Item extends EventEmitter.Host<IItemEvents> implements IReferenceable, Partial<IContainer>, IContainable, IUnserializedCallback, IObject<ItemType>, IObjectOptions, IContainable, Partial<IContainer>, ITemperatureSource, IHasInsulation, IHasMagic {
69
70
  readonly objectType = CreationId.Item;
@@ -275,7 +276,7 @@ export default class Item extends EventEmitter.Host<IItemEvents> implements IRef
275
276
  * @param action The ActionType you are trying to get the level for.
276
277
  * @returns A number (possibly 0 if no quality or action level).
277
278
  */
278
- getItemUseBonus(action?: ActionType): number;
279
+ getItemUseBonus(action: ActionType): number;
279
280
  getBestRangedWeapon(human: Human): Item | undefined;
280
281
  /**
281
282
  * Extinguishes to item if it is lit.
@@ -215,12 +215,19 @@ export default class ItemManager extends ObjectManager<Item, IItemManagerEvents>
215
215
  countItemsInContainerByGroup(containers: IContainer | IContainer[], itemTypeGroupSearch: ItemTypeGroup, ignoreItem?: Item): number;
216
216
  /**
217
217
  * Get the best items sorted by how good they are
218
+ * Usability/custom (ie the sorting for melee/start fire) > Action tier (+quality if there's an action tier on both items) > quality > durability
218
219
  */
219
220
  getBestSafeItems(human: Human, container: IContainer, options?: Partial<IGetBestItemsOptions>): Item[];
220
221
  /**
221
222
  * Get the best item
222
223
  */
223
224
  getBestSafeItem(human: Human, container: IContainer, options?: Partial<IGetBestItemsOptions>): Item | undefined;
225
+ /**
226
+ * Gets the item's quality and action level (how good it is at doing the action).
227
+ * @param action The ActionType you are trying to get the level for.
228
+ * @returns A number (possibly 0 if no quality or action level).
229
+ */
230
+ getItemUseBonus(itemType: ItemType, action: ActionType, quality: Quality | undefined): number;
224
231
  getItemInContainer(container: IContainer, itemTypeSearch: ItemType, options?: Partial<IGetItemOptions>): Item | undefined;
225
232
  getItemForHuman(human: Human, search: ItemType | ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
226
233
  getItemInContainerByGroup(container: IContainer, itemTypeGroupSearch: ItemTypeGroup, options?: Partial<IGetItemOptions>): Item | undefined;
@@ -20,7 +20,7 @@ declare class MilestoneModifiersManager extends GameplayModifiersManager<Milesto
20
20
  isGlobal(milestone: Milestone): boolean;
21
21
  isNotGlobal(milestone: Milestone): boolean;
22
22
  getGroup(milestone: Milestone): import("game/options/modifiers/milestone/MilestoneModifier").MilestoneModifierGroup | undefined;
23
- sort(a: Milestone, b: Milestone): 0 | 1 | -1;
23
+ sort(a: Milestone, b: Milestone): 1 | 0 | -1;
24
24
  private areOptionsGlobal;
25
25
  }
26
26
  declare const _default: MilestoneModifiersManager;
@@ -47,65 +47,66 @@ declare enum Dictionary {
47
47
  Input = 35,
48
48
  InspectType = 36,
49
49
  InterruptChoice = 37,
50
- IslandModifier = 38,
51
- IslandName = 39,
52
- IslandNameBiomeDescriptor = 40,
53
- IslandNameBiomeNoun = 41,
54
- IslandNameModifierDescriptor = 42,
55
- IslandNameOverrunWithCreatureDescriptor = 43,
56
- Item = 44,
57
- ItemGroup = 45,
58
- JoinServerRetryReason = 46,
59
- Level = 47,
60
- Loading = 48,
61
- Macro = 49,
62
- MagicalPropertyType = 50,
63
- MapQuality = 51,
64
- MenuBarButton = 52,
65
- Message = 53,
66
- MessagesDefaultFilter = 54,
67
- MessagesTimestampMode = 55,
68
- Milestone = 56,
69
- MilestoneModifierGroup = 57,
70
- Misc = 58,
71
- ModLoadError = 59,
72
- ModLoadFailureReason = 60,
73
- ModProvide = 61,
74
- ModSort = 62,
75
- ModType = 63,
76
- MultiplayerCompatibility = 64,
77
- MultiplayerDisconnectReason = 65,
78
- MusicPlaylist = 66,
79
- Note = 67,
80
- Npc = 68,
81
- Number = 69,
82
- PartOfDay = 70,
83
- PowerMode = 71,
84
- Prompt = 72,
85
- QuadrantComponent = 73,
86
- QuadrantComponentContextMenuAction = 74,
87
- Quality = 75,
88
- Quest = 76,
89
- QuestRequirement = 77,
90
- RecipeLevel = 78,
91
- Riddle = 79,
92
- SaveImportErrorReason = 80,
93
- SaveSlotSort = 81,
94
- Skill = 82,
95
- Source = 83,
96
- Stat = 84,
97
- StatusEffect = 85,
98
- TeamMemberResponsibility = 86,
99
- TemperatureType = 87,
100
- Terrain = 88,
101
- TileEvent = 89,
102
- Ui = 90,
103
- UiQuadrant = 91,
104
- UnableToJoinReason = 92,
105
- UnlockedRecipesStrategy = 93,
106
- UsableActionType = 94,
107
- Website = 95,
108
- WeightStatus = 96,
109
- WorldLayer = 97
50
+ InventorySort = 38,
51
+ IslandModifier = 39,
52
+ IslandName = 40,
53
+ IslandNameBiomeDescriptor = 41,
54
+ IslandNameBiomeNoun = 42,
55
+ IslandNameModifierDescriptor = 43,
56
+ IslandNameOverrunWithCreatureDescriptor = 44,
57
+ Item = 45,
58
+ ItemGroup = 46,
59
+ JoinServerRetryReason = 47,
60
+ Level = 48,
61
+ Loading = 49,
62
+ Macro = 50,
63
+ MagicalPropertyType = 51,
64
+ MapQuality = 52,
65
+ MenuBarButton = 53,
66
+ Message = 54,
67
+ MessagesDefaultFilter = 55,
68
+ MessagesTimestampMode = 56,
69
+ Milestone = 57,
70
+ MilestoneModifierGroup = 58,
71
+ Misc = 59,
72
+ ModLoadError = 60,
73
+ ModLoadFailureReason = 61,
74
+ ModProvide = 62,
75
+ ModSort = 63,
76
+ ModType = 64,
77
+ MultiplayerCompatibility = 65,
78
+ MultiplayerDisconnectReason = 66,
79
+ MusicPlaylist = 67,
80
+ Note = 68,
81
+ Npc = 69,
82
+ Number = 70,
83
+ PartOfDay = 71,
84
+ PowerMode = 72,
85
+ Prompt = 73,
86
+ QuadrantComponent = 74,
87
+ QuadrantComponentContextMenuAction = 75,
88
+ Quality = 76,
89
+ Quest = 77,
90
+ QuestRequirement = 78,
91
+ RecipeLevel = 79,
92
+ Riddle = 80,
93
+ SaveImportErrorReason = 81,
94
+ SaveSlotSort = 82,
95
+ Skill = 83,
96
+ Source = 84,
97
+ Stat = 85,
98
+ StatusEffect = 86,
99
+ TeamMemberResponsibility = 87,
100
+ TemperatureType = 88,
101
+ Terrain = 89,
102
+ TileEvent = 90,
103
+ Ui = 91,
104
+ UiQuadrant = 92,
105
+ UnableToJoinReason = 93,
106
+ UnlockedRecipesStrategy = 94,
107
+ UsableActionType = 95,
108
+ Website = 96,
109
+ WeightStatus = 97,
110
+ WorldLayer = 98
110
111
  }
111
112
  export default Dictionary;