@wayward/types 2.12.0-beta.dev.20220901.1 → 2.12.0-beta.dev.20220904.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/Game.d.ts +2 -2
- package/definitions/game/game/doodad/Doodad.d.ts +1 -0
- package/definitions/game/game/entity/Entity.d.ts +1 -0
- package/definitions/game/game/entity/Human.d.ts +3 -3
- package/definitions/game/game/entity/IHuman.d.ts +5 -2
- package/definitions/game/game/entity/action/ActionExecutor.d.ts +2 -2
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +5 -9
- package/definitions/game/game/entity/action/IAction.d.ts +13 -18
- 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 +13 -21
- 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/NPC.d.ts +2 -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/IPlayer.d.ts +8 -4
- 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 +663 -660
- package/definitions/game/ui/input/Bindable.d.ts +179 -191
- package/definitions/game/ui/input/BindableManager.d.ts +2 -2
- package/definitions/game/ui/old/OldUi.d.ts +1 -1
- package/definitions/game/ui/old/functional/IFunctionalSortable.d.ts +1 -0
- 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 +5 -3
- 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 {
|
|
@@ -16,7 +16,7 @@ import type Human from "game/entity/Human";
|
|
|
16
16
|
import type { Defense } from "game/entity/IEntity";
|
|
17
17
|
import { DamageType } from "game/entity/IEntity";
|
|
18
18
|
import type { Delay } from "game/entity/IHuman";
|
|
19
|
-
import type {
|
|
19
|
+
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
20
20
|
import type { IGameEvents, IMovementTime, IPlayOptions, ISynchronizeState } from "game/IGame";
|
|
21
21
|
import { PauseSource, SaveType, TickFlag, TurnMode } from "game/IGame";
|
|
22
22
|
import type Island from "game/island/Island";
|
|
@@ -132,7 +132,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
132
132
|
* Marks that the human had a turn
|
|
133
133
|
* In manual turn mode, it will tick the humans stat timers & the game
|
|
134
134
|
*/
|
|
135
|
-
passTurn(human: Human, turnType?:
|
|
135
|
+
passTurn(human: Human, turnType?: TurnTypeFlag): void;
|
|
136
136
|
tickRealtime(): void;
|
|
137
137
|
updateView(source: RenderSource, updateFov?: boolean, computeSpritesNow?: boolean): void;
|
|
138
138
|
updateTablesAndWeight(): void;
|
|
@@ -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
|
/**
|
|
@@ -66,6 +66,7 @@ export default abstract class Entity extends EventEmitter.Host<IEntityEvents> im
|
|
|
66
66
|
attackAnimationType: DamageType | undefined;
|
|
67
67
|
attackAnimationTime: IMovementTime | undefined;
|
|
68
68
|
isMovingClientside: boolean;
|
|
69
|
+
allowSmartMovementClientside: boolean;
|
|
69
70
|
protected _movementTime: {
|
|
70
71
|
start: number;
|
|
71
72
|
end: number;
|
|
@@ -21,7 +21,7 @@ import type { IStat } from "game/entity/IStats";
|
|
|
21
21
|
import { Stat } from "game/entity/IStats";
|
|
22
22
|
import type { IMessageManager } from "game/entity/player/IMessageManager";
|
|
23
23
|
import type { ILoadOnIslandOptions, IMobCheck, IMovementIntent, IWalkPath } from "game/entity/player/IPlayer";
|
|
24
|
-
import { PlayerState,
|
|
24
|
+
import { PlayerState, TurnTypeFlag, WeightStatus } from "game/entity/player/IPlayer";
|
|
25
25
|
import type { INoteManager } from "game/entity/player/note/NoteManager";
|
|
26
26
|
import PlayerDefense from "game/entity/player/PlayerDefense";
|
|
27
27
|
import type { IQuestManager } from "game/entity/player/quest/QuestManager";
|
|
@@ -241,12 +241,12 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
241
241
|
private recalculateInsulation;
|
|
242
242
|
private getEquipmentInsulation;
|
|
243
243
|
discoverRecipe(recipeType: ItemType, crafted?: ICrafted, discoveredClientSide?: boolean): void;
|
|
244
|
-
passTurn(turnType?:
|
|
244
|
+
passTurn(turnType?: TurnTypeFlag): void;
|
|
245
245
|
/**
|
|
246
246
|
* Ticks a player
|
|
247
247
|
* @returns True if the game should tick after this
|
|
248
248
|
*/
|
|
249
|
-
tick(isPassTurn?: boolean): boolean;
|
|
249
|
+
tick(isPassTurn?: boolean, turnType?: TurnTypeFlag): boolean;
|
|
250
250
|
private restTick;
|
|
251
251
|
getDamage(causesDamage: ICausesDamage, equipType?: EquipType): number;
|
|
252
252
|
private slitherSuckerDamage;
|
|
@@ -25,6 +25,7 @@ import { ItemType, ItemTypeGroup, RecipeLevel } from "game/item/IItem";
|
|
|
25
25
|
import type Item from "game/item/Item";
|
|
26
26
|
import { TempType } from "game/temperature/ITemperature";
|
|
27
27
|
import type { ITile } from "game/tile/ITerrain";
|
|
28
|
+
import Message from "language/dictionary/Message";
|
|
28
29
|
import type { IModdable } from "mod/ModRegistry";
|
|
29
30
|
import type { IOptions } from "save/data/ISaveDataGlobal";
|
|
30
31
|
import type { IRGB } from "utilities/Color";
|
|
@@ -330,8 +331,10 @@ export declare enum RestCancelReason {
|
|
|
330
331
|
NearbyCreatureDamagedDoodad = 3,
|
|
331
332
|
CreatureDamaged = 4,
|
|
332
333
|
Canceled = 5,
|
|
333
|
-
Dying = 6
|
|
334
|
+
Dying = 6,
|
|
335
|
+
WaterPoured = 7
|
|
334
336
|
}
|
|
337
|
+
export declare const restCancelReasonMessageMap: Record<RestCancelReason, Message | undefined>;
|
|
335
338
|
export interface IRestData {
|
|
336
339
|
type: RestType;
|
|
337
340
|
startHealth: number;
|
|
@@ -339,7 +342,7 @@ export interface IRestData {
|
|
|
339
342
|
itemId?: number;
|
|
340
343
|
doodadId?: number;
|
|
341
344
|
cycle?: number;
|
|
342
|
-
cancelReason?: RestCancelReason
|
|
345
|
+
cancelReason?: Set<RestCancelReason>;
|
|
343
346
|
}
|
|
344
347
|
export declare enum RestType {
|
|
345
348
|
Resting = 0,
|
|
@@ -14,7 +14,7 @@ import type { AnyActionDescription, IActionApi, IActionArgumentTypeMap, IActionC
|
|
|
14
14
|
import { ActionArgument, ActionType } from "game/entity/action/IAction";
|
|
15
15
|
import type Entity from "game/entity/Entity";
|
|
16
16
|
import type { SkillType } from "game/entity/IHuman";
|
|
17
|
-
import type {
|
|
17
|
+
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
18
18
|
import type Item from "game/item/Item";
|
|
19
19
|
import type { IPromptDescriptionBase, PromptDescriptionArgs } from "game/meta/prompt/IPrompt";
|
|
20
20
|
import { Milestone } from "game/milestones/IMilestone";
|
|
@@ -106,7 +106,7 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
106
106
|
prompt<PROMPT extends IPromptDescriptionBase<any[]>>(prompt: PROMPT, ...args: PromptDescriptionArgs<PROMPT>): Promise<boolean>;
|
|
107
107
|
isArgumentType<AA extends ActionArgument>(argument: any, index: number, argumentType: AA): argument is IActionArgumentTypeMap[AA];
|
|
108
108
|
setDelay(delay: number, replace?: boolean): this;
|
|
109
|
-
setPassTurn(turnType?:
|
|
109
|
+
setPassTurn(turnType?: TurnTypeFlag): this;
|
|
110
110
|
setUpdateView(updateFov?: boolean): this;
|
|
111
111
|
setUpdateRender(): this;
|
|
112
112
|
setUpdateTablesAndWeight(): this;
|
|
@@ -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,9 +18,8 @@ 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 {
|
|
23
|
-
import type { TurnType } from "game/entity/player/IPlayer";
|
|
21
|
+
import type { IPackedMessage } from "game/entity/player/IMessageManager";
|
|
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";
|
|
26
25
|
import type Island from "game/island/Island";
|
|
@@ -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>> {
|
|
@@ -249,7 +244,7 @@ export interface IActionApi<E extends Entity = Entity, CU extends IActionUsable
|
|
|
249
244
|
*/
|
|
250
245
|
isCreatureBlocking(tile: ITile): boolean;
|
|
251
246
|
setDelay(delay: number, replace?: boolean): this;
|
|
252
|
-
setPassTurn(turnType?:
|
|
247
|
+
setPassTurn(turnType?: TurnTypeFlag): this;
|
|
253
248
|
setUpdateView(updateFov?: boolean): this;
|
|
254
249
|
setUpdateRender(): this;
|
|
255
250
|
setUpdateTablesAndWeight(): this;
|
|
@@ -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;
|
|
@@ -101,7 +98,7 @@ export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequiremen
|
|
|
101
98
|
}
|
|
102
99
|
export declare type UsableActionIconReference = ActionType | UsableActionType | UsableActionTypePlaceholder | (Omit<IIcon, "path"> & {
|
|
103
100
|
action: ActionType | UsableActionType | UsableActionTypePlaceholder;
|
|
104
|
-
});
|
|
101
|
+
}) | IIcon;
|
|
105
102
|
export declare type ReturnableUsableActionUsability = IActionUsable | IActionNotUsable | boolean;
|
|
106
103
|
export interface IUsableActionUsable<REQUIREMENTS extends IUsableActionRequirements> extends IActionUsable {
|
|
107
104
|
using: IUsableActionUsing<REQUIREMENTS>;
|
|
@@ -142,7 +139,7 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
142
139
|
/**
|
|
143
140
|
* The icon this action should have, if any.
|
|
144
141
|
*/
|
|
145
|
-
icon?: UsableActionIconReference
|
|
142
|
+
icon?: SupplierOr<UsableActionIconReference, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>]>;
|
|
146
143
|
/**
|
|
147
144
|
* Where the icon should appear, when slotted with an item. Defaults to bottom right.
|
|
148
145
|
*
|
|
@@ -151,10 +148,6 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
151
148
|
* because it's repairing this tool.
|
|
152
149
|
*/
|
|
153
150
|
iconLocationOnItem?: ItemDetailIconLocation;
|
|
154
|
-
/**
|
|
155
|
-
* The tooltip this action should have, or an initialiser for it.
|
|
156
|
-
*/
|
|
157
|
-
tooltip?: ActionType | ((tooltip: Tooltip) => any);
|
|
158
151
|
/**
|
|
159
152
|
* A handler for what this action will highlight when hovered with the mouse.
|
|
160
153
|
* @param selectors The default selectors. The defaults can be removed, and/or additional selectors can be added.
|
|
@@ -174,11 +167,14 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
174
167
|
*/
|
|
175
168
|
displayLevel?: ActionDisplayLevel;
|
|
176
169
|
/**
|
|
177
|
-
*
|
|
170
|
+
* Controls the display order of this action compared to other actions.
|
|
178
171
|
* Generally you want to leave this as 0 (default) and just register your action in the correct place.
|
|
179
|
-
*
|
|
172
|
+
* Priority can be generated dynamically based on the given objects — item, doodad, etc.
|
|
173
|
+
*
|
|
174
|
+
* Higher priority === appears first.
|
|
175
|
+
* Lower priority === appears last.
|
|
180
176
|
*/
|
|
181
|
-
|
|
177
|
+
priority?: number | ((using: IUsableActionPossibleUsing) => number | undefined);
|
|
182
178
|
/**
|
|
183
179
|
* Whether this action is currently usable — even if an action "makes sense" with the player and the objects they're using,
|
|
184
180
|
* and the player can slot it and stuff, it might not currently be usable. For example, "harvest" having nothing to harvest.
|
|
@@ -261,14 +257,10 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
261
257
|
getDoodad(player: Player, provided?: IUsableActionPossibleUsing): false | Doodad | undefined;
|
|
262
258
|
getCreature(player: Player, provided?: IUsableActionPossibleUsing): false | Creature | undefined;
|
|
263
259
|
getNPC(player: Player, provided?: IUsableActionPossibleUsing): false | NPC | undefined;
|
|
264
|
-
getIcon():
|
|
265
|
-
path: ImagePath<PathType.Action>;
|
|
266
|
-
width: number;
|
|
267
|
-
height: number;
|
|
268
|
-
} | undefined;
|
|
260
|
+
getIcon(provided: IUsableActionPossibleUsing): IIcon | undefined;
|
|
269
261
|
getHighlightSelectors(using?: IUsableActionPossibleUsing): HighlightSelector[];
|
|
270
262
|
private translator?;
|
|
271
|
-
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation):
|
|
263
|
+
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation): Translation | undefined;
|
|
272
264
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
273
265
|
}
|
|
274
266
|
export declare class UsableActionTranslator {
|
|
@@ -276,9 +268,9 @@ export declare class UsableActionTranslator {
|
|
|
276
268
|
private nameSupplier?;
|
|
277
269
|
private descriptionSupplier?;
|
|
278
270
|
constructor(id: ActionId);
|
|
279
|
-
name(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
280
|
-
description(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
281
|
-
get(using?: IUsableActionPossibleUsing, which?: ActionTranslation):
|
|
271
|
+
name(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
272
|
+
description(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
273
|
+
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionTranslation): Translation | undefined;
|
|
282
274
|
}
|
|
283
275
|
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
284
276
|
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;
|
|
@@ -13,11 +13,12 @@ import type Player from "game/entity/player/Player";
|
|
|
13
13
|
declare namespace IUsableActionsDoodad {
|
|
14
14
|
function getFacing(player: Player, filter?: (doodad: Doodad) => any): Doodad | undefined;
|
|
15
15
|
function getUnder(player: Player, filter?: (doodad: Doodad) => any): Doodad | undefined;
|
|
16
|
+
function getUnderOrFacing(player: Player, filter?: (doodad: Doodad) => any): Doodad | undefined;
|
|
16
17
|
function validate(player: Player, doodad: Doodad | undefined): doodad is Doodad;
|
|
17
18
|
const requireFacing: (filter?: ((doodad: Doodad) => any) | undefined) => {
|
|
18
19
|
find: (player: Player) => Doodad | undefined;
|
|
19
20
|
};
|
|
20
|
-
const
|
|
21
|
+
const requireUnderOrFacing: (filter?: ((doodad: Doodad) => any) | undefined) => {
|
|
21
22
|
find: (player: Player) => Doodad | undefined;
|
|
22
23
|
};
|
|
23
24
|
}
|