@wayward/types 2.12.0-beta.dev.20220821.1 → 2.12.0-beta.dev.20220824.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/event/EventBuses.d.ts +7 -1
- package/definitions/game/game/entity/IHuman.d.ts +8 -2
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +3 -1
- package/definitions/game/game/entity/action/IAction.d.ts +3 -1
- package/definitions/game/game/entity/action/actions/PackGround.d.ts +12 -0
- package/definitions/game/game/entity/action/actions/Read.d.ts +2 -1
- package/definitions/game/game/entity/action/actions/Till.d.ts +1 -14
- package/definitions/game/game/entity/action/actions/ToggleTilled.d.ts +25 -0
- package/definitions/game/{ui/screen/screens/game/static/actions → game/entity/action/usable}/ConfirmAction.d.ts +2 -1
- package/definitions/game/game/entity/action/usable/UsableAction.d.ts +193 -0
- package/definitions/game/game/entity/action/usable/UsableActionRegistrar.d.ts +84 -0
- package/definitions/game/{ui/screen/screens/game/static/actions/UiActionType.d.ts → game/entity/action/usable/UsableActionType.d.ts} +2 -2
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/UiActionRename.d.ts → game/entity/action/usable/actions/UsableActionRename.d.ts} +4 -3
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/UiActionsActionBar.d.ts → game/entity/action/usable/actions/UsableActionsActionBar.d.ts} +0 -0
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/UiActionsMain.d.ts → game/entity/action/usable/actions/UsableActionsContainer.d.ts} +2 -2
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/UiActionsWithHands.d.ts → game/entity/action/usable/actions/UsableActionsCreatures.d.ts} +2 -2
- package/definitions/game/game/entity/action/usable/actions/UsableActionsDynamic.d.ts +33 -0
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/UiActionsCreatures.d.ts → game/entity/action/usable/actions/UsableActionsMain.d.ts} +2 -2
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/doodad/UiActionCloseContainer.d.ts → game/entity/action/usable/actions/UsableActionsRest.d.ts} +2 -2
- package/definitions/game/game/entity/action/usable/actions/UsableActionsTill.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/UsableActionsUseNPC.d.ts +18 -0
- package/definitions/game/game/entity/action/usable/actions/UsableActionsWithHands.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/UsableActionsWorld.d.ts +25 -0
- package/definitions/game/{ui/screen/screens/game/static/actions/actions/doodad/IUiActionsDoodad.d.ts → game/entity/action/usable/actions/doodad/IUsableActionsDoodad.d.ts} +8 -7
- package/definitions/game/game/entity/action/usable/actions/doodad/UsableActionsDoodads.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/doodad/UsableActionsDoor.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/doodad/UsableActionsUseDoodad.d.ts +18 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionCraft.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsEquip.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsItemDrop.d.ts +14 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsItemMove.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsItemPickUp.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsProtect.d.ts +13 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsUseItem.d.ts +29 -0
- package/definitions/game/game/entity/action/usable/actions/item/UsableActionsXWithY.d.ts +13 -0
- package/definitions/game/game/entity/npc/NPC.d.ts +1 -1
- package/definitions/game/game/entity/player/Player.d.ts +1 -0
- package/definitions/game/game/inspection/infoProviders/item/ItemDetails.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/stat/AttackInfo.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/ActionInspection.d.ts +3 -3
- package/definitions/game/game/inspection/inspections/CorpseInspection.d.ts +1 -1
- package/definitions/game/game/item/IItem.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +6 -0
- package/definitions/game/language/Dictionary.d.ts +1 -1
- package/definitions/game/language/DictionaryMap.d.ts +3 -3
- package/definitions/game/language/dictionary/Message.d.ts +854 -852
- package/definitions/game/language/dictionary/Misc.d.ts +1 -1
- package/definitions/game/language/dictionary/UiTranslation.d.ts +588 -585
- package/definitions/game/language/english/ui/{UiActionTypes.d.ts → UsableActionTypes.d.ts} +2 -2
- package/definitions/game/multiplayer/Multiplayer.d.ts +5 -0
- package/definitions/game/ui/component/ContextMenu.d.ts +1 -0
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +7 -3
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +11 -6
- package/definitions/game/ui/screen/screens/game/static/actions/ActionsDrawer.d.ts +15 -2
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +5 -4
- package/definitions/game/ui/util/IHighlight.d.ts +2 -1
- package/definitions/game/ui/util/ScaleManager.d.ts +2 -0
- package/definitions/hosts/shared/globalTypes.d.ts +1 -0
- package/package.json +1 -1
- package/definitions/game/ui/screen/screens/game/static/actions/UiAction.d.ts +0 -183
- package/definitions/game/ui/screen/screens/game/static/actions/UiActionRegistrar.d.ts +0 -84
- package/definitions/game/ui/screen/screens/game/static/actions/actions/UiActionsDynamic.d.ts +0 -31
- package/definitions/game/ui/screen/screens/game/static/actions/actions/UiActionsUseNPC.d.ts +0 -18
- package/definitions/game/ui/screen/screens/game/static/actions/actions/UiActionsWorld.d.ts +0 -25
- package/definitions/game/ui/screen/screens/game/static/actions/actions/doodad/UiActionsDoodads.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/doodad/UiActionsDoor.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/doodad/UiActionsUseDoodad.d.ts +0 -18
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionCraft.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsEquip.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsItemDrop.d.ts +0 -14
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsItemMove.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsItemPickUp.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsProtect.d.ts +0 -13
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsUseItem.d.ts +0 -22
- package/definitions/game/ui/screen/screens/game/static/actions/actions/item/UiActionsXWithY.d.ts +0 -13
|
@@ -37,6 +37,8 @@ import type Multiplayer from "multiplayer/Multiplayer";
|
|
|
37
37
|
import type WorldRenderer from "renderer/world/WorldRenderer";
|
|
38
38
|
import type SaveManager from "save/SaveManager";
|
|
39
39
|
import type Steamworks from "steamworks/Steamworks";
|
|
40
|
+
import type ActionBar from "ui/screen/screens/game/static/ActionBar";
|
|
41
|
+
import type MovementHandler from "ui/screen/screens/game/util/movement/MovementHandler";
|
|
40
42
|
export declare enum EventBus {
|
|
41
43
|
Actions = 0,
|
|
42
44
|
Audio = 1,
|
|
@@ -69,7 +71,9 @@ export declare enum EventBus {
|
|
|
69
71
|
TileEventManager = 28,
|
|
70
72
|
TileEvents = 29,
|
|
71
73
|
Ui = 30,
|
|
72
|
-
|
|
74
|
+
UiActionBar = 31,
|
|
75
|
+
UiMovementHandler = 32,
|
|
76
|
+
WorldRenderer = 33
|
|
73
77
|
}
|
|
74
78
|
declare const eventBuses: {
|
|
75
79
|
[EventBus.Actions](): typeof ActionExecutor;
|
|
@@ -103,6 +107,8 @@ declare const eventBuses: {
|
|
|
103
107
|
[EventBus.TileEventManager](): typeof TileEventManager;
|
|
104
108
|
[EventBus.TileEvents](): typeof TileEvent;
|
|
105
109
|
[EventBus.Ui](): typeof ui;
|
|
110
|
+
[EventBus.UiActionBar](): typeof ActionBar;
|
|
111
|
+
[EventBus.UiMovementHandler](): typeof MovementHandler;
|
|
106
112
|
[EventBus.WorldRenderer](): typeof WorldRenderer;
|
|
107
113
|
};
|
|
108
114
|
export default eventBuses;
|
|
@@ -139,11 +139,17 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
|
139
139
|
*/
|
|
140
140
|
getMaxWeight(maxWeight: number): number;
|
|
141
141
|
/**
|
|
142
|
-
* Called when input is being processed
|
|
142
|
+
* Called when input is being processed on the server
|
|
143
143
|
* @param player The player object
|
|
144
144
|
* @returns False to prevent input processing or undefined to use the default logic
|
|
145
145
|
*/
|
|
146
|
-
processInput():
|
|
146
|
+
processInput(): false | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* Called when movement is attempted on the server
|
|
149
|
+
* @param player The player object
|
|
150
|
+
* @returns False to prevent movement or undefined to use the default logic
|
|
151
|
+
*/
|
|
152
|
+
canMove(): false | undefined;
|
|
147
153
|
/**
|
|
148
154
|
* Called when getting the players movement intent
|
|
149
155
|
* @returns The movement intent of the player or undefined to use the default logic
|
|
@@ -123,7 +123,9 @@ export declare const actionDescriptionsSlow: {
|
|
|
123
123
|
33: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
124
124
|
82: 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/TestDepth").ITestDepthCanUse, [(import("../../item/Item").default | undefined)?]>;
|
|
125
125
|
2: import("./Action").Action<[[import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.AttackType, import("game/entity/action/IAction").ActionArgument.Undefined], [import("game/entity/action/IAction").ActionArgument.ItemInventory, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../Human").default, void, import("game/entity/action/actions/Attack").IAttackCanUse, [(import("../../item/Item").default | undefined)?, (import("../IEntity").AttackType | undefined)?, (import("../../item/Item").default | undefined)?]>;
|
|
126
|
-
|
|
126
|
+
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)?]>;
|
|
127
|
+
67: 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)?]>;
|
|
128
|
+
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)?]>;
|
|
127
129
|
104: 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)?]>;
|
|
128
130
|
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)?]>;
|
|
129
131
|
101: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
declare const _default: 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)?]>;
|
|
12
|
+
export default _default;
|
|
@@ -12,10 +12,11 @@ import { Action } from "game/entity/action/Action";
|
|
|
12
12
|
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
13
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
14
|
import { BookType } from "game/item/IItem";
|
|
15
|
+
import type Item from "game/item/Item";
|
|
15
16
|
import type TranslationImpl from "language/impl/TranslationImpl";
|
|
16
17
|
export interface IReadCanUse extends IActionUsable {
|
|
17
18
|
book: BookType;
|
|
18
19
|
basicBookName: TranslationImpl;
|
|
19
20
|
}
|
|
20
|
-
declare const _default: Action<[ActionArgument.ItemNearby], import("../../Human").default, void, IReadCanUse, [
|
|
21
|
+
declare const _default: Action<[ActionArgument.ItemNearby], import("../../Human").default, void, IReadCanUse, [Item]>;
|
|
21
22
|
export default _default;
|
|
@@ -8,18 +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
|
-
|
|
12
|
-
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
|
-
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
|
-
import type { ITerrainDescription, ITile, TerrainType } from "game/tile/ITerrain";
|
|
15
|
-
export interface ITillCanUse extends IActionUsable {
|
|
16
|
-
tile: ITile;
|
|
17
|
-
isGrass: boolean;
|
|
18
|
-
tileType: TerrainType;
|
|
19
|
-
terrainDescription: ITerrainDescription;
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
z: number;
|
|
23
|
-
}
|
|
24
|
-
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default, void, ITillCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
11
|
+
declare const _default: 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)?]>;
|
|
25
12
|
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { Action } from "game/entity/action/Action";
|
|
12
|
+
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
|
+
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
|
+
import type { ITerrainDescription, ITile, TerrainType } from "game/tile/ITerrain";
|
|
15
|
+
export interface ITillCanUse extends IActionUsable {
|
|
16
|
+
tile: ITile;
|
|
17
|
+
isGrass: boolean;
|
|
18
|
+
tileType: TerrainType;
|
|
19
|
+
terrainDescription: ITerrainDescription;
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
z: number;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: Action<[[ActionArgument.ItemInventory, ActionArgument.Undefined]], import("../../Human").default, void, ITillCanUse, [(import("../../../item/Item").default | undefined)?]>;
|
|
25
|
+
export default _default;
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import { ActionType } from "game/entity/action/IAction";
|
|
12
|
-
|
|
12
|
+
import type Player from "game/entity/player/Player";
|
|
13
|
+
export default function (player: Player, actionType: ActionType, actionArgs: any[]): Promise<boolean>;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import type Doodad from "game/doodad/Doodad";
|
|
12
|
+
import type { ActionDisplayLevel, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
|
|
13
|
+
import { ActionType } from "game/entity/action/IAction";
|
|
14
|
+
import type UsableActionRegistrar from "game/entity/action/usable/UsableActionRegistrar";
|
|
15
|
+
import type { UsableActionTypePlaceholder } from "game/entity/action/usable/UsableActionType";
|
|
16
|
+
import { UsableActionType } from "game/entity/action/usable/UsableActionType";
|
|
17
|
+
import type Creature from "game/entity/creature/Creature";
|
|
18
|
+
import type NPC from "game/entity/npc/NPC";
|
|
19
|
+
import type Player from "game/entity/player/Player";
|
|
20
|
+
import type { IIcon } from "game/inspection/InfoProvider";
|
|
21
|
+
import type { ItemType } from "game/item/IItem";
|
|
22
|
+
import type { IGetBestItemsOptions } from "game/item/IItemManager";
|
|
23
|
+
import type Item from "game/item/Item";
|
|
24
|
+
import type Message from "language/dictionary/Message";
|
|
25
|
+
import { ActionTranslation } from "language/dictionary/Misc";
|
|
26
|
+
import TranslationImpl from "language/impl/TranslationImpl";
|
|
27
|
+
import Translation from "language/Translation";
|
|
28
|
+
import { PathType } from "resource/IResourceLoader";
|
|
29
|
+
import type Bindable from "ui/input/Bindable";
|
|
30
|
+
import type { ItemDetailIconLocation } from "ui/screen/screens/game/component/Item";
|
|
31
|
+
import type Tooltip from "ui/tooltip/Tooltip";
|
|
32
|
+
import type { HighlightSelector } from "ui/util/IHighlight";
|
|
33
|
+
import ImagePath from "ui/util/ImagePath";
|
|
34
|
+
export interface IUsableActionRequirement<TYPE> {
|
|
35
|
+
allowNone?: true;
|
|
36
|
+
validate?(player: Player, value: TYPE): boolean;
|
|
37
|
+
find?(player: Player): TYPE | undefined;
|
|
38
|
+
getMissingName?(): Translation;
|
|
39
|
+
}
|
|
40
|
+
export declare namespace IUsableActionRequirement {
|
|
41
|
+
interface Maybe<TYPE> {
|
|
42
|
+
allowNone: true;
|
|
43
|
+
validate(player: Player, value: TYPE): boolean;
|
|
44
|
+
}
|
|
45
|
+
type Always = true;
|
|
46
|
+
}
|
|
47
|
+
export interface IUsableActionRequirements {
|
|
48
|
+
item?: true | IUsableActionRequirement<Item>;
|
|
49
|
+
doodad?: true | IUsableActionRequirement<Doodad>;
|
|
50
|
+
creature?: true | IUsableActionRequirement<Creature>;
|
|
51
|
+
npc?: true | IUsableActionRequirement<NPC>;
|
|
52
|
+
}
|
|
53
|
+
export interface IUsableActionPossibleUsing {
|
|
54
|
+
item?: Item;
|
|
55
|
+
itemType?: ItemType;
|
|
56
|
+
doodad?: Doodad;
|
|
57
|
+
creature?: Creature;
|
|
58
|
+
npc?: NPC;
|
|
59
|
+
}
|
|
60
|
+
export interface IUsableActionUsing<REQUIREMENTS extends IUsableActionRequirements> {
|
|
61
|
+
item: ((REQUIREMENTS["item"] extends true ? Item : never) | (undefined extends REQUIREMENTS["item"] ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
62
|
+
allowNone: true;
|
|
63
|
+
} ? undefined : never) | (REQUIREMENTS["item"] extends {
|
|
64
|
+
validate(player: Player, value: Item): boolean;
|
|
65
|
+
} ? Item : never) | (REQUIREMENTS["item"] extends {
|
|
66
|
+
find(player: Player): Item;
|
|
67
|
+
} ? Item : never));
|
|
68
|
+
doodad: ((REQUIREMENTS["doodad"] extends true ? Doodad : never) | (undefined extends REQUIREMENTS["doodad"] ? undefined : never) | (REQUIREMENTS["doodad"] extends {
|
|
69
|
+
allowNone: true;
|
|
70
|
+
} ? undefined : never) | (REQUIREMENTS["doodad"] extends {
|
|
71
|
+
validate(player: Player, value: Doodad): boolean;
|
|
72
|
+
} ? Doodad : never) | (REQUIREMENTS["doodad"] extends {
|
|
73
|
+
find(player: Player): Doodad;
|
|
74
|
+
} ? Doodad : never));
|
|
75
|
+
creature: ((REQUIREMENTS["creature"] extends true ? Creature : never) | (undefined extends REQUIREMENTS["creature"] ? undefined : never) | (REQUIREMENTS["creature"] extends {
|
|
76
|
+
allowNone: true;
|
|
77
|
+
} ? undefined : never) | (REQUIREMENTS["creature"] extends {
|
|
78
|
+
validate(player: Player, value: Creature): boolean;
|
|
79
|
+
} ? Creature : never) | (REQUIREMENTS["creature"] extends {
|
|
80
|
+
find(player: Player): Creature;
|
|
81
|
+
} ? Creature : never));
|
|
82
|
+
npc: ((REQUIREMENTS["npc"] extends true ? NPC : never) | (undefined extends REQUIREMENTS["npc"] ? undefined : never) | (REQUIREMENTS["npc"] extends {
|
|
83
|
+
allowNone: true;
|
|
84
|
+
} ? undefined : never) | (REQUIREMENTS["npc"] extends {
|
|
85
|
+
validate(player: Player, value: NPC): boolean;
|
|
86
|
+
} ? NPC : never) | (REQUIREMENTS["npc"] extends {
|
|
87
|
+
find(player: Player): NPC;
|
|
88
|
+
} ? NPC : never));
|
|
89
|
+
}
|
|
90
|
+
export declare type UsableActionIconReference = ActionType | UsableActionType | UsableActionTypePlaceholder | (Omit<IIcon, "path"> & {
|
|
91
|
+
action: ActionType | UsableActionType | UsableActionTypePlaceholder;
|
|
92
|
+
});
|
|
93
|
+
export declare type ReturnableUsableActionUsability = IActionUsable | IActionNotUsable | boolean;
|
|
94
|
+
export interface IUsableActionUsable<REQUIREMENTS extends IUsableActionRequirements> extends IActionUsable {
|
|
95
|
+
using: IUsableActionUsing<REQUIREMENTS>;
|
|
96
|
+
}
|
|
97
|
+
export interface IUsableActionNotUsable extends IActionNotUsable {
|
|
98
|
+
sendMessage(): void;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace IUsableActionNotUsable {
|
|
101
|
+
function create(message?: Message, ...args: any[]): IUsableActionNotUsable;
|
|
102
|
+
function sendMessage(notUsable: IActionNotUsable): void;
|
|
103
|
+
function equals(a: IUsableActionNotUsable, b: IUsableActionNotUsable): boolean;
|
|
104
|
+
}
|
|
105
|
+
export declare type UsableActionUsability<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> = IUsableActionUsable<REQUIREMENTS> | IUsableActionNotUsable;
|
|
106
|
+
export declare enum UsableActionExecutionContext {
|
|
107
|
+
ContextMenu = 0,
|
|
108
|
+
ActionBar = 1
|
|
109
|
+
}
|
|
110
|
+
export interface IUsableActionExecutionContext {
|
|
111
|
+
context: UsableActionExecutionContext;
|
|
112
|
+
getItemContainerFilterText(): string | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> {
|
|
115
|
+
id?: string | number;
|
|
116
|
+
slottable?: boolean;
|
|
117
|
+
isApplicable?(player: Player, using: IUsableActionPossibleUsing): boolean;
|
|
118
|
+
translate?: (translator: UsableActionTranslator) => UsableActionTranslator;
|
|
119
|
+
icon?: UsableActionIconReference;
|
|
120
|
+
iconLocationOnItem?: ItemDetailIconLocation;
|
|
121
|
+
tooltip?: ActionType | ((tooltip: Tooltip) => any);
|
|
122
|
+
highlight?(selectors: HighlightSelector[], using: IUsableActionPossibleUsing): any;
|
|
123
|
+
bindable?: Bindable | ((using: IUsableActionUsing<REQUIREMENTS>) => Bindable | undefined);
|
|
124
|
+
submenu?(registrar: UsableActionRegistrar, using: IUsableActionUsing<REQUIREMENTS>): UsableActionRegistrar | void;
|
|
125
|
+
execute?(player: Player, using: IUsableActionUsing<REQUIREMENTS>, context: IUsableActionExecutionContext): any;
|
|
126
|
+
isUsable?(player: Player, using: IUsableActionUsing<REQUIREMENTS>): ReturnableUsableActionUsability;
|
|
127
|
+
displayLevel?: ActionDisplayLevel;
|
|
128
|
+
order?: number | ((using: IUsableActionPossibleUsing) => number | undefined);
|
|
129
|
+
}
|
|
130
|
+
export interface IUsableActionDefinitionSubmenu<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> extends IUsableActionDefinitionBase<REQUIREMENTS> {
|
|
131
|
+
submenu(registrar: UsableActionRegistrar, using: IUsableActionUsing<REQUIREMENTS>): UsableActionRegistrar | void;
|
|
132
|
+
execute?: undefined;
|
|
133
|
+
isUsable?(player: Player, using: IUsableActionUsing<REQUIREMENTS>): ReturnableUsableActionUsability;
|
|
134
|
+
slottable?: undefined;
|
|
135
|
+
}
|
|
136
|
+
export interface IUsableActionDefinitionExecutable<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> extends IUsableActionDefinitionBase<REQUIREMENTS> {
|
|
137
|
+
slottable?: boolean;
|
|
138
|
+
submenu?: undefined;
|
|
139
|
+
execute(player: Player, using: IUsableActionUsing<REQUIREMENTS>, context: IUsableActionExecutionContext): any;
|
|
140
|
+
isUsable?(player: Player, using: IUsableActionUsing<REQUIREMENTS>): ReturnableUsableActionUsability;
|
|
141
|
+
}
|
|
142
|
+
export declare type IUsableActionDefinition<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements> = IUsableActionDefinitionSubmenu<REQUIREMENTS> | IUsableActionDefinitionExecutable<REQUIREMENTS>;
|
|
143
|
+
export declare type ActionId = string | ActionType | UsableActionType;
|
|
144
|
+
declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsableActionRequirements, DEFINITION extends IUsableActionDefinition<REQUIREMENTS> = IUsableActionDefinition<REQUIREMENTS>> {
|
|
145
|
+
readonly requirements: REQUIREMENTS;
|
|
146
|
+
readonly definition: DEFINITION;
|
|
147
|
+
id: ActionId;
|
|
148
|
+
constructor(requirements: REQUIREMENTS, definition: DEFINITION);
|
|
149
|
+
isExecutable(): this is UsableAction<REQUIREMENTS, IUsableActionDefinitionExecutable<REQUIREMENTS>>;
|
|
150
|
+
execute(player: Player, provided: IUsableActionUsing<REQUIREMENTS>, context: IUsableActionExecutionContext): boolean;
|
|
151
|
+
private resolveUsing;
|
|
152
|
+
isUsable(player: Player, provided: IUsableActionUsing<REQUIREMENTS>): UsableActionUsability<REQUIREMENTS>;
|
|
153
|
+
isApplicable(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): provided is IUsableActionUsing<REQUIREMENTS>;
|
|
154
|
+
private isItemApplicable;
|
|
155
|
+
private isDoodadApplicable;
|
|
156
|
+
private isCreatureApplicable;
|
|
157
|
+
private isNPCApplicable;
|
|
158
|
+
private readonly findItemCannotUse;
|
|
159
|
+
getFindItemCannotUse(): IUsableActionNotUsable[];
|
|
160
|
+
getItem(player: Player, provided?: IUsableActionPossibleUsing, fullUsabilityCheck?: boolean): Item | false | undefined;
|
|
161
|
+
private getItemByType;
|
|
162
|
+
getDoodad(player: Player, provided?: IUsableActionPossibleUsing): false | Doodad | undefined;
|
|
163
|
+
getCreature(player: Player, provided?: IUsableActionPossibleUsing): false | Creature | undefined;
|
|
164
|
+
getNPC(player: Player, provided?: IUsableActionPossibleUsing): false | NPC | undefined;
|
|
165
|
+
getIcon(): {
|
|
166
|
+
path: ImagePath<PathType.Action>;
|
|
167
|
+
width: number;
|
|
168
|
+
height: number;
|
|
169
|
+
} | undefined;
|
|
170
|
+
getHighlightSelectors(using?: IUsableActionPossibleUsing): HighlightSelector[];
|
|
171
|
+
private translator?;
|
|
172
|
+
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation): TranslationImpl | undefined;
|
|
173
|
+
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
174
|
+
}
|
|
175
|
+
export declare class UsableActionTranslator {
|
|
176
|
+
readonly id: ActionId;
|
|
177
|
+
private nameSupplier?;
|
|
178
|
+
private descriptionSupplier?;
|
|
179
|
+
constructor(id: ActionId);
|
|
180
|
+
name(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
181
|
+
description(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
182
|
+
get(using?: IUsableActionPossibleUsing, which?: ActionTranslation): TranslationImpl | undefined;
|
|
183
|
+
}
|
|
184
|
+
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
185
|
+
create: <DEFINITION extends IUsableActionDefinition<REQUIREMENTS>>(action: DEFINITION) => UsableAction<REQUIREMENTS, DEFINITION>;
|
|
186
|
+
}
|
|
187
|
+
declare namespace UsableAction {
|
|
188
|
+
function requiring<REQUIREMENTS1 extends IUsableActionRequirements>(requirements: REQUIREMENTS1): IUsableActionFactory<REQUIREMENTS1>;
|
|
189
|
+
function create<DEFINITION extends IUsableActionDefinition<{}>>(action: DEFINITION): UsableAction<{}, DEFINITION>;
|
|
190
|
+
function translateId(id: ActionId, which?: ActionTranslation): TranslationImpl | undefined;
|
|
191
|
+
function getBestSafeItemInInventory(player: Player, options?: Partial<IGetBestItemsOptions>): Item | undefined;
|
|
192
|
+
}
|
|
193
|
+
export default UsableAction;
|
|
@@ -0,0 +1,84 @@
|
|
|
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 EventEmitter from "event/EventEmitter";
|
|
12
|
+
import type { EmitterOrBus, Event } from "event/EventManager";
|
|
13
|
+
import { ActionDisplayLevel } from "game/entity/action/IAction";
|
|
14
|
+
import type UsableAction from "game/entity/action/usable/UsableAction";
|
|
15
|
+
import type { ActionId, IUsableActionPossibleUsing, IUsableActionRequirements } from "game/entity/action/usable/UsableAction";
|
|
16
|
+
import ContextMenu from "ui/component/ContextMenu";
|
|
17
|
+
export default class UsableActionRegistrar {
|
|
18
|
+
readonly actions: Array<[string, UsableAction]>;
|
|
19
|
+
readonly actionIndices: Record<string, number>;
|
|
20
|
+
readonly actionIds: string[];
|
|
21
|
+
byId(id?: string): UsableAction | undefined;
|
|
22
|
+
filter(filter: (action: UsableAction, id: string) => any): UsableActionRegistrar;
|
|
23
|
+
private contextMenuInitializer?;
|
|
24
|
+
setContextMenuInitializer(initializer?: (menu: ContextMenu) => any): this;
|
|
25
|
+
add(registrar: UsableActionRegistrar): this;
|
|
26
|
+
add<REQUIREMENTS extends IUsableActionRequirements>(id: string | number, action: UsableAction<REQUIREMENTS>): this;
|
|
27
|
+
showContextMenu(provided: IUsableActionPossibleUsing, contextMenu?: ContextMenu<ActionId>, context?: ActionDisplayLevel, initialiser?: (contextMenu: ContextMenu<ActionId>) => any): ContextMenu<string | number | symbol>;
|
|
28
|
+
createContextMenu(provided: IUsableActionPossibleUsing, contextMenu?: ContextMenu<ActionId>, context?: ActionDisplayLevel, initialiser?: (contextMenu: ContextMenu<ActionId>) => any): ContextMenu;
|
|
29
|
+
private getTooltipLocation;
|
|
30
|
+
}
|
|
31
|
+
export interface IUsableActionGeneratorEvents {
|
|
32
|
+
stopPersisting(): any;
|
|
33
|
+
}
|
|
34
|
+
export interface IUsableActionGeneratorPersistenceFactory<HOST> {
|
|
35
|
+
when<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K): {
|
|
36
|
+
until<E extends EmitterOrBus, K extends Event<E>>(emitter: E, event: K): HOST;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export declare type UsableActionGeneratorRegistrationHandler<ARGS extends any[]> = (registrar: UsableActionRegistrar, ...args: ARGS) => any;
|
|
40
|
+
export interface IUsableActionGeneratorFactory {
|
|
41
|
+
create<ARGS extends any[]>(id: string, registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>): UsableActionGenerator<ARGS>;
|
|
42
|
+
create<ARGS extends any[]>(registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>): UsableActionGenerator<ARGS>;
|
|
43
|
+
}
|
|
44
|
+
export declare class UsableActionGenerator<ARGS extends any[] = []> extends EventEmitter.Host<IUsableActionGeneratorEvents> {
|
|
45
|
+
static persisting(initializer: (persist: IUsableActionGeneratorPersistenceFactory<IUsableActionGeneratorFactory>) => IUsableActionGeneratorFactory): IUsableActionGeneratorFactory;
|
|
46
|
+
static persisting(initializer: (persist: IUsableActionGeneratorPersistenceFactory<IUsableActionGeneratorFactory>) => UsableActionGenerator): UsableActionGenerator;
|
|
47
|
+
static singleton<REQUIREMENTS extends IUsableActionRequirements>(id: string | number, action: UsableAction<REQUIREMENTS>): UsableActionGenerator<[]>;
|
|
48
|
+
private readonly id?;
|
|
49
|
+
private readonly registrationHandler;
|
|
50
|
+
private get log();
|
|
51
|
+
constructor(id: string, registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>);
|
|
52
|
+
constructor(registrationHandler: UsableActionGeneratorRegistrationHandler<ARGS>);
|
|
53
|
+
register(registrar: UsableActionRegistrar, ...args: ARGS): void;
|
|
54
|
+
private contextMenuInitializer?;
|
|
55
|
+
/**
|
|
56
|
+
* Initializes any context menus originating from registrars generated by this generator.
|
|
57
|
+
* Note: Overrides any initializers set by default on the registration handler.
|
|
58
|
+
*/
|
|
59
|
+
setContextMenuInitializer(initializer?: (menu: ContextMenu) => any): this;
|
|
60
|
+
private cachedRegistrar;
|
|
61
|
+
/**
|
|
62
|
+
* Returns an action registrar created by this generator. If there is not a cached registrar, generates a new one.
|
|
63
|
+
* Does not cache the generator unless this generator is marked for persistence.
|
|
64
|
+
*/
|
|
65
|
+
get(...args: ARGS): UsableActionRegistrar;
|
|
66
|
+
/**
|
|
67
|
+
* Forcibly regenerates and returns a new action registrar from this generator.
|
|
68
|
+
* If this generator is marked for persistence, the generated registrar will be cached and accessible thereafter by `get()`.
|
|
69
|
+
*/
|
|
70
|
+
generate(...args: ARGS): UsableActionRegistrar;
|
|
71
|
+
private activePersistences;
|
|
72
|
+
/**
|
|
73
|
+
* Marks this generator for persistence when the "when" event occurs,
|
|
74
|
+
* and unmarks this generator for persistence when the "until" event occurs.
|
|
75
|
+
*
|
|
76
|
+
* This method can be called multiple times to add multiple ranges where persistence is active.
|
|
77
|
+
* Intersecting persistences don't cancel each other.
|
|
78
|
+
*/
|
|
79
|
+
persist(initializer: (persist: IUsableActionGeneratorPersistenceFactory<this>) => this): this;
|
|
80
|
+
/**
|
|
81
|
+
* Removes persistence from this generator. All prior "when" and "until" persistence ranges will be removed.
|
|
82
|
+
*/
|
|
83
|
+
disablePersistence(): void;
|
|
84
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
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
|
-
export declare enum
|
|
11
|
+
export declare enum UsableActionType {
|
|
12
12
|
Use = 1000000,
|
|
13
13
|
QuickSlotRemove = 1000001,
|
|
14
14
|
QuickSlotAdd = 1000002,
|
|
@@ -58,7 +58,7 @@ export declare enum UiActionType {
|
|
|
58
58
|
EquipMainHand = 1000046,
|
|
59
59
|
EquipOffHand = 1000047
|
|
60
60
|
}
|
|
61
|
-
export declare enum
|
|
61
|
+
export declare enum UsableActionTypePlaceholder {
|
|
62
62
|
TradeItem = 2000000,
|
|
63
63
|
MoveAllToInventory = 2000001,
|
|
64
64
|
MoveAllOfSameQualityToInventory = 2000002
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
import type Player from "game/entity/player/Player";
|
|
11
13
|
import type Item from "game/item/Item";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
declare const _default: UiActionGenerator<[]>;
|
|
14
|
+
export declare function requestRename(player: Player, item?: Item): void;
|
|
15
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
15
16
|
export default _default;
|
|
File without changes
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
declare const _default:
|
|
11
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
13
|
export default _default;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
declare const _default:
|
|
11
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
13
|
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import type { ActionDisplayLevel } from "game/entity/action/IAction";
|
|
12
|
+
import { ActionType } from "game/entity/action/IAction";
|
|
13
|
+
import type { IUsableActionPossibleUsing, IUsableActionRequirements, IUsableActionUsing, ReturnableUsableActionUsability, UsableActionIconReference } from "game/entity/action/usable/UsableAction";
|
|
14
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
15
|
+
import type Player from "game/entity/player/Player";
|
|
16
|
+
import type Bindable from "ui/input/Bindable";
|
|
17
|
+
export interface IUsableActionDynamicDefinition {
|
|
18
|
+
icon?: UsableActionIconReference;
|
|
19
|
+
bindable: Bindable;
|
|
20
|
+
displayLevel?: ActionDisplayLevel;
|
|
21
|
+
}
|
|
22
|
+
export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> {
|
|
23
|
+
id: string;
|
|
24
|
+
record: PartialRecord<ActionType, DEFINITION | false>;
|
|
25
|
+
getDynamic(actions: Set<ActionType>): any;
|
|
26
|
+
requirements?(action: ActionType, definition?: DEFINITION): REQUIREMENTS;
|
|
27
|
+
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>): ReturnableUsableActionUsability;
|
|
28
|
+
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>): any;
|
|
29
|
+
order?(action: ActionType, using: IUsableActionPossibleUsing): number | undefined;
|
|
30
|
+
}
|
|
31
|
+
export default class UsableActionsDynamic<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> extends UsableActionGenerator {
|
|
32
|
+
constructor(config: IUsableActionsDynamicConfig<DEFINITION, REQUIREMENTS>);
|
|
33
|
+
}
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
declare const _default:
|
|
11
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
13
|
export default _default;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
declare const _default:
|
|
11
|
+
import { UsableActionGenerator } from "game/entity/action/usable/UsableActionRegistrar";
|
|
12
|
+
declare const _default: UsableActionGenerator<[]>;
|
|
13
13
|
export default _default;
|
|
@@ -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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2011-2021 Unlok
|
|
3
|
+
* https://www.unlok.ca
|
|
4
|
+
*
|
|
5
|
+
* Credits & Thanks:
|
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
|
7
|
+
*
|
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
|
10
|
+
*/
|
|
11
|
+
import type { IUsableActionDynamicDefinition } from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
12
|
+
import UsableActionsDynamic from "game/entity/action/usable/actions/UsableActionsDynamic";
|
|
13
|
+
import type { IUsableActionRequirements } from "game/entity/action/usable/UsableAction";
|
|
14
|
+
export interface IUseNPCAction extends IUsableActionDynamicDefinition {
|
|
15
|
+
allowNoNPC?: true;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: UsableActionsDynamic<IUseNPCAction, IUsableActionRequirements>;
|
|
18
|
+
export default _default;
|
|
@@ -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;
|