@wayward/types 2.14.0-beta.dev.20240915.1 → 2.14.0-beta.dev.20240916.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/entity/action/actions/Drop.d.ts +6 -1
- package/definitions/game/game/entity/action/actions/helper/NotUsableMessage.d.ts +1 -0
- package/definitions/game/game/entity/action/actions/moveItem/MoveItemsSourceArgument.d.ts +1 -1
- package/definitions/game/game/item/IItemManager.d.ts +4 -0
- package/definitions/game/game/item/ItemFinder.d.ts +6 -2
- package/definitions/game/game/item/ItemManager.d.ts +7 -0
- package/definitions/game/game/item/cooldown/InvokeCooldown.d.ts +3 -0
- package/definitions/game/game/reference/ReferenceManager.d.ts +1 -0
- package/definitions/game/game/tile/Tile.d.ts +1 -1
- package/definitions/game/language/dictionary/Message.d.ts +758 -757
- package/definitions/game/ui/component/Dropdown.d.ts +7 -0
- package/definitions/game/ui/screen/screens/game/component/DialogSortFilter.d.ts +1 -0
- package/package.json +1 -1
|
@@ -43,12 +43,17 @@ interface IResolvedTileDrop {
|
|
|
43
43
|
into: IContainer;
|
|
44
44
|
blocker?: Translation;
|
|
45
45
|
}
|
|
46
|
-
export declare function resolveTileDrop(human: Human, tile
|
|
46
|
+
export declare function resolveTileDrop(human: Human | undefined, tile: Tile, items?: MoveItemsSourceArgumentResolvable, dropIntoContainers?: boolean): IResolvedTileDrop;
|
|
47
|
+
export declare function resolveTileDrop(human: Human, tile?: Tile, items?: MoveItemsSourceArgumentResolvable, dropIntoContainers?: boolean): IResolvedTileDrop;
|
|
47
48
|
export interface IDropCanUse {
|
|
48
49
|
items: Item[];
|
|
49
50
|
tile: Tile;
|
|
50
51
|
into?: IContainer;
|
|
51
52
|
}
|
|
53
|
+
export declare function drop(human: Human | undefined, into: IContainer, items: Item[]): {
|
|
54
|
+
itemsDropped: Item[];
|
|
55
|
+
failedDrops: Item[];
|
|
56
|
+
};
|
|
52
57
|
declare const _default: Action<[[arg1: ActionArgument.Undefined, ActionArgument.ItemNearbyIncludingTradeContainer, ActionArgument.ItemArrayNearbyIncludingTradeContainer, MoveItemsSourceArgument], [arg1: ActionArgument.Undefined, DropItemFilterArgument]], Human<unknown, number, import("../../../reference/IReferenceManager").ReferenceType.NPC | import("../../../reference/IReferenceManager").ReferenceType.Player>, void, {
|
|
53
58
|
usable: true;
|
|
54
59
|
items: Item[];
|
|
@@ -57,6 +57,7 @@ export declare const NotUsableMessageItemOrDoodad: NotUsableMessage.IFactory<[Do
|
|
|
57
57
|
args: (itemOrDoodad: Doodad | Item | undefined) => import("../../../../../language/impl/TranslationImpl").default | undefined;
|
|
58
58
|
sources: Source.Action[];
|
|
59
59
|
}>;
|
|
60
|
+
export declare const NotUsableMessageCannotHere: (action: ActionType) => IActionNotUsable;
|
|
60
61
|
export declare const NotUsableMessageCannotFromHere: (action: ActionType) => IActionNotUsable;
|
|
61
62
|
export declare const NotUsableMessageCannotAnythingHere: (action: ActionType) => IActionNotUsable;
|
|
62
63
|
export {};
|
|
@@ -13,7 +13,7 @@ import type Human from "@wayward/game/game/entity/Human";
|
|
|
13
13
|
import type { IActionNotUsable, IActionUsable } from "@wayward/game/game/entity/action/IAction";
|
|
14
14
|
import { ActionArgument } from "@wayward/game/game/entity/action/IAction";
|
|
15
15
|
import { ActionArgumentCustom } from "@wayward/game/game/entity/action/argument/ActionArgumentCustom";
|
|
16
|
-
import Island from "@wayward/game/game/island/Island";
|
|
16
|
+
import type Island from "@wayward/game/game/island/Island";
|
|
17
17
|
import type { IContainer } from "@wayward/game/game/item/IItem";
|
|
18
18
|
import Item from "@wayward/game/game/item/Item";
|
|
19
19
|
import type Translation from "@wayward/game/language/Translation";
|
|
@@ -14,6 +14,7 @@ import type DoodadManager from "@wayward/game/game/doodad/DoodadManager";
|
|
|
14
14
|
import type { DoodadType, DoodadTypeGroup } from "@wayward/game/game/doodad/IDoodad";
|
|
15
15
|
import type { ActionType, IActionNotUsable } from "@wayward/game/game/entity/action/IAction";
|
|
16
16
|
import type ActionContext from "@wayward/game/game/entity/action/IActionContext";
|
|
17
|
+
import type { DropAllowProtected } from "@wayward/game/game/entity/action/actions/Drop";
|
|
17
18
|
import { NotUsableMessage } from "@wayward/game/game/entity/action/actions/helper/NotUsableMessage";
|
|
18
19
|
import type Creature from "@wayward/game/game/entity/creature/Creature";
|
|
19
20
|
import type { ContainerSort, IContainer, IMoveToTileOptions, ItemType, ItemTypeGroup } from "@wayward/game/game/item/IItem";
|
|
@@ -121,6 +122,7 @@ export interface IMoveItemOptions {
|
|
|
121
122
|
itemQuality?: Quality;
|
|
122
123
|
filterText?: string;
|
|
123
124
|
};
|
|
125
|
+
dropAllowProtected?: DropAllowProtected;
|
|
124
126
|
skipMessage?: boolean;
|
|
125
127
|
skipSound?: boolean;
|
|
126
128
|
skipTileUpdate?: boolean;
|
|
@@ -132,6 +134,7 @@ export interface IMoveItemOptions {
|
|
|
132
134
|
updateView?: true;
|
|
133
135
|
isTrading?: boolean;
|
|
134
136
|
revertFromDoodad?: boolean;
|
|
137
|
+
skipDrop?: true;
|
|
135
138
|
context?: ActionContext;
|
|
136
139
|
}
|
|
137
140
|
export interface IPlaceOnTileOptions {
|
|
@@ -170,6 +173,7 @@ export interface IAddToContainerResult {
|
|
|
170
173
|
itemsMoved: Item[];
|
|
171
174
|
noMoreRoomForItems: Item[];
|
|
172
175
|
topLevelContainer?: IContainer;
|
|
176
|
+
dropped?: true;
|
|
173
177
|
}
|
|
174
178
|
export interface IContainerOld extends Omit<IContainer, "addOrder"> {
|
|
175
179
|
itemOrders?: number[];
|
|
@@ -35,6 +35,7 @@ declare class ItemFinder extends EventEmitter.Host<IItemFinderEvents> {
|
|
|
35
35
|
private trackedContainers?;
|
|
36
36
|
private trackedItems?;
|
|
37
37
|
private foundItemIds?;
|
|
38
|
+
private foundItemBest?;
|
|
38
39
|
get human(): Human | undefined;
|
|
39
40
|
get container(): IContainer | undefined;
|
|
40
41
|
readonly observe: Observer.IRegistrar<this>;
|
|
@@ -44,7 +45,7 @@ declare class ItemFinder extends EventEmitter.Host<IItemFinderEvents> {
|
|
|
44
45
|
markDirty(): void;
|
|
45
46
|
track(): this;
|
|
46
47
|
dispose(): this;
|
|
47
|
-
protected onItemStateChange(item: Item): void;
|
|
48
|
+
protected onItemStateChange(item: Item, event: "durabilityChange" | "toggleProtected" | "qualityChange" | "transformed"): void;
|
|
48
49
|
protected onContainerItemAdd(items: ItemManager, itemsAdded: Item[], containerAddedTo: IContainer): void;
|
|
49
50
|
protected onContainerItemRemove(items: ItemManager, itemsRemoved: Item[], containerRemovedFrom?: IContainer): void;
|
|
50
51
|
protected onPlayerEvent(player: Player): void;
|
|
@@ -67,7 +68,10 @@ declare namespace ItemFinder {
|
|
|
67
68
|
register(finder: ItemFinder): void;
|
|
68
69
|
deregister(finder: ItemFinder): void;
|
|
69
70
|
dispose(): void;
|
|
70
|
-
protected
|
|
71
|
+
protected onItemDurabilityChange(item: Item): void;
|
|
72
|
+
protected onItemToggleProtected(item: Item): void;
|
|
73
|
+
protected onItemQualityChange(item: Item): void;
|
|
74
|
+
protected onItemTransformed(item: Item): void;
|
|
71
75
|
protected onContainerItemAdd(items: ItemManager, itemsAdded: Item[], containerAddedTo: IContainer): void;
|
|
72
76
|
protected onContainerItemRemove(items: ItemManager, itemsRemoved: Item[], containerRemovedFrom?: IContainer): void;
|
|
73
77
|
protected onPlayerEvent(player: Player): void;
|
|
@@ -385,6 +385,13 @@ export default class ItemManager extends EntityManager<Item, IItemRemoveOptions>
|
|
|
385
385
|
* @param craftingFilter True if we are filtering the crafting dialog.
|
|
386
386
|
*/
|
|
387
387
|
static isFiltered(item: ItemType | Item, filterText: string, craftingFilter?: boolean): boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Returns `true` if the item type or item is filtered out from inventory/crafting/container dialogs.
|
|
390
|
+
* @param item The ItemType or Item to check.
|
|
391
|
+
* @param filterText The string of text in which to filter for.
|
|
392
|
+
* @param craftingFilter True if we are filtering the crafting dialog.
|
|
393
|
+
*/
|
|
394
|
+
isFiltered(item: ItemType | Item, filterText: string, craftingFilter?: boolean): boolean;
|
|
388
395
|
/**
|
|
389
396
|
* Summons a void dweller based on item worth and chance or provides a hint message.
|
|
390
397
|
* @param item Item to get the worth of.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type Human from "@wayward/game/game/entity/Human";
|
|
2
|
+
import type Item from "@wayward/game/game/item/Item";
|
|
3
|
+
export default function (item: Item, human: Human, type?: import("../IItem").ItemType, description?: Readonly<import("../IItem").IItemDescription> | undefined): number | undefined;
|
|
@@ -32,6 +32,7 @@ import type Tooltip from "@wayward/game/ui/tooltip/Tooltip";
|
|
|
32
32
|
export default class ReferenceManager {
|
|
33
33
|
private readonly game;
|
|
34
34
|
static isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
35
|
+
isEnumReference(type: ReferenceType): type is EnumReferenceTypes;
|
|
35
36
|
static get(thing: Referenceable): Reference | undefined;
|
|
36
37
|
static getReferenceType(thing: Value<IReferenceTypeMap>): ReferenceType;
|
|
37
38
|
private referenceCursor;
|
|
@@ -344,7 +344,7 @@ export default class Tile implements IVector4, Partial<ITileContainer>, IFieldOf
|
|
|
344
344
|
*/
|
|
345
345
|
clearPuddles(executor: Human): boolean;
|
|
346
346
|
clearWaste(): void;
|
|
347
|
-
checkForHiddenMob(human
|
|
347
|
+
checkForHiddenMob(human?: Human): void;
|
|
348
348
|
/**
|
|
349
349
|
* Decrease the depth of a water tile if under 6 connected tiles
|
|
350
350
|
*/
|