@wayward/types 2.14.0-beta.dev.20241003.1 → 2.14.0-beta.dev.20241005.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/game/IObject.d.ts +5 -1
- package/definitions/game/game/doodad/Doodad.d.ts +5 -1
- package/definitions/game/game/entity/IHuman.d.ts +1 -1
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/PickUpItem.d.ts +2 -2
- package/definitions/game/game/inspection/infoProviders/item/use/ItemConsumeInfo.d.ts +2 -1
- package/definitions/game/game/item/IItem.d.ts +3 -1
- package/definitions/game/game/item/Item.d.ts +2 -2
- package/definitions/game/game/tile/TileEvent.d.ts +5 -0
- package/definitions/game/utilities/memory/MemoryLeakDetector.d.ts +1 -0
- package/definitions/test/core/applicationInteractions.d.ts +1 -1
- package/definitions/test/core/marshals/ui/itemComponentMarshal.d.ts +7 -1
- package/definitions/test/suite/functionalTests/singleplayer/ui/ItemComponentLeak.d.ts +12 -0
- package/package.json +1 -1
|
@@ -28,7 +28,11 @@ export interface IObjectDescription extends IHasImagePath {
|
|
|
28
28
|
* number of game ticks until decay
|
|
29
29
|
*/
|
|
30
30
|
decayMax?: number;
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* An associated skill or skills for the item when refining, reinforcing, dismantling, consuming, etc.
|
|
33
|
+
* If multiple skills are set, it will pick one at random when using
|
|
34
|
+
*/
|
|
35
|
+
skillUse?: SkillType | SkillType[];
|
|
32
36
|
/**
|
|
33
37
|
* container maximum weight
|
|
34
38
|
*/
|
|
@@ -18,7 +18,7 @@ import EntityMovable from "@wayward/game/game/entity/EntityMovable";
|
|
|
18
18
|
import type Human from "@wayward/game/game/entity/Human";
|
|
19
19
|
import type { IEntityConstructorOptions } from "@wayward/game/game/entity/IEntity";
|
|
20
20
|
import { EntityType } from "@wayward/game/game/entity/IEntity";
|
|
21
|
-
import
|
|
21
|
+
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
22
22
|
import { EquipType } from "@wayward/game/game/entity/IHuman";
|
|
23
23
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
24
24
|
import type Creature from "@wayward/game/game/entity/creature/Creature";
|
|
@@ -385,6 +385,10 @@ export default class Doodad extends EntityMovable<IDoodadDescription, DoodadType
|
|
|
385
385
|
* Forces a boat to be drydocked (revert from doodad to an item if water was taken away for some reason).
|
|
386
386
|
*/
|
|
387
387
|
dryDockBoat(human: Human): void;
|
|
388
|
+
/**
|
|
389
|
+
* Gets the skill type associated with the doodad, or choose a random one if the description is an array.
|
|
390
|
+
*/
|
|
391
|
+
getSkillUse(): SkillType;
|
|
388
392
|
/**
|
|
389
393
|
* Decay over time
|
|
390
394
|
*/
|
|
@@ -416,7 +416,7 @@ export declare enum RestCancelReason {
|
|
|
416
416
|
WaterPoured = 7
|
|
417
417
|
}
|
|
418
418
|
export declare const restCancelReasonMessageMap: Record<RestCancelReason, Message | undefined>;
|
|
419
|
-
export type WalkToChangeReason = "Damage" | "Overburdened" | "Unknown";
|
|
419
|
+
export type WalkToChangeReason = "Damage" | "Overburdened" | "PromptVisible" | "Unknown";
|
|
420
420
|
export interface IRestData {
|
|
421
421
|
type: RestType;
|
|
422
422
|
startHealth: number;
|
|
@@ -101,7 +101,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
101
101
|
1: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/PickUp").IPickUpCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
102
102
|
54: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/PickUpAllItems").IPickUpAllItemsCanUse, [(boolean | undefined)?]>;
|
|
103
103
|
81: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/PickUpExcrement").IPickUpExcrementCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
104
|
-
53: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/PickUpItem").IPickUpItemCanUse, [(boolean | undefined)?]>;
|
|
104
|
+
53: import("./Action").Action<[[arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Boolean], [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemArrayNearby]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/PickUpItem").IPickUpItemCanUse, [(boolean | undefined)?, (import("../../item/Item").default[] | undefined)?]>;
|
|
105
105
|
74: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby, [arg1: import("@wayward/game/game/entity/action/IAction").ActionArgument.Undefined, import("@wayward/game/game/entity/action/IAction").ActionArgument.Tile]], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Build").IBuildCanUse, [import("../../item/Item").default, (import("../../tile/Tile").default | undefined)?]>;
|
|
106
106
|
25: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Plant").IPlantCanUse, [import("../../item/Item").default]>;
|
|
107
107
|
24: import("./Action").Action<[import("@wayward/game/game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default<unknown, number, import("../../reference/IReferenceManager").ReferenceType.NPC | import("../../reference/IReferenceManager").ReferenceType.Player>, void, import("@wayward/game/game/entity/action/actions/Pour").IPourCanUse, [import("../../item/Item").default]>;
|
|
@@ -13,7 +13,7 @@ import type { IActionUsable } from "@wayward/game/game/entity/action/IAction";
|
|
|
13
13
|
import { ActionArgument } from "@wayward/game/game/entity/action/IAction";
|
|
14
14
|
import type Item from "@wayward/game/game/item/Item";
|
|
15
15
|
export interface IPickUpItemCanUse extends IActionUsable {
|
|
16
|
-
pickUpItem: Item;
|
|
16
|
+
pickUpItem: Item | Item[];
|
|
17
17
|
}
|
|
18
|
-
declare const _default: Action<[[arg1: ActionArgument.Undefined, ActionArgument.Boolean]], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, IPickUpItemCanUse, [(boolean | undefined)?]>;
|
|
18
|
+
declare const _default: Action<[[arg1: ActionArgument.Undefined, ActionArgument.Boolean], [arg1: ActionArgument.Undefined, ActionArgument.ItemArrayNearby]], import("../../Human").default<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, IPickUpItemCanUse, [(boolean | undefined)?, (Item[] | undefined)?]>;
|
|
19
19
|
export default _default;
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "@wayward/game/game/entity/action/IAction";
|
|
12
|
+
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
12
13
|
import type { Stat } from "@wayward/game/game/entity/IStats";
|
|
13
14
|
import UseInfo from "@wayward/game/game/inspection/infoProviders/UseInfo";
|
|
14
15
|
import type Item from "@wayward/game/game/item/Item";
|
|
15
16
|
import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
|
|
16
17
|
declare const _default: UseInfo<{
|
|
17
18
|
onConsume: [Stat, number][];
|
|
18
|
-
skill:
|
|
19
|
+
skill: SkillType;
|
|
19
20
|
entityType: import("../../../../entity/IEntity").EntityType.Item;
|
|
20
21
|
value?: Item | undefined;
|
|
21
22
|
type: import("@wayward/game/game/item/IItem").ItemType;
|
|
@@ -596,6 +596,9 @@ export interface IItemNotifier {
|
|
|
596
596
|
export interface IRecipe {
|
|
597
597
|
baseComponent?: ItemType | ItemTypeGroup;
|
|
598
598
|
components: IRecipeComponent[];
|
|
599
|
+
/**
|
|
600
|
+
* The skill used when crafting or disassembling the item.
|
|
601
|
+
*/
|
|
599
602
|
skill: SkillType;
|
|
600
603
|
level: RecipeLevel;
|
|
601
604
|
requiredDoodads?: Array<DoodadType | DoodadTypeGroup>;
|
|
@@ -698,7 +701,6 @@ export interface ILiquidGather {
|
|
|
698
701
|
export interface IDismantleDescription {
|
|
699
702
|
items: IDismantleItemDescription[];
|
|
700
703
|
required?: ItemTypeGroup;
|
|
701
|
-
skill?: SkillType;
|
|
702
704
|
runeChance?: RuneChance;
|
|
703
705
|
producesEvent?: TileEventType;
|
|
704
706
|
}
|
|
@@ -381,9 +381,9 @@ export default class Item extends EntityMovable<IItemDescription, ItemType, Refe
|
|
|
381
381
|
*/
|
|
382
382
|
getMaxDecayTime(overrideDefault?: number, withRandomization?: boolean): number | undefined;
|
|
383
383
|
/**
|
|
384
|
-
* Gets the
|
|
384
|
+
* Gets the skill type associated with the item, or choose a random one if the description is an array.
|
|
385
385
|
*/
|
|
386
|
-
|
|
386
|
+
getSkillUse(): SkillType;
|
|
387
387
|
getDamageType(): DamageType;
|
|
388
388
|
/**
|
|
389
389
|
* Returns the damage types associated with a skill with a fallback for whatever damage types the item normally provides
|
|
@@ -16,6 +16,7 @@ import EntityMovable from "@wayward/game/game/entity/EntityMovable";
|
|
|
16
16
|
import type Human from "@wayward/game/game/entity/Human";
|
|
17
17
|
import type { IEntityConstructorOptions } from "@wayward/game/game/entity/IEntity";
|
|
18
18
|
import { EntityType } from "@wayward/game/game/entity/IEntity";
|
|
19
|
+
import { SkillType } from "@wayward/game/game/entity/IHuman";
|
|
19
20
|
import type Creature from "@wayward/game/game/entity/creature/Creature";
|
|
20
21
|
import type Corpse from "@wayward/game/game/entity/creature/corpse/Corpse";
|
|
21
22
|
import type NPC from "@wayward/game/game/entity/npc/NPC";
|
|
@@ -99,4 +100,8 @@ export default class TileEvent extends EntityMovable<ITileEventDescription, Tile
|
|
|
99
100
|
* Gets the builder/creator of this event, or `undefined` if the tile event is creatorless.
|
|
100
101
|
*/
|
|
101
102
|
getBuilder(): Player | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Gets the skill type associated with the tile event, or choose a random one if the description is an array.
|
|
105
|
+
*/
|
|
106
|
+
getSkillUse(): SkillType;
|
|
102
107
|
}
|
|
@@ -18,6 +18,7 @@ declare class MemoryLeakDetector {
|
|
|
18
18
|
private activeTask;
|
|
19
19
|
get isReportingErrors(): boolean;
|
|
20
20
|
get isMonitoring(): boolean;
|
|
21
|
+
getCount(prefix: string): number;
|
|
21
22
|
waitForIdle(): Promise<void>;
|
|
22
23
|
register(object: object, objectName: string, expectedLifetime: ExpectedLifetime, parentObjectIdentifier?: string): void;
|
|
23
24
|
registerMultiple<T extends object>(prefix: string, objects: SaferArray<T>, objectNamer: (object: T) => string, expectedLifetime: ExpectedLifetime): void;
|
|
@@ -102,5 +102,5 @@ export default class ApplicationInteractions {
|
|
|
102
102
|
increaseStat(stat: Stat, value: number): Promise<void>;
|
|
103
103
|
randomInput(count: number): Promise<void>;
|
|
104
104
|
pressKey(key: string, modifier?: string, duration?: number): Promise<void>;
|
|
105
|
-
|
|
105
|
+
screenshot(suffix: string): Promise<void>;
|
|
106
106
|
}
|
|
@@ -8,12 +8,18 @@
|
|
|
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 { Application } from "@wayward/test/core/application";
|
|
11
12
|
import { ContainerBucketMarshal } from "@wayward/test/core/marshals/ui/ContainerBucketMarshal";
|
|
12
13
|
export declare class ItemComponentMarshal {
|
|
14
|
+
private readonly application;
|
|
13
15
|
private readonly element;
|
|
14
|
-
constructor(element: WebdriverIO.Element);
|
|
16
|
+
constructor(application: Application, element: WebdriverIO.Element);
|
|
15
17
|
isStack(): Promise<boolean>;
|
|
16
18
|
isWithinPlayerInventoryBucket(): Promise<boolean>;
|
|
17
19
|
getContainerBucket(): Promise<ContainerBucketMarshal>;
|
|
20
|
+
/**
|
|
21
|
+
* Clicks an action on the context menu for the given item type
|
|
22
|
+
*/
|
|
23
|
+
useItemAction(...actions: string[]): Promise<void>;
|
|
18
24
|
private getContainerDialogElement;
|
|
19
25
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
declare const _default: [string, import("../../../../testRunner").TestExecutor];
|
|
12
|
+
export default _default;
|
package/package.json
CHANGED