@wayward/types 2.12.0-beta.dev.20220831.1 → 2.12.0-beta.dev.20220903.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/game/game/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 +6 -5
- 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 +6 -6
- package/definitions/game/game/entity/action/usable/UsableActionType.d.ts +3 -1
- package/definitions/game/game/entity/action/usable/actions/UsableActionsDynamic.d.ts +4 -3
- package/definitions/game/game/entity/action/usable/actions/UsableActionsMain.d.ts +27 -25
- 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/npc/NPC.d.ts +2 -1
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +12 -5
- package/definitions/game/game/entity/player/IPlayer.d.ts +8 -4
- package/definitions/game/game/inspection/infoProviders/Uses.d.ts +2 -1
- package/definitions/game/game/item/IItem.d.ts +24 -5
- package/definitions/game/game/item/Item.d.ts +2 -1
- package/definitions/game/game/item/ItemManager.d.ts +6 -1
- package/definitions/game/game/tile/ITerrain.d.ts +2 -1
- 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/functional/IFunctionalSortable.d.ts +1 -0
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -2
- package/definitions/game/ui/screen/screens/game/component/Item.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/static/ActionBar.d.ts +1 -0
- package/definitions/game/ui/screen/screens/menu/menus/LoadGameMenu.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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)?]>;
|
|
@@ -20,7 +20,7 @@ import type { EquipType, RestType, SkillType } from "game/entity/IHuman";
|
|
|
20
20
|
import type NPC from "game/entity/npc/NPC";
|
|
21
21
|
import type { MessageType } from "game/entity/player/IMessageManager";
|
|
22
22
|
import { Source } from "game/entity/player/IMessageManager";
|
|
23
|
-
import type {
|
|
23
|
+
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
24
24
|
import type Player from "game/entity/player/Player";
|
|
25
25
|
import type { Quality } from "game/IObject";
|
|
26
26
|
import type Island from "game/island/Island";
|
|
@@ -51,7 +51,7 @@ export declare enum ActionType {
|
|
|
51
51
|
Sleep = 11,
|
|
52
52
|
Heal = 12,
|
|
53
53
|
Dig = 13,
|
|
54
|
-
|
|
54
|
+
Ride = 14,
|
|
55
55
|
GatherLiquid = 15,
|
|
56
56
|
Cast = 16,
|
|
57
57
|
Lockpick = 17,
|
|
@@ -145,11 +145,12 @@ export declare enum ActionType {
|
|
|
145
145
|
UpdateOption = 105,
|
|
146
146
|
UpdateGameOption = 106,
|
|
147
147
|
UpdateWalkPath = 107,
|
|
148
|
-
|
|
148
|
+
Unused2 = 108,
|
|
149
149
|
Absorb = 109,
|
|
150
150
|
Exude = 110,
|
|
151
151
|
PackGround = 111,
|
|
152
|
-
ToggleTilled = 112
|
|
152
|
+
ToggleTilled = 112,
|
|
153
|
+
DismountVehicle = 113
|
|
153
154
|
}
|
|
154
155
|
export declare enum ActionUsability {
|
|
155
156
|
Paused = 0,
|
|
@@ -249,7 +250,7 @@ export interface IActionApi<E extends Entity = Entity, CU extends IActionUsable
|
|
|
249
250
|
*/
|
|
250
251
|
isCreatureBlocking(tile: ITile): boolean;
|
|
251
252
|
setDelay(delay: number, replace?: boolean): this;
|
|
252
|
-
setPassTurn(turnType?:
|
|
253
|
+
setPassTurn(turnType?: TurnTypeFlag): this;
|
|
253
254
|
setUpdateView(updateFov?: boolean): this;
|
|
254
255
|
setUpdateRender(): this;
|
|
255
256
|
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;
|
|
@@ -142,7 +142,7 @@ export interface IUsableActionDefinitionBase<REQUIREMENTS extends IUsableActionR
|
|
|
142
142
|
/**
|
|
143
143
|
* The icon this action should have, if any.
|
|
144
144
|
*/
|
|
145
|
-
icon?: UsableActionIconReference
|
|
145
|
+
icon?: SupplierOr<UsableActionIconReference, [using: IUsableActionPossibleUsing, action: UsableAction<REQUIREMENTS>]>;
|
|
146
146
|
/**
|
|
147
147
|
* Where the icon should appear, when slotted with an item. Defaults to bottom right.
|
|
148
148
|
*
|
|
@@ -261,14 +261,14 @@ declare class UsableAction<REQUIREMENTS extends IUsableActionRequirements = IUsa
|
|
|
261
261
|
getDoodad(player: Player, provided?: IUsableActionPossibleUsing): false | Doodad | undefined;
|
|
262
262
|
getCreature(player: Player, provided?: IUsableActionPossibleUsing): false | Creature | undefined;
|
|
263
263
|
getNPC(player: Player, provided?: IUsableActionPossibleUsing): false | NPC | undefined;
|
|
264
|
-
getIcon(): {
|
|
264
|
+
getIcon(provided: IUsableActionPossibleUsing): {
|
|
265
265
|
path: ImagePath<PathType.Action>;
|
|
266
266
|
width: number;
|
|
267
267
|
height: number;
|
|
268
268
|
} | undefined;
|
|
269
269
|
getHighlightSelectors(using?: IUsableActionPossibleUsing): HighlightSelector[];
|
|
270
270
|
private translator?;
|
|
271
|
-
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation):
|
|
271
|
+
getTranslation(using?: IUsableActionUsing<REQUIREMENTS>, which?: ActionTranslation): Translation | undefined;
|
|
272
272
|
getOrder(using?: IUsableActionPossibleUsing): number;
|
|
273
273
|
}
|
|
274
274
|
export declare class UsableActionTranslator {
|
|
@@ -276,9 +276,9 @@ export declare class UsableActionTranslator {
|
|
|
276
276
|
private nameSupplier?;
|
|
277
277
|
private descriptionSupplier?;
|
|
278
278
|
constructor(id: ActionId);
|
|
279
|
-
name(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
280
|
-
description(supplier: SupplierOr<Translation, [IUsableActionPossibleUsing]>): this;
|
|
281
|
-
get(using?: IUsableActionPossibleUsing, which?: ActionTranslation):
|
|
279
|
+
name(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
280
|
+
description(supplier: SupplierOr<Translation, [using: IUsableActionPossibleUsing, action: UsableAction]>): this;
|
|
281
|
+
get(action: UsableAction, using?: IUsableActionPossibleUsing, which?: ActionTranslation): Translation | undefined;
|
|
282
282
|
}
|
|
283
283
|
export interface IUsableActionFactory<REQUIREMENTS extends IUsableActionRequirements> {
|
|
284
284
|
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,15 +18,16 @@ export interface IUsableActionDynamicDefinition {
|
|
|
18
18
|
icon?: UsableActionIconReference;
|
|
19
19
|
bindable: Bindable;
|
|
20
20
|
displayLevel?: ActionDisplayLevel;
|
|
21
|
+
order?: number;
|
|
21
22
|
}
|
|
22
23
|
export interface IUsableActionsDynamicConfig<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> {
|
|
23
24
|
id: string;
|
|
24
25
|
record: PartialRecord<ActionType, DEFINITION | false>;
|
|
25
26
|
getDynamic(actions: Set<ActionType>): any;
|
|
26
27
|
requirements?(action: ActionType, definition?: DEFINITION): REQUIREMENTS;
|
|
27
|
-
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS
|
|
28
|
-
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS
|
|
29
|
-
order?(action: ActionType, using: IUsableActionPossibleUsing): number | undefined;
|
|
28
|
+
isUsable(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): ReturnableUsableActionUsability;
|
|
29
|
+
execute(action: ActionType, player: Player, using: IUsableActionUsing<REQUIREMENTS>, definition?: DEFINITION): any;
|
|
30
|
+
order?(action: ActionType, using: IUsableActionPossibleUsing, definition?: DEFINITION): number | undefined;
|
|
30
31
|
}
|
|
31
32
|
export default class UsableActionsDynamic<DEFINITION extends IUsableActionDynamicDefinition, REQUIREMENTS extends IUsableActionRequirements> extends UsableActionGenerator {
|
|
32
33
|
constructor(config: IUsableActionsDynamicConfig<DEFINITION, REQUIREMENTS>);
|
|
@@ -17,25 +17,26 @@ export declare enum UsableActionSet {
|
|
|
17
17
|
* Note that `order` 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
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { Events, IEventEmitter } from "event/EventEmitter";
|
|
12
12
|
import type { ActionType } from "game/entity/action/IAction";
|
|
13
13
|
import Human from "game/entity/Human";
|
|
14
|
-
import { AiType, EntityType, MoveType } from "game/entity/IEntity";
|
|
14
|
+
import { AiType, EntityType, MoveType, StatusType } from "game/entity/IEntity";
|
|
15
15
|
import type { ICustomizations } from "game/entity/IHuman";
|
|
16
16
|
import { EquipType } from "game/entity/IHuman";
|
|
17
17
|
import type { NPCType } from "game/entity/npc/INPCs";
|
|
@@ -63,6 +63,7 @@ export default abstract class NPC extends Human {
|
|
|
63
63
|
createMessageManager(): MessageManagerNoOp;
|
|
64
64
|
createQuestManager(): QuestManagerNoOp;
|
|
65
65
|
addMilestone(): void;
|
|
66
|
+
protected getApplicableStatusEffects(): Set<StatusType>;
|
|
66
67
|
/**
|
|
67
68
|
* Creates inventory, equips items, and scales stats
|
|
68
69
|
*/
|
|
@@ -16,15 +16,16 @@ import NPC from "game/entity/npc/NPC";
|
|
|
16
16
|
import type Player from "game/entity/player/Player";
|
|
17
17
|
import { ItemType } from "game/item/IItem";
|
|
18
18
|
import type Item from "game/item/Item";
|
|
19
|
+
export interface IMerchantBuyPrice {
|
|
20
|
+
base: number;
|
|
21
|
+
bonus: number;
|
|
22
|
+
total: number;
|
|
23
|
+
}
|
|
19
24
|
export default class MerchantNPC extends NPC {
|
|
20
25
|
constructor(id?: number, islandId?: `${number},${number}`, x?: number, y?: number, z?: number);
|
|
21
26
|
getActions(): ActionType[] | undefined;
|
|
22
27
|
getSellPrice(player: Player, item: Item): number | undefined;
|
|
23
|
-
getBuyPrice(player: Player, item: Item):
|
|
24
|
-
base: number;
|
|
25
|
-
bonus: number;
|
|
26
|
-
total: number;
|
|
27
|
-
} | undefined;
|
|
28
|
+
getBuyPrice(player: Player, item: Item): IMerchantBuyPrice | undefined;
|
|
28
29
|
protected getReputationChangeOnDeath(): number;
|
|
29
30
|
protected getDefaultName(): import("../../../../language/impl/TranslationImpl").default;
|
|
30
31
|
protected initializeStats(): void;
|
|
@@ -38,6 +39,10 @@ export default class MerchantNPC extends NPC {
|
|
|
38
39
|
* Stop stat timers when they would kill
|
|
39
40
|
*/
|
|
40
41
|
private capStatTimers;
|
|
42
|
+
/**
|
|
43
|
+
* Equip better things when available
|
|
44
|
+
*/
|
|
45
|
+
private processEquipment;
|
|
41
46
|
/**
|
|
42
47
|
* Try to do something when health is below 20%
|
|
43
48
|
*/
|
|
@@ -51,4 +56,6 @@ export default class MerchantNPC extends NPC {
|
|
|
51
56
|
*/
|
|
52
57
|
private processThirst;
|
|
53
58
|
get asMerchant(): MerchantNPC;
|
|
59
|
+
private calculateWeaponEquipItemScore;
|
|
60
|
+
private calculateDefenseEquipItemScore;
|
|
54
61
|
}
|
|
@@ -111,10 +111,14 @@ export interface IPlayerEvents extends Events<Human> {
|
|
|
111
111
|
*/
|
|
112
112
|
idChanged(currentId: number, newId: number, isAbsentPlayer: boolean): any;
|
|
113
113
|
}
|
|
114
|
-
export declare enum
|
|
115
|
-
CheckUnderPlayer =
|
|
116
|
-
DontEnterCaves =
|
|
117
|
-
Idle =
|
|
114
|
+
export declare enum TurnTypeFlag {
|
|
115
|
+
CheckUnderPlayer = 1,
|
|
116
|
+
DontEnterCaves = 2,
|
|
117
|
+
Idle = 4,
|
|
118
|
+
/**
|
|
119
|
+
* Indicates the turn is passing due to a movement
|
|
120
|
+
*/
|
|
121
|
+
Movement = 8
|
|
118
122
|
}
|
|
119
123
|
export interface IAttackHand {
|
|
120
124
|
mainHand: number;
|
|
@@ -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
|
-
import
|
|
11
|
+
import { ActionType } from "game/entity/action/IAction";
|
|
12
12
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
13
13
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
14
14
|
import type UseInfo from "game/inspection/infoProviders/UseInfo";
|
|
@@ -36,4 +36,5 @@ export default abstract class Uses<T extends IDescribed> extends InfoProvider {
|
|
|
36
36
|
private getUseExtraInfo;
|
|
37
37
|
private getDetailsHandlerResolver;
|
|
38
38
|
private getUse;
|
|
39
|
+
private getUseName;
|
|
39
40
|
}
|