@wayward/types 2.12.0-beta.dev.20220902.1 → 2.12.0-beta.dev.20220905.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/audio/IAudio.d.ts +5 -3
- package/definitions/game/game/doodad/Doodad.d.ts +1 -0
- package/definitions/game/game/entity/Entity.d.ts +20 -6
- package/definitions/game/game/entity/Human.d.ts +1 -3
- package/definitions/game/game/entity/IHuman.d.ts +8 -1
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +5 -9
- package/definitions/game/game/entity/action/IAction.d.ts +11 -16
- package/definitions/game/game/entity/action/actions/{Operate.d.ts → Dismount.d.ts} +1 -1
- package/definitions/game/game/entity/action/actions/GrabAll.d.ts +1 -3
- package/definitions/game/game/entity/action/actions/MoveItem.d.ts +32 -3
- package/definitions/game/game/entity/action/actions/{Paddle.d.ts → Ride.d.ts} +1 -1
- package/definitions/game/game/entity/action/actions/ToggleVehicle.d.ts +1 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +18 -24
- package/definitions/game/game/entity/action/usable/UsableActionType.d.ts +3 -1
- package/definitions/game/game/entity/action/usable/actions/UsableActionsDynamic.d.ts +2 -2
- package/definitions/game/game/entity/action/usable/actions/UsableActionsMain.d.ts +29 -27
- package/definitions/game/game/entity/action/usable/actions/UsableActionsVehicle.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/doodad/IUsableActionsDoodad.d.ts +2 -1
- package/definitions/game/game/entity/creature/ICreature.d.ts +7 -1
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +6 -5
- package/definitions/game/game/entity/player/IMessageManager.d.ts +7 -0
- package/definitions/game/game/entity/player/MessageManager.d.ts +3 -1
- package/definitions/game/game/inspection/infoProviders/Uses.d.ts +2 -1
- package/definitions/game/game/item/IItem.d.ts +23 -4
- package/definitions/game/game/item/IItemManager.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +1 -0
- package/definitions/game/language/dictionary/Message.d.ts +409 -405
- package/definitions/game/language/dictionary/UiTranslation.d.ts +665 -660
- package/definitions/game/multiplayer/packets/client/EmitPlayerEventPacket.d.ts +2 -2
- package/definitions/game/renderer/context/RendererOrigin.d.ts +3 -2
- package/definitions/game/renderer/tile/TileLayer.d.ts +1 -1
- package/definitions/game/steamworks/ISteamworks.d.ts +5 -0
- package/definitions/game/steamworks/Steamworks.d.ts +4 -2
- package/definitions/game/ui/component/Button.d.ts +1 -1
- package/definitions/game/ui/input/Bindable.d.ts +160 -175
- package/definitions/game/ui/input/BindableManager.d.ts +2 -2
- package/definitions/game/ui/input/IInput.d.ts +7 -0
- package/definitions/game/ui/input/InputManager.d.ts +0 -6
- package/definitions/game/ui/input/Macros.d.ts +2 -0
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -4
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +21 -3
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +8 -3
- package/definitions/game/ui/screen/screens/game/static/actions/ActionBarBindableManager.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +2 -0
- package/definitions/game/ui/screen/screens/game/util/movement/MovementHandler.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/util/movement/WalkToTileHandler.d.ts +1 -1
- package/definitions/game/ui/screen/screens/menu/menus/PauseMenu.d.ts +1 -0
- package/definitions/hosts/shared/globalTypes.d.ts +8 -6
- package/definitions/hosts/shared/globals.d.ts +1 -1
- package/package.json +1 -1
|
@@ -55,9 +55,11 @@ export declare enum SfxType {
|
|
|
55
55
|
UiInput = 28,
|
|
56
56
|
UiInvalid = 29,
|
|
57
57
|
UiOpen = 30,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
UiProtect = 31,
|
|
59
|
+
UiSelect = 32,
|
|
60
|
+
UiUnprotect = 33,
|
|
61
|
+
Walk = 34,
|
|
62
|
+
Water = 35
|
|
61
63
|
}
|
|
62
64
|
export declare type SfxUi = Extract<keyof typeof SfxType, `Ui${string}`> extends `Ui${infer RESULT}` ? Lowercase<RESULT> : never;
|
|
63
65
|
export declare enum Music {
|
|
@@ -154,6 +154,7 @@ export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements
|
|
|
154
154
|
*/
|
|
155
155
|
isGatherable(): boolean;
|
|
156
156
|
isEmbers(): boolean;
|
|
157
|
+
getVehicle(): import("game/item/IItem").IItemVehicle | undefined;
|
|
157
158
|
isVehicle(): boolean;
|
|
158
159
|
canHarvest(): boolean;
|
|
159
160
|
/**
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
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>;
|
|
@@ -82,7 +81,6 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
82
81
|
walkSoundCounter: number;
|
|
83
82
|
containerSortInfo: Record<string, IContainerSortInfo>;
|
|
84
83
|
dialogContainerInfo: Record<number, IDialogInfo>;
|
|
85
|
-
isMoving: boolean;
|
|
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
|
/**
|
|
@@ -331,7 +331,8 @@ export declare enum RestCancelReason {
|
|
|
331
331
|
NearbyCreatureDamagedDoodad = 3,
|
|
332
332
|
CreatureDamaged = 4,
|
|
333
333
|
Canceled = 5,
|
|
334
|
-
Dying = 6
|
|
334
|
+
Dying = 6,
|
|
335
|
+
WaterPoured = 7
|
|
335
336
|
}
|
|
336
337
|
export declare const restCancelReasonMessageMap: Record<RestCancelReason, Message | undefined>;
|
|
337
338
|
export interface IRestData {
|
|
@@ -418,6 +419,12 @@ export interface IVoyageInfo {
|
|
|
418
419
|
usedItems?: Item[];
|
|
419
420
|
wantedItems?: ItemType[];
|
|
420
421
|
}
|
|
422
|
+
export declare enum MovingClientSide {
|
|
423
|
+
NoInput = 0,
|
|
424
|
+
Moving = 1,
|
|
425
|
+
Moved = 2,
|
|
426
|
+
PreNoInput = 3
|
|
427
|
+
}
|
|
421
428
|
/**
|
|
422
429
|
* The swimming skill required to travel to another island
|
|
423
430
|
*
|
|
@@ -32,6 +32,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
32
32
|
13: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Dig").IDigGenericCanUse | import("game/entity/action/actions/Dig").IDigTileCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
33
33
|
0: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.OptionalItemArrayNearby, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Disassemble").IDisassembleCanUse, [import("../../item/Item").default, ((import("../../item/Item").default | undefined)[] | undefined)?]>;
|
|
34
34
|
40: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Dismantle").IDismantleCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
35
|
+
113: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
|
|
35
36
|
39: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
36
37
|
62: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/DrinkInFront").IDrinkInFrontCanUse, []>;
|
|
37
38
|
8: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
|
|
@@ -45,9 +46,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
45
46
|
36: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
46
47
|
22: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Gather").IGatherCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
47
48
|
15: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/actions/GatherLiquid").IGatherLiquidCanUse, [import("../../item/Item").default]>;
|
|
48
|
-
86: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void,
|
|
49
|
-
usable: true;
|
|
50
|
-
}, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
49
|
+
86: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/MoveItem").MoveItemCanUse, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
51
50
|
52: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default, void, import("game/entity/action/actions/Grasp").IGraspCanUse, [import("../../item/Item").default]>;
|
|
52
51
|
69: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Harvest").IHarvestCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
53
52
|
12: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
|
|
@@ -65,9 +64,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
65
64
|
58: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Direction], import("../Human").default, void, {
|
|
66
65
|
usable: true;
|
|
67
66
|
}, [import("../../../utilities/math/Direction").Direction.None | import("../../../utilities/math/Direction").Direction.East | import("../../../utilities/math/Direction").Direction.North | import("../../../utilities/math/Direction").Direction.West | import("../../../utilities/math/Direction").Direction.South]>;
|
|
68
|
-
65: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void,
|
|
69
|
-
usable: true;
|
|
70
|
-
}, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
67
|
+
65: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Quality, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.String, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/MoveItem").MoveItemCanUse, [(import("../../item/Item").default | undefined)?, (import("../../item/IItem").IContainer | undefined)?, (import("../../item/IItem").ItemType | undefined)?, (import("../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
71
68
|
59: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Vector2, [import("game/entity/action/IAction").ActionArgument.Direction, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, {
|
|
72
69
|
usable: true;
|
|
73
70
|
}, [import("../../../utilities/math/IVector").IVector2, (import("../../../utilities/math/Direction").Direction.None | import("../../../utilities/math/Direction").Direction.East | import("../../../utilities/math/Direction").Direction.North | import("../../../utilities/math/Direction").Direction.West | import("../../../utilities/math/Direction").Direction.South | undefined)?]>;
|
|
@@ -76,9 +73,8 @@ export declare const actionDescriptionsSlow: {
|
|
|
76
73
|
31: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
77
74
|
29: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Container, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleContainer").IToggleContainerCanUse, [(import("../../item/IItem").IContainer | undefined)?, (boolean | undefined)?]>;
|
|
78
75
|
49: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, true | undefined, import("game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../doodad/Doodad").default | undefined)?]>;
|
|
79
|
-
108: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [import("../../doodad/Doodad").default | import("../../item/Item").default]>;
|
|
80
76
|
111: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleTilled").ITillCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
81
|
-
14: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [import("../../doodad/Doodad").default | import("../../item/Item").default]>;
|
|
77
|
+
14: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
|
|
82
78
|
43: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/Pet").IPetCanUse, []>;
|
|
83
79
|
1: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/PickUp").IPickUpCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
84
80
|
54: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/PickUpAllItems").IPickUpAllItemsCanUse, []>;
|
|
@@ -129,7 +125,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
129
125
|
103: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, true | undefined, import("game/entity/action/actions/ToggleDoor").IToggleDoorCanUse, [(import("../../doodad/Doodad").default | undefined)?]>;
|
|
130
126
|
101: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
131
127
|
112: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleTilled").ITillCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
132
|
-
102: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [import("../../doodad/Doodad").default | import("../../item/Item").default]>;
|
|
128
|
+
102: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../doodad/Doodad").default | import("../../item/Item").default | undefined)?]>;
|
|
133
129
|
73: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.NPCNearby], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../npc/NPC").default]>;
|
|
134
130
|
35: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory, [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Transmogrify").ITransmogrifyCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
135
131
|
64: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [(import("../../item/Item").default | undefined)?]>;
|
|
@@ -18,8 +18,7 @@ import type Human from "game/entity/Human";
|
|
|
18
18
|
import type { AttackType, EntityType } from "game/entity/IEntity";
|
|
19
19
|
import type { EquipType, RestType, SkillType } from "game/entity/IHuman";
|
|
20
20
|
import type NPC from "game/entity/npc/NPC";
|
|
21
|
-
import type {
|
|
22
|
-
import { Source } from "game/entity/player/IMessageManager";
|
|
21
|
+
import type { IPackedMessage } from "game/entity/player/IMessageManager";
|
|
23
22
|
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
24
23
|
import type Player from "game/entity/player/Player";
|
|
25
24
|
import type { Quality } from "game/IObject";
|
|
@@ -31,8 +30,6 @@ import type { IPromptDescriptionBase, PromptDescriptionArgs } from "game/meta/pr
|
|
|
31
30
|
import type { Milestone } from "game/milestones/IMilestone";
|
|
32
31
|
import type { ITile } from "game/tile/ITerrain";
|
|
33
32
|
import type TileEvent from "game/tile/TileEvent";
|
|
34
|
-
import type Message from "language/dictionary/Message";
|
|
35
|
-
import type Translation from "language/Translation";
|
|
36
33
|
import type { IRGB } from "utilities/Color";
|
|
37
34
|
import type { Direction } from "utilities/math/Direction";
|
|
38
35
|
import type { IVector2, IVector3 } from "utilities/math/IVector";
|
|
@@ -51,7 +48,7 @@ export declare enum ActionType {
|
|
|
51
48
|
Sleep = 11,
|
|
52
49
|
Heal = 12,
|
|
53
50
|
Dig = 13,
|
|
54
|
-
|
|
51
|
+
Ride = 14,
|
|
55
52
|
GatherLiquid = 15,
|
|
56
53
|
Cast = 16,
|
|
57
54
|
Lockpick = 17,
|
|
@@ -145,11 +142,12 @@ export declare enum ActionType {
|
|
|
145
142
|
UpdateOption = 105,
|
|
146
143
|
UpdateGameOption = 106,
|
|
147
144
|
UpdateWalkPath = 107,
|
|
148
|
-
|
|
145
|
+
Unused2 = 108,
|
|
149
146
|
Absorb = 109,
|
|
150
147
|
Exude = 110,
|
|
151
148
|
PackGround = 111,
|
|
152
|
-
ToggleTilled = 112
|
|
149
|
+
ToggleTilled = 112,
|
|
150
|
+
DismountVehicle = 113
|
|
153
151
|
}
|
|
154
152
|
export declare enum ActionUsability {
|
|
155
153
|
Paused = 0,
|
|
@@ -175,22 +173,19 @@ export declare enum ActionDisplayLevel {
|
|
|
175
173
|
}
|
|
176
174
|
export interface IActionUsable {
|
|
177
175
|
usable: true;
|
|
176
|
+
/**
|
|
177
|
+
* Whether this action is currently usable with the "use on move" feature. Defaults to `true`
|
|
178
|
+
*/
|
|
179
|
+
usableOnMove?: boolean;
|
|
178
180
|
displayLevel?: ActionDisplayLevel;
|
|
179
181
|
}
|
|
180
|
-
export interface IActionNotUsable {
|
|
182
|
+
export interface IActionNotUsable extends Partial<IPackedMessage> {
|
|
181
183
|
usable: false;
|
|
182
184
|
alreadyUsing?: true;
|
|
183
185
|
errorDisplayLevel?: ActionDisplayLevel;
|
|
184
|
-
|
|
185
|
-
args?: Translation | any[];
|
|
186
|
+
mobCheck?: IVector3;
|
|
186
187
|
arg?: never;
|
|
187
|
-
type?: MessageType;
|
|
188
|
-
sources?: Source | Source[];
|
|
189
188
|
source?: never;
|
|
190
|
-
mobCheck?: IVector3;
|
|
191
|
-
}
|
|
192
|
-
export declare namespace IActionNotUsableUtilities {
|
|
193
|
-
function sendMessage(result: IActionNotUsable, human?: Human): void;
|
|
194
189
|
}
|
|
195
190
|
export declare type AnyActionDescription = IActionDescription<Array<ActionArgument | ActionArgument[]>, Entity, any, IActionUsable, any[]>;
|
|
196
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>> {
|
|
@@ -8,5 +8,5 @@
|
|
|
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
|
-
declare const _default: import("../Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [import("../../../doodad/Doodad").default | import("../../../item/Item").default]>;
|
|
11
|
+
declare const _default: import("../Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../../doodad/Doodad").default | import("../../../item/Item").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -8,7 +8,5 @@
|
|
|
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
|
-
declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Container, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.ItemType, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Quality, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.String, import("../IAction").ActionArgument.Undefined]], import("../../Human").default, void,
|
|
12
|
-
usable: true;
|
|
13
|
-
}, [(import("../../../item/Item").default | undefined)?, (import("../../../item/IItem").IContainer | undefined)?, (import("../../../item/IItem").ItemType | undefined)?, (import("../../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
11
|
+
declare const _default: import("../Action").Action<[[import("../IAction").ActionArgument.ItemNearbyIncludingTradeContainer, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Container, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.ItemType, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.Quality, import("../IAction").ActionArgument.Undefined], [import("../IAction").ActionArgument.String, import("../IAction").ActionArgument.Undefined]], import("../../Human").default, void, import("game/entity/action/actions/MoveItem").MoveItemCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../../item/IItem").IContainer | undefined)?, (import("../../../item/IItem").ItemType | undefined)?, (import("../../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
14
12
|
export default _default;
|
|
@@ -9,11 +9,40 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
|
+
import type { IActionUsable } from "game/entity/action/IAction";
|
|
12
13
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
13
14
|
import type Human from "game/entity/Human";
|
|
15
|
+
import type MerchantNPC from "game/entity/npc/npcs/Merchant";
|
|
16
|
+
import type { IMerchantBuyPrice } from "game/entity/npc/npcs/Merchant";
|
|
14
17
|
import type { IContainer } from "game/item/IItem";
|
|
15
18
|
import type Item from "game/item/Item";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
import Translation from "language/Translation";
|
|
20
|
+
export interface IMoveItemBuyItemFromMerchantCanUse extends IActionUsable {
|
|
21
|
+
type: "BuyItemFromMerchant";
|
|
22
|
+
item: Item;
|
|
23
|
+
merchant: MerchantNPC;
|
|
24
|
+
targetContainer: IContainer;
|
|
25
|
+
sellPrice: number;
|
|
26
|
+
}
|
|
27
|
+
export interface IMoveItemSellItemFromMerchantCanUse extends IActionUsable {
|
|
28
|
+
type: "SellItemToMerchant";
|
|
29
|
+
item: Item;
|
|
30
|
+
merchant: MerchantNPC;
|
|
31
|
+
targetContainer: IContainer;
|
|
32
|
+
buyPrice: IMerchantBuyPrice;
|
|
33
|
+
}
|
|
34
|
+
export interface IMoveItemSingleItemCanUse extends IActionUsable {
|
|
35
|
+
type: "MoveSingleItem";
|
|
36
|
+
item: Item;
|
|
37
|
+
targetContainer: IContainer;
|
|
38
|
+
containerName: Translation | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface IMoveItemMultipleItemsCanUse extends IActionUsable {
|
|
41
|
+
type: "MoveMultipleItems";
|
|
42
|
+
fromContainer: IContainer;
|
|
43
|
+
targetContainer: IContainer;
|
|
44
|
+
containerName: Translation | undefined;
|
|
45
|
+
}
|
|
46
|
+
export declare type MoveItemCanUse = IMoveItemBuyItemFromMerchantCanUse | IMoveItemSellItemFromMerchantCanUse | IMoveItemSingleItemCanUse | IMoveItemMultipleItemsCanUse;
|
|
47
|
+
declare const _default: Action<[[ActionArgument.ItemNearbyIncludingTradeContainer, ActionArgument.Undefined], [ActionArgument.Container, ActionArgument.Undefined], [ActionArgument.ItemType, ActionArgument.Undefined], [ActionArgument.Quality, ActionArgument.Undefined], [ActionArgument.String, ActionArgument.Undefined]], Human, void, MoveItemCanUse, [(Item | undefined)?, (IContainer | undefined)?, (import("game/item/IItem").ItemType | undefined)?, (import("../../../IObject").Quality | undefined)?, (string | undefined)?]>;
|
|
19
48
|
export default _default;
|
|
@@ -8,5 +8,5 @@
|
|
|
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
|
-
declare const _default: import("../Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad]], import("../../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [import("../../../doodad/Doodad").default | import("../../../item/Item").default]>;
|
|
11
|
+
declare const _default: import("../Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Doodad, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../../Human").default, void, import("game/entity/action/actions/ToggleVehicle").ToggleVehicleCanUse, [(import("../../../doodad/Doodad").default | import("../../../item/Item").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -29,5 +29,5 @@ export interface ToggleVehicleItemCanUse extends IActionUsable {
|
|
|
29
29
|
facingTile?: ITile;
|
|
30
30
|
}
|
|
31
31
|
export declare type ToggleVehicleCanUse = ToggleVehicleDoodadCanUse | ToggleVehicleItemCanUse;
|
|
32
|
-
declare const _default: Action<[[ActionArgument.ItemNearby, ActionArgument.Doodad]], import("../../Human").default, void, ToggleVehicleCanUse, [Doodad | Item]>;
|
|
32
|
+
declare const _default: Action<[[ActionArgument.ItemNearby, ActionArgument.Doodad, ActionArgument.Undefined]], import("../../Human").default, void, ToggleVehicleCanUse, [(Doodad | Item | undefined)?]>;
|
|
33
33
|
export default _default;
|
|
@@ -25,12 +25,9 @@ import type Message from "language/dictionary/Message";
|
|
|
25
25
|
import { ActionTranslation } from "language/dictionary/Misc";
|
|
26
26
|
import TranslationImpl from "language/impl/TranslationImpl";
|
|
27
27
|
import Translation from "language/Translation";
|
|
28
|
-
import { PathType } from "resource/IResourceLoader";
|
|
29
28
|
import type Bindable from "ui/input/Bindable";
|
|
30
29
|
import type { ItemDetailIconLocation } from "ui/screen/screens/game/component/Item";
|
|
31
|
-
import type Tooltip from "ui/tooltip/Tooltip";
|
|
32
30
|
import type { HighlightSelector } from "ui/util/IHighlight";
|
|
33
|
-
import ImagePath from "ui/util/ImagePath";
|
|
34
31
|
export interface IUsableActionRequirement<TYPE> {
|
|
35
32
|
allowNone?: true;
|
|
36
33
|
validate?(player: Player, value: TYPE): boolean;
|
|
@@ -67,15 +64,17 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
|
|
|
67
64
|
validate(player: Player, value: Item): boolean;
|
|
68
65
|
} ? Item : never) | (REQUIREMENTS["item"] extends {
|
|
69
66
|
find(player: Player): Item;
|
|
70
|
-
} ? Item : never)
|
|
67
|
+
} ? Item : never) | (REQUIREMENTS["item"] extends {
|
|
68
|
+
allowOnlyItemType(player: Player, type: ItemType): boolean;
|
|
69
|
+
} ? undefined : never));
|
|
71
70
|
itemType: ((REQUIREMENTS["item"] extends true ? ItemType : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
72
71
|
allowNone: true;
|
|
73
72
|
} ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
74
73
|
validate(player: Player, value: Item): boolean;
|
|
75
|
-
} ? ItemType : never) | (REQUIREMENTS["item"] extends {
|
|
74
|
+
} ? ItemType | undefined : never) | (REQUIREMENTS["item"] extends {
|
|
76
75
|
find(player: Player): Item;
|
|
77
76
|
} ? ItemType : never) | (REQUIREMENTS["item"] extends {
|
|
78
|
-
allowOnlyItemType(player: Player): boolean;
|
|
77
|
+
allowOnlyItemType(player: Player, type: ItemType): boolean;
|
|
79
78
|
} ? ItemType : never));
|
|
80
79
|
doodad: ((REQUIREMENTS["doodad"] extends true ? Doodad : never) | (undefined extends REQUIREMENTS["doodad"] ? undefined : never) | (REQUIREMENTS["doodad"] extends {
|
|
81
80
|
allowNone: true;
|
|
@@ -101,7 +100,7 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
|
|
|
101
100
|
}
|
|
102
101
|
export declare type UsableActionIconReference = ActionType | UsableActionType | UsableActionTypePlaceholder | (Omit<IIcon, "path"> & {
|
|
103
102
|
action: ActionType | UsableActionType | UsableActionTypePlaceholder;
|
|
104
|
-
});
|
|
103
|
+
}) | IIcon;
|
|
105
104
|
export declare type ReturnableUsableActionUsability = IActionUsable | IActionNotUsable | boolean;
|
|
106
105
|
export interface IUsableActionUsable<REQUIREMENTS extends IUsableActionRequirements> extends IActionUsable {
|
|
107
106
|
using: IUsableActionUsing<REQUIREMENTS>;
|
|
@@ -142,7 +141,7 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
142
141
|
/**
|
|
143
142
|
* The icon this action should have, if any.
|
|
144
143
|
*/
|
|
145
|
-
icon?: UsableActionIconReference
|
|
144
|
+
icon?: SupplierOr<UsableActionIconReference, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>]>;
|
|
146
145
|
/**
|
|
147
146
|
* Where the icon should appear, when slotted with an item. Defaults to bottom right.
|
|
148
147
|
*
|
|
@@ -151,10 +150,6 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
151
150
|
* because it's repairing this tool.
|
|
152
151
|
*/
|
|
153
152
|
iconLocationOnItem?: ItemDetailIconLocation;
|
|
154
|
-
/**
|
|
155
|
-
* The tooltip this action should have, or an initialiser for it.
|
|
156
|
-
*/
|
|
157
|
-
tooltip?: ActionType | ((tooltip: Tooltip) => any);
|
|
158
153
|
/**
|
|
159
154
|
* A handler for what this action will highlight when hovered with the mouse.
|
|
160
155
|
* @param selectors The default selectors. The defaults can be removed, and/or additional selectors can be added.
|
|
@@ -174,11 +169,14 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
174
169
|
*/
|
|
175
170
|
displayLevel?: ActionDisplayLevel;
|
|
176
171
|
/**
|
|
177
|
-
*
|
|
172
|
+
* Controls the display order of this action compared to other actions.
|
|
178
173
|
* Generally you want to leave this as 0 (default) and just register your action in the correct place.
|
|
179
|
-
*
|
|
174
|
+
* Priority can be generated dynamically based on the given objects — item, doodad, etc.
|
|
175
|
+
*
|
|
176
|
+
* Higher priority === appears first.
|
|
177
|
+
* Lower priority === appears last.
|
|
180
178
|
*/
|
|
181
|
-
|
|
179
|
+
priority?: number | ((using: IUsableActionPossibleUsing) => number | undefined);
|
|
182
180
|
/**
|
|
183
181
|
* Whether this action is currently usable — even if an action "makes sense" with the player and the objects they're using,
|
|
184
182
|
* and the player can slot it and stuff, it might not currently be usable. For example, "harvest" having nothing to harvest.
|
|
@@ -261,14 +259,10 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
261
259
|
getDoodad(player: Player, provided?: IUsableActionPossibleUsing): false | Doodad | undefined;
|
|
262
260
|
getCreature(player: Player, provided?: IUsableActionPossibleUsing): false | Creature | undefined;
|
|
263
261
|
getNPC(player: Player, provided?: IUsableActionPossibleUsing): false | NPC | undefined;
|
|
264
|
-
getIcon():
|
|
265
|
-
path: ImagePath<PathType.Action>;
|
|
266
|
-
width: number;
|
|
267
|
-
height: number;
|
|
268
|
-
} | undefined;
|
|
262
|
+
getIcon(provided: IUsableActionPossibleUsing): IIcon | undefined;
|
|
269
263
|
getHighlightSelectors(using?: IUsableActionPossibleUsing): HighlightSelector[];
|
|
270
264
|
private translator?;
|
|
271
|
-
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation):
|
|
265
|
+
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation): Translation | undefined;
|
|
272
266
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
273
267
|
}
|
|
274
268
|
export declare class UsableActionTranslator {
|
|
@@ -276,9 +270,9 @@ export declare class UsableActionTranslator {
|
|
|
276
270
|
private nameSupplier?;
|
|
277
271
|
private descriptionSupplier?;
|
|
278
272
|
constructor(id: ActionId);
|
|
279
|
-
name(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
280
|
-
description(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
281
|
-
get(using?: IUsableActionPossibleUsing, which?: ActionTranslation):
|
|
273
|
+
name(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
274
|
+
description(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
275
|
+
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionTranslation): Translation | undefined;
|
|
282
276
|
}
|
|
283
277
|
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
284
278
|
create: <DEFINITION extends IUsableActionDefinition<REQUIREMENTS>>(action: DEFINITION) => UsableAction<REQUIREMENTS, DEFINITION>;
|
|
@@ -61,5 +61,7 @@ export declare enum UsableActionType {
|
|
|
61
61
|
export declare enum UsableActionTypePlaceholder {
|
|
62
62
|
TradeItem = 2000000,
|
|
63
63
|
MoveAllToInventory = 2000001,
|
|
64
|
-
MoveAllOfSameQualityToInventory = 2000002
|
|
64
|
+
MoveAllOfSameQualityToInventory = 2000002,
|
|
65
|
+
Paddle = 2000003,
|
|
66
|
+
Operate = 2000004
|
|
65
67
|
}
|
|
@@ -18,7 +18,7 @@ export interface IUsableActionDynamicDefinition {
|
|
|
18
18
|
icon?: UsableActionIconReference;
|
|
19
19
|
bindable: Bindable;
|
|
20
20
|
displayLevel?: ActionDisplayLevel;
|
|
21
|
-
|
|
21
|
+
priority?: number;
|
|
22
22
|
}
|
|
23
23
|
export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> {
|
|
24
24
|
id: string;
|
|
@@ -27,7 +27,7 @@ export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDyn
|
|
|
27
27
|
requirements?(action: ActionType, definition?: DEFINITION): REQUIREMENTS;
|
|
28
28
|
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): ReturnableUsableActionUsability;
|
|
29
29
|
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): any;
|
|
30
|
-
|
|
30
|
+
priority?(action: ActionType, using: IUsableActionPossibleUsing, definition?: DEFINITION): number | undefined;
|
|
31
31
|
}
|
|
32
32
|
export default class UsableActionsDynamic<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> extends UsableActionGenerator {
|
|
33
33
|
constructor(config: IUsableActionsDynamicConfig<DEFINITION, REQUIREMENTS>);
|
|
@@ -13,29 +13,30 @@ declare const UsableActionsMain: UsableActionGenerator<[]>;
|
|
|
13
13
|
export default UsableActionsMain;
|
|
14
14
|
export declare enum UsableActionSet {
|
|
15
15
|
/**
|
|
16
|
-
* A set of usable action that appear before all other actions, unless {@link IUsableActionDefinitionBase.
|
|
17
|
-
* Note that `
|
|
16
|
+
* A set of usable action that appear before all other actions, unless {@link IUsableActionDefinitionBase.priority} causes them to appear even earlier.
|
|
17
|
+
* Note that `priority` is used to sort "use item/doodad/npc" actions to the top — the actions that appear in {@link IItemDescription.use}.
|
|
18
18
|
*/
|
|
19
19
|
First = 0,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
Vehicle = 1,
|
|
21
|
+
WithHands = 2,
|
|
22
|
+
PickUp = 3,
|
|
23
|
+
Rest = 4,
|
|
24
|
+
Misc = 5,
|
|
25
|
+
Till = 6,
|
|
26
|
+
UseItem = 7,
|
|
27
|
+
CloseContainer = 8,
|
|
28
|
+
Equip = 9,
|
|
29
|
+
Craft = 10,
|
|
30
|
+
XWithY = 11,
|
|
31
|
+
ItemMisc = 12,
|
|
32
|
+
ItemDrop = 13,
|
|
33
|
+
ItemMoveMenus = 14,
|
|
34
|
+
Doodads = 15,
|
|
35
|
+
Creatures = 16,
|
|
36
|
+
UseNPC = 17,
|
|
37
|
+
Rename = 18,
|
|
38
|
+
Protect = 19,
|
|
39
|
+
Main = 20
|
|
39
40
|
}
|
|
40
41
|
export declare const usableActionSets: {
|
|
41
42
|
0: UsableActionGenerator<[]>;
|
|
@@ -44,18 +45,19 @@ export declare const usableActionSets: {
|
|
|
44
45
|
3: UsableActionGenerator<[]>;
|
|
45
46
|
4: UsableActionGenerator<[]>;
|
|
46
47
|
5: UsableActionGenerator<[]>;
|
|
47
|
-
6:
|
|
48
|
-
7:
|
|
48
|
+
6: UsableActionGenerator<[]>;
|
|
49
|
+
7: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/item/UsableActionsUseItem").IUseItemAction, import("game/entity/action/usable/UsableAction").IUsableActionRequirements>;
|
|
49
50
|
8: UsableActionGenerator<[]>;
|
|
50
51
|
9: UsableActionGenerator<[]>;
|
|
51
52
|
10: UsableActionGenerator<[]>;
|
|
52
53
|
11: UsableActionGenerator<[]>;
|
|
53
|
-
12: UsableActionGenerator<[
|
|
54
|
-
13: UsableActionGenerator<[]>;
|
|
54
|
+
12: UsableActionGenerator<[]>;
|
|
55
|
+
13: UsableActionGenerator<[isDropMenu?: true | undefined]>;
|
|
55
56
|
14: UsableActionGenerator<[]>;
|
|
56
57
|
15: UsableActionGenerator<[]>;
|
|
57
|
-
16:
|
|
58
|
-
17:
|
|
58
|
+
16: UsableActionGenerator<[]>;
|
|
59
|
+
17: import("./UsableActionsDynamic").default<import("game/entity/action/usable/actions/UsableActionsUseNPC").IUseNPCAction, import("game/entity/action/usable/UsableAction").IUsableActionRequirements>;
|
|
59
60
|
18: UsableActionGenerator<[]>;
|
|
60
61
|
19: UsableActionGenerator<[]>;
|
|
62
|
+
20: UsableActionGenerator<[]>;
|
|
61
63
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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 { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
|
+
export default _default;
|