@wayward/types 2.12.0-beta.dev.20220823.1 → 2.12.0-beta.dev.20220826.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/doodad/Doodad.d.ts +0 -4
- package/definitions/game/game/entity/Human.d.ts +2 -3
- package/definitions/game/game/entity/IHuman.d.ts +0 -4
- package/definitions/game/game/entity/action/Action.d.ts +3 -3
- package/definitions/game/game/entity/action/ActionExecutor.d.ts +7 -7
- package/definitions/game/game/entity/action/ActionsRegistration.d.ts +4 -3
- package/definitions/game/game/entity/action/IAction.d.ts +14 -13
- package/definitions/game/game/entity/action/actions/ActionConfirmerResponse.d.ts +17 -0
- package/definitions/game/game/entity/action/actions/Jump.d.ts +2 -0
- package/definitions/game/game/entity/action/actions/{InterruptResponse.d.ts → PromptResponse.d.ts} +5 -1
- package/definitions/game/game/entity/action/{usable/ConfirmAction.d.ts → actions/helper/ConfirmGatherHarvest.d.ts} +3 -3
- package/definitions/game/game/entity/action/actions/helper/ConfirmHealUninjured.d.ts +13 -0
- package/definitions/game/game/entity/action/actions/helper/ConfirmItemOnFire.d.ts +17 -0
- package/definitions/game/game/entity/action/actions/helper/ConfirmOnFire.d.ts +20 -0
- package/definitions/game/game/entity/player/IPlayer.d.ts +1 -1
- package/definitions/game/game/entity/player/Player.d.ts +4 -4
- package/definitions/game/game/item/IItem.d.ts +1 -1
- package/definitions/game/game/meta/prompt/IPrompt.d.ts +103 -106
- package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +8 -6
- package/definitions/game/language/Translation.d.ts +3 -0
- package/definitions/game/multiplayer/packets/client/ActionConfirmerPacket.d.ts +27 -0
- package/definitions/game/multiplayer/packets/client/{DisplayInterruptPacket.d.ts → PromptPacket.d.ts} +4 -5
- package/definitions/game/multiplayer/packets/server/{UpdateQuickSlotInfoPacket.d.ts → UpdateActionBarPacket.d.ts} +4 -4
- package/definitions/game/multiplayer/packets/shared/ActionPacket.d.ts +9 -4
- package/definitions/game/multiplayer/packets/shared/ActionPacketBase.d.ts +18 -0
- package/definitions/game/resource/ResourceLoader.d.ts +3 -7
- package/definitions/game/save/data/ISaveDataGlobal.d.ts +1 -0
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +1 -3
- package/definitions/game/ui/screen/screens/game/static/actions/IActionBar.d.ts +3 -1
- package/definitions/game/utilities/string/Interpolator.d.ts +3 -0
- package/definitions/hosts/electron/main/launchOptions.d.ts +0 -1
- package/package.json +1 -1
|
@@ -69,10 +69,6 @@ export interface IDoodadEvents {
|
|
|
69
69
|
}
|
|
70
70
|
export default class Doodad extends EventEmitter.Host<IDoodadEvents> implements IReferenceable, IUnserializedCallback, IObject<DoodadType>, IDoodadOptions, IVector3, Partial<IContainer>, ITemperatureSource, IHasInsulation, IHasBuilder, IHasMagic {
|
|
71
71
|
static is(value: any): value is Doodad;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated
|
|
74
|
-
*/
|
|
75
|
-
static getGrowingStageTranslation(growingStage?: GrowingStage, description?: IDoodadDescription): import("../../language/impl/TranslationImpl").default | undefined;
|
|
76
72
|
get constructorFunction(): typeof Doodad;
|
|
77
73
|
static getRegistrarId(): number;
|
|
78
74
|
static setRegistrarId(id: number): void;
|
|
@@ -43,7 +43,6 @@ import type { IHasInsulation } from "game/temperature/ITemperature";
|
|
|
43
43
|
import { TempType } from "game/temperature/ITemperature";
|
|
44
44
|
import type TileEvent from "game/tile/TileEvent";
|
|
45
45
|
import Message from "language/dictionary/Message";
|
|
46
|
-
import type { ISerializedTranslation } from "language/ITranslation";
|
|
47
46
|
import Translation from "language/Translation";
|
|
48
47
|
import type FieldOfView from "renderer/fieldOfView/FieldOfView";
|
|
49
48
|
import { CanASeeBType } from "renderer/fieldOfView/IFieldOfView";
|
|
@@ -58,7 +57,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
58
57
|
event: IEventEmitter<this, IHumanEvents>;
|
|
59
58
|
crafted: Record<number, ICrafted>;
|
|
60
59
|
customization: ICustomizations;
|
|
61
|
-
deathBy: ISerializedTranslation;
|
|
60
|
+
deathBy: import("language/ITranslation").ISerializedTranslation;
|
|
62
61
|
defense: PlayerDefense;
|
|
63
62
|
defenses: number[];
|
|
64
63
|
equippedReferences: Map<EquipType, ItemReference>;
|
|
@@ -77,7 +76,7 @@ export default abstract class Human extends Entity implements IHasInsulation {
|
|
|
77
76
|
score: number;
|
|
78
77
|
state: PlayerState;
|
|
79
78
|
swimming: boolean;
|
|
80
|
-
tamedCreatures: Map
|
|
79
|
+
tamedCreatures: Map<`${number},${number}`, number[]>;
|
|
81
80
|
turns: number;
|
|
82
81
|
vehicleItemReference: ItemReference | undefined;
|
|
83
82
|
walkSoundCounter: number;
|
|
@@ -212,10 +212,6 @@ export interface IHumanEvents extends Events<Entity>, ISkillEvents {
|
|
|
212
212
|
* @param value The value this key was set to
|
|
213
213
|
*/
|
|
214
214
|
updateOption<O extends keyof IOptions>(key: O, value: IOptions[O]): any;
|
|
215
|
-
/**
|
|
216
|
-
* Called when the left/right hand is enabled/disabled
|
|
217
|
-
*/
|
|
218
|
-
changeEquipmentOption(id: "leftHand" | "rightHand", newValue: boolean): any;
|
|
219
215
|
/**
|
|
220
216
|
* Used for registering events
|
|
221
217
|
* This may be called more than once on the same player
|
|
@@ -29,7 +29,7 @@ export declare class Action<A extends Array<ActionArgument | ActionArgument[]>,
|
|
|
29
29
|
preExecutionHandler?: (actionApi: IActionApi<E, CU>, ...args: AV) => any;
|
|
30
30
|
canUseHandler: (actionApi: IActionHandlerApi<E, CU>, ...args: AV) => CU | IActionNotUsable;
|
|
31
31
|
handler: (actionApi: IActionHandlerApi<E, CU>, ...args: AV) => R;
|
|
32
|
-
confirmer?: (actionApi: IActionConfirmerApi<E,
|
|
32
|
+
confirmer?: (actionApi: IActionConfirmerApi<E, any>, ...args: AV) => Promise<boolean>;
|
|
33
33
|
private shouldSkipConfirmation;
|
|
34
34
|
constructor(...argumentTypes: A);
|
|
35
35
|
/**
|
|
@@ -39,8 +39,8 @@ export declare class Action<A extends Array<ActionArgument | ActionArgument[]>,
|
|
|
39
39
|
canUse(actionApi: IActionApi<E, any>, ...args: AV): CU | IActionNotUsable;
|
|
40
40
|
canUse(executor: E, ...args: AV): CU | IActionNotUsable;
|
|
41
41
|
canUseWhileFacing(actionExecutor: E, position: IVector3, direction: Direction.Cardinal, ...args: AV): CU | IActionNotUsable;
|
|
42
|
-
execute(
|
|
43
|
-
|
|
42
|
+
execute(actionApiOrExecutor: IActionApi<E, any> | E, ...args: AV): R | Promise<R>;
|
|
43
|
+
executeConfirmer(actionApiOrExecutor: IActionApi<E, any> | E, args: AV, argumentTypes?: ActionArgument[]): Promise<boolean>;
|
|
44
44
|
skipConfirmation(): this;
|
|
45
45
|
/**
|
|
46
46
|
* Add a "pre-execution" handler to this action.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { SfxType } from "audio/IAudio";
|
|
12
12
|
import EventEmitter from "event/EventEmitter";
|
|
13
|
-
import type {
|
|
13
|
+
import type { AnyActionDescription, IActionApi, IActionArgumentTypeMap, IActionDescription, IActionHandlerApi, IActionNotUsable, IActionParticle, IActionSoundEffect, IActionUsable } from "game/entity/action/IAction";
|
|
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";
|
|
@@ -97,9 +97,9 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
97
97
|
*/
|
|
98
98
|
canUseWhileFacing(executor: E, position: IVector3, direction: Direction.Cardinal, ...args: AV): CU | IActionNotUsable;
|
|
99
99
|
private processNotUsableResult;
|
|
100
|
-
execute(
|
|
101
|
-
|
|
102
|
-
isArgumentType<AA extends ActionArgument>(argument: any, index: number, argumentType: AA): argument is
|
|
100
|
+
execute(actionApiOrExecutor: IActionApi<E, CU> | E, ...args: AV): R | Promise<R>;
|
|
101
|
+
executeConfirmer(actionApiOrExecutor: IActionApi<E, CU> | E, args: AV, argumentTypes?: ActionArgument[]): Promise<boolean>;
|
|
102
|
+
isArgumentType<AA extends ActionArgument>(argument: any, index: number, argumentType: AA): argument is IActionArgumentTypeMap[AA];
|
|
103
103
|
setDelay(delay: number, replace?: boolean): this;
|
|
104
104
|
setPassTurn(turnType?: TurnType): this;
|
|
105
105
|
setUpdateView(updateFov?: boolean): this;
|
|
@@ -117,11 +117,11 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
117
117
|
setParticle(color: IRGB, count?: number, inFront?: boolean): this;
|
|
118
118
|
setParticle(particle: IActionParticle): this;
|
|
119
119
|
addItems(...addItems: Array<Item | undefined>): this;
|
|
120
|
-
getItems():
|
|
120
|
+
getItems(): readonly Item[];
|
|
121
121
|
removeItems(...items: Array<Item | undefined>): this;
|
|
122
122
|
setItemsUsed(used?: boolean): this;
|
|
123
|
-
confirmItemsBroken(): Promise<boolean>;
|
|
124
|
-
private
|
|
123
|
+
confirmItemsBroken(executor: E): Promise<boolean>;
|
|
124
|
+
private checkConfirmer;
|
|
125
125
|
private executeInternalOrMultiplayer;
|
|
126
126
|
private executeInternal;
|
|
127
127
|
private createActionPacket;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export declare const actionDescriptionsSlow: {
|
|
16
16
|
109: 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/Absorb").IAbsorbCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
17
|
+
113: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, import("game/entity/action/IAction").ActionArgument.Boolean], import("../player/Player").default, void, import("game/entity/action/IAction").IActionUsable, [number, boolean]>;
|
|
17
18
|
51: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default, void, import("game/entity/action/actions/AddFuel").IAddFuelCanUse, [import("../../item/Item").default, import("../../item/Item").default]>;
|
|
18
19
|
95: 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/Alter").IAlterCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
19
20
|
75: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("./actions/ConsumeItem").IConsumeItemCanUse, [import("../../item/Item").default]>;
|
|
@@ -57,7 +58,6 @@ export declare const actionDescriptionsSlow: {
|
|
|
57
58
|
usable: true;
|
|
58
59
|
}, []>;
|
|
59
60
|
27: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default, void, import("game/entity/action/actions/Ignite").IIgniteCanUse, [import("../../item/Item").default]>;
|
|
60
|
-
91: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Integer32], [import("game/entity/action/IAction").ActionArgument.Object, import("game/entity/action/IAction").ActionArgument.Undefined]], import("../player/Player").default, void, import("game/entity/action/IAction").IActionUsable, [number, number | boolean, any?]>;
|
|
61
61
|
57: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/Jump").IJumpCanUse, []>;
|
|
62
62
|
20: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default]>;
|
|
63
63
|
17: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemInventory], import("../Human").default, void, import("game/entity/action/actions/Lockpick").ILockpickCanUse, [import("../../item/Item").default]>;
|
|
@@ -78,6 +78,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
78
78
|
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)?]>;
|
|
79
79
|
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)?]>;
|
|
80
80
|
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]>;
|
|
81
|
+
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
82
|
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]>;
|
|
82
83
|
43: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/Pet").IPetCanUse, []>;
|
|
83
84
|
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)?]>;
|
|
@@ -89,6 +90,7 @@ export declare const actionDescriptionsSlow: {
|
|
|
89
90
|
24: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/actions/Pour").IPourCanUse, [import("../../item/Item").default]>;
|
|
90
91
|
41: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/actions/PourOnYourself").IPourOnYourselfCanUse, [import("../../item/Item").default]>;
|
|
91
92
|
30: 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/Preserve").IPreserveCanUse, [import("../../item/Item").default, (import("../../item/Item").default | undefined)?]>;
|
|
93
|
+
91: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.Integer32, [import("game/entity/action/IAction").ActionArgument.Boolean, import("game/entity/action/IAction").ActionArgument.Integer32]], import("../player/Player").default, void, import("game/entity/action/IAction").IActionUsable, [number, number | boolean]>;
|
|
92
94
|
88: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, import("game/entity/action/IAction").ActionArgument.Boolean], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default, boolean]>;
|
|
93
95
|
70: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../Human").default, void, import("game/entity/action/actions/Read").IReadCanUse, [import("../../item/Item").default]>;
|
|
94
96
|
19: import("./Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby, [import("game/entity/action/IAction").ActionArgument.Undefined, import("game/entity/action/IAction").ActionArgument.Boolean]], import("../Human").default, void, import("game/entity/action/IAction").IActionUsable, [import("../../item/Item").default, (boolean | undefined)?]>;
|
|
@@ -123,12 +125,11 @@ export declare const actionDescriptionsSlow: {
|
|
|
123
125
|
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
126
|
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
127
|
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
|
-
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
128
|
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)?]>;
|
|
129
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)?]>;
|
|
130
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)?]>;
|
|
131
131
|
101: import("./Action").Action<[], import("../Human").default, void, import("game/entity/action/actions/ToggleHitch").IToggleHitchCanUse, []>;
|
|
132
|
+
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
133
|
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]>;
|
|
133
134
|
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
135
|
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)?]>;
|
|
@@ -8,7 +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 type Stream from "@wayward/goodstream";
|
|
12
11
|
import type { SfxType } from "audio/IAudio";
|
|
13
12
|
import type Doodad from "game/doodad/Doodad";
|
|
14
13
|
import type { DoodadType } from "game/doodad/IDoodad";
|
|
@@ -128,7 +127,7 @@ export declare enum ActionType {
|
|
|
128
127
|
ProtectItem = 88,
|
|
129
128
|
UnProtectItem = 89,
|
|
130
129
|
UpdateItemOrder = 90,
|
|
131
|
-
|
|
130
|
+
PromptResponse = 91,
|
|
132
131
|
Upgrade = 92,
|
|
133
132
|
Enhance = 93,
|
|
134
133
|
Shoot = 94,
|
|
@@ -149,7 +148,8 @@ export declare enum ActionType {
|
|
|
149
148
|
Absorb = 109,
|
|
150
149
|
Exude = 110,
|
|
151
150
|
PackGround = 111,
|
|
152
|
-
ToggleTilled = 112
|
|
151
|
+
ToggleTilled = 112,
|
|
152
|
+
ActionConfirmerResponse = 113
|
|
153
153
|
}
|
|
154
154
|
export declare enum ActionUsability {
|
|
155
155
|
Paused = 0,
|
|
@@ -204,8 +204,8 @@ export interface IActionDescription<A extends Array<ActionArgument | ActionArgum
|
|
|
204
204
|
};
|
|
205
205
|
validExecutors: Set<EntityType>;
|
|
206
206
|
hasFlag(flag: ActionFlag): boolean;
|
|
207
|
-
execute(
|
|
208
|
-
|
|
207
|
+
execute(actionApiOrExecutor: IActionApi<E, CU> | E, ...args: AV): R | Promise<R>;
|
|
208
|
+
executeConfirmer(actionApiOrExecutor: IActionApi<E, any> | E, args: AV, argumentTypes?: ActionArgument[]): Promise<boolean>;
|
|
209
209
|
/**
|
|
210
210
|
* Check if the action has setup CanUse logic
|
|
211
211
|
*/
|
|
@@ -236,7 +236,7 @@ export interface IActionApi<E extends Entity = Entity, CU extends IActionUsable
|
|
|
236
236
|
readonly actionStack: readonly ActionType[];
|
|
237
237
|
readonly lastAction: ActionType;
|
|
238
238
|
readonly hasSetCanUse: boolean;
|
|
239
|
-
isArgumentType<A extends ActionArgument>(argument: any, index: number, argumentType: A): argument is
|
|
239
|
+
isArgumentType<A extends ActionArgument>(argument: any, index: number, argumentType: A): argument is IActionArgumentTypeMap[A];
|
|
240
240
|
canUse(): CU | IActionNotUsable;
|
|
241
241
|
/**
|
|
242
242
|
* Check if a creature on a tile and blocking the execution of the action
|
|
@@ -271,7 +271,7 @@ export interface IActionApi<E extends Entity = Entity, CU extends IActionUsable
|
|
|
271
271
|
/**
|
|
272
272
|
* Returns the items registered for this action via `addItems`.
|
|
273
273
|
*/
|
|
274
|
-
getItems():
|
|
274
|
+
getItems(): readonly Item[];
|
|
275
275
|
/**
|
|
276
276
|
* Removes all items added via `addItems`
|
|
277
277
|
*/
|
|
@@ -301,7 +301,7 @@ export interface IActionConfirmerApi<E extends Entity = Entity, CU extends IActi
|
|
|
301
301
|
* a custom confirmer if new items are added to the action here, and items *aren't* added in the `preExecutionHandler`.
|
|
302
302
|
* Otherwise the player could get two confirmations, and that's annoying.
|
|
303
303
|
*/
|
|
304
|
-
confirmItemsBroken(): Promise<boolean>;
|
|
304
|
+
confirmItemsBroken(executor: E): Promise<boolean>;
|
|
305
305
|
}
|
|
306
306
|
export interface IActionSoundEffect {
|
|
307
307
|
type: SfxType;
|
|
@@ -361,7 +361,7 @@ export declare enum ActionArgument {
|
|
|
361
361
|
Vector2Array = 38,
|
|
362
362
|
Vector3 = 39
|
|
363
363
|
}
|
|
364
|
-
export
|
|
364
|
+
export interface IActionArgumentTypeMap {
|
|
365
365
|
[ActionArgument.Undefined]: undefined;
|
|
366
366
|
[ActionArgument.Null]: null;
|
|
367
367
|
[ActionArgument.Boolean]: boolean;
|
|
@@ -402,10 +402,11 @@ export declare type ActionArgumentTypeMap<X extends ActionArgument> = {
|
|
|
402
402
|
[ActionArgument.Vector2]: IVector2;
|
|
403
403
|
[ActionArgument.Vector2Array]: IVector2[];
|
|
404
404
|
[ActionArgument.Vector3]: IVector3;
|
|
405
|
-
}
|
|
406
|
-
declare type ActionArgumentEntryType<X extends ActionArgument | ActionArgument[]> = X extends ActionArgument ?
|
|
407
|
-
|
|
408
|
-
|
|
405
|
+
}
|
|
406
|
+
declare type ActionArgumentEntryType<X extends ActionArgument | ActionArgument[]> = X extends ActionArgument ? IActionArgumentTypeMap[X] : X extends ActionArgument[] ? ({
|
|
407
|
+
[INDEX in keyof X]: IActionArgumentTypeMap[X[INDEX] & ActionArgument];
|
|
408
|
+
}[number]) : never;
|
|
409
|
+
export declare type ActionArgumentTupleTypes<X extends Array<ActionArgument | ActionArgument[]>> = X["length"] extends 0 ? [] : X["length"] extends 1 ? Tuple1<ActionArgumentEntryType<X[0]>> : X["length"] extends 2 ? Tuple2<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>> : X["length"] extends 3 ? Tuple3<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>> : X["length"] extends 4 ? Tuple4<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>, ActionArgumentEntryType<X[3]>> : X["length"] extends 5 ? Tuple5<ActionArgumentEntryType<X[0]>, ActionArgumentEntryType<X[1]>, ActionArgumentEntryType<X[2]>, ActionArgumentEntryType<X[3]>, ActionArgumentEntryType<X[4]>> : never;
|
|
409
410
|
export declare type Tuple1<X1> = undefined extends X1 ? [X1?] : [X1];
|
|
410
411
|
export declare type Tuple2<X1, X2> = undefined extends X2 ? (undefined extends X1 ? [X1?, X2?] : [X1, X2?]) : [X1, X2];
|
|
411
412
|
export declare type Tuple3<X1, X2, X3> = undefined extends X3 ? (undefined extends X2 ? (undefined extends X1 ? [X1?, X2?, X3?] : [X1, X2?, X3?]) : [X1, X2, X3?]) : [X1, X2, X3];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { ActionType } from "game/entity/action/IAction";
|
|
13
|
+
import { ActionArgument } from "game/entity/action/IAction";
|
|
14
|
+
import type Player from "game/entity/player/Player";
|
|
15
|
+
declare const _default: Action<[ActionArgument.Integer32, ActionArgument.Boolean], Player, void, import("game/entity/action/IAction").IActionUsable, [number, boolean]>;
|
|
16
|
+
export default _default;
|
|
17
|
+
export declare function waitForActionConfirmerResponse(executor: Player, type: ActionType): Promise<boolean>;
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import type { IActionUsable } from "game/entity/action/IAction";
|
|
13
13
|
import type { IStat } from "game/entity/IStats";
|
|
14
|
+
import type { IVector3 } from "utilities/math/IVector";
|
|
14
15
|
export interface IJumpCanUse extends IActionUsable {
|
|
15
16
|
stamina: IStat;
|
|
16
17
|
jumpStamina: number;
|
|
18
|
+
jumpPosition: IVector3;
|
|
17
19
|
}
|
|
18
20
|
declare const _default: Action<[], import("../../Human").default, void, IJumpCanUse, []>;
|
|
19
21
|
export default _default;
|
package/definitions/game/game/entity/action/actions/{InterruptResponse.d.ts → PromptResponse.d.ts}
RENAMED
|
@@ -10,5 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { Action } from "game/entity/action/Action";
|
|
12
12
|
import { ActionArgument } from "game/entity/action/IAction";
|
|
13
|
-
|
|
13
|
+
import type Player from "game/entity/player/Player";
|
|
14
|
+
import { Prompt } from "game/meta/prompt/IPrompt";
|
|
15
|
+
import type InterruptChoice from "language/dictionary/InterruptChoice";
|
|
16
|
+
declare const _default: Action<[ActionArgument.Integer32, [ActionArgument.Boolean, ActionArgument.Integer32]], Player, void, import("game/entity/action/IAction").IActionUsable, [number, number | boolean]>;
|
|
14
17
|
export default _default;
|
|
18
|
+
export declare function waitForPromptResponse(executor: Player, type: Prompt): Promise<boolean | InterruptChoice>;
|
|
@@ -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
|
-
import type
|
|
13
|
-
export default function (
|
|
11
|
+
import type { IActionConfirmerApi } from "game/entity/action/IAction";
|
|
12
|
+
import type Human from "game/entity/Human";
|
|
13
|
+
export default function (action: IActionConfirmerApi<Human>): Promise<boolean>;
|
|
@@ -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 type { IActionConfirmerApi } from "game/entity/action/IAction";
|
|
12
|
+
import type Human from "game/entity/Human";
|
|
13
|
+
export default function (action: IActionConfirmerApi<Human>): Promise<boolean>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 Human from "game/entity/Human";
|
|
12
|
+
export default function (human: Human, all: boolean): true | import("game/meta/prompt/Prompts").IPrompt<import("../../../../meta/prompt/IPrompt").IPromptConfirmDescription<[{
|
|
13
|
+
WITH?: (string | import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default) | undefined;
|
|
14
|
+
ACTION: string | import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default;
|
|
15
|
+
AMOUNT: number;
|
|
16
|
+
LAVA?: true | undefined;
|
|
17
|
+
}]>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 Human from "game/entity/Human";
|
|
12
|
+
import type { ITile } from "game/tile/ITerrain";
|
|
13
|
+
import type Message from "language/dictionary/Message";
|
|
14
|
+
import Translation from "language/Translation";
|
|
15
|
+
export default function (human: Human, tile: ITile, thing: Translation | undefined, message: Message): true | import("game/meta/prompt/Prompts").IPrompt<import("../../../../meta/prompt/IPrompt").IPromptConfirmDescription<[{
|
|
16
|
+
WITH?: (string | import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default) | undefined;
|
|
17
|
+
ACTION: string | import("../../../../../language/ITranslation").ISerializedTranslation | import("../../../../../language/impl/TranslationImpl").default;
|
|
18
|
+
AMOUNT: number;
|
|
19
|
+
LAVA?: true | undefined;
|
|
20
|
+
}]>>;
|
|
@@ -42,7 +42,7 @@ export interface IPlayerEvents extends Events<Human> {
|
|
|
42
42
|
* @param interrupt The interrupt
|
|
43
43
|
* @param choice The selected choice
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
promptResponse(interrupt: Prompt, choice: boolean | InterruptChoice): any;
|
|
46
46
|
/**
|
|
47
47
|
* Called when the player will be killed. If any handlers return `false` to stop the player from dying,
|
|
48
48
|
* no further handlers will be called.
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { IEventEmitter } from "event/EventEmitter";
|
|
12
|
-
import type { ActionType } from "game/entity/action/IAction";
|
|
13
12
|
import Creature from "game/entity/creature/Creature";
|
|
14
13
|
import { CreatureType } from "game/entity/creature/ICreature";
|
|
15
14
|
import Human from "game/entity/Human";
|
|
@@ -27,7 +26,8 @@ import { ItemType } from "game/item/IItem";
|
|
|
27
26
|
import { Milestone } from "game/milestones/IMilestone";
|
|
28
27
|
import type IClientStore from "save/clientStore/IClientStore";
|
|
29
28
|
import type { IUnserializedCallback } from "save/serializer/ISerializer";
|
|
30
|
-
import type {
|
|
29
|
+
import type { IDialogInfo } from "ui/old/IOldUi";
|
|
30
|
+
import { IActionBarSlotData } from "ui/screen/screens/game/static/actions/IActionBar";
|
|
31
31
|
import { Direction } from "utilities/math/Direction";
|
|
32
32
|
import type { IVector3 } from "utilities/math/IVector";
|
|
33
33
|
export default class Player extends Human implements IUnserializedCallback {
|
|
@@ -40,7 +40,7 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
40
40
|
islandId: IslandId;
|
|
41
41
|
lastAttackedBy: Human | Creature | undefined;
|
|
42
42
|
name: string;
|
|
43
|
-
|
|
43
|
+
actionBar: IActionBarSlotData[];
|
|
44
44
|
revealedItems: Record<number, boolean>;
|
|
45
45
|
milestoneModifiers: Set<Milestone>;
|
|
46
46
|
displayCreature?: CreatureType;
|
|
@@ -71,7 +71,7 @@ export default class Player extends Human implements IUnserializedCallback {
|
|
|
71
71
|
private updateCraftTable;
|
|
72
72
|
updateDismantleTable(adjacentContainers?: IContainer[], force?: boolean): void;
|
|
73
73
|
getName(): import("../../../language/impl/TranslationImpl").default;
|
|
74
|
-
|
|
74
|
+
updateActionSlots(slots: number[], data: IActionBarSlotData[]): void;
|
|
75
75
|
updateDialogInfo(dialogIndex: string | number): void;
|
|
76
76
|
getDialogInfo(dialogIndex: string | number): IDialogInfo;
|
|
77
77
|
kill(): void;
|
|
@@ -528,7 +528,7 @@ export declare type EquipEffects = {
|
|
|
528
528
|
[K in keyof IEquipEffects]: AddHead<K, Extract<IEquipEffects[K], any[]>>;
|
|
529
529
|
}[keyof IEquipEffects];
|
|
530
530
|
export declare type EquipEffectByType<T extends EquipEffect> = IEquipEffects[T];
|
|
531
|
-
export declare const
|
|
531
|
+
export declare const consumables: Set<ActionType>;
|
|
532
532
|
export declare enum ItemWeightChange {
|
|
533
533
|
NewMagicProperty = 0,
|
|
534
534
|
NewWeight = 1
|
|
@@ -20,112 +20,109 @@ export declare enum Prompt {
|
|
|
20
20
|
GameMessagesContextMenuClear = 2,
|
|
21
21
|
GameCannotRunGlError = 3,
|
|
22
22
|
GameCannotRunIndexedDbError = 4,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
SteamworksModPublishModJsonUpdateFailed = 108,
|
|
127
|
-
SteamworksNotAvailableOnSteamDeck = 109,
|
|
128
|
-
UiSaveDrop = 110
|
|
23
|
+
GameConfirmationActionIsLava = 5,
|
|
24
|
+
GameConfirmationActionInLavaOrFire = 6,
|
|
25
|
+
GameConfirmationDestroyOnGather = 7,
|
|
26
|
+
GameConfirmationDroppingContainer = 8,
|
|
27
|
+
GameConfirmationRestWithEquippedFireSource = 9,
|
|
28
|
+
GameContainerNotFull = 10,
|
|
29
|
+
GameDangerousStep = 11,
|
|
30
|
+
GameDesalinationNoNeed = 12,
|
|
31
|
+
GameExtinguishWaterStill = 13,
|
|
32
|
+
GameItemMayBeDestroyedInCraft = 14,
|
|
33
|
+
GameItemMayCauseBurns = 15,
|
|
34
|
+
GameItemsMayBeDestroyedOnUse = 16,
|
|
35
|
+
GameLoadFailure = 17,
|
|
36
|
+
GameNoHealingRequired = 18,
|
|
37
|
+
GameNoSaveOnDeath = 19,
|
|
38
|
+
GamePickUpStillWithWater = 20,
|
|
39
|
+
GameReleaseCreature = 21,
|
|
40
|
+
GameRenameGeneric = 22,
|
|
41
|
+
GameRenameCreature = 23,
|
|
42
|
+
GameRenameDoodad = 24,
|
|
43
|
+
GameRenameItem = 25,
|
|
44
|
+
GameReturnToTitleScreen = 26,
|
|
45
|
+
GameReturnToTitleScreenChallenge = 27,
|
|
46
|
+
GameSailAwayEnd = 28,
|
|
47
|
+
GameSailAwayReturnable = 29,
|
|
48
|
+
GameSaveFailure = 30,
|
|
49
|
+
GameIslandTravelConfirmation = 31,
|
|
50
|
+
GameWellConvert = 32,
|
|
51
|
+
GameSolarStillWontWorkInTemperature = 33,
|
|
52
|
+
GameSolarStillWontWorkInCave = 34,
|
|
53
|
+
GamePause = 35,
|
|
54
|
+
GameWin = 36,
|
|
55
|
+
GameOver = 37,
|
|
56
|
+
GameHelp = 38,
|
|
57
|
+
GameMultiplayerOptions = 39,
|
|
58
|
+
GameEditBindings = 40,
|
|
59
|
+
MenuCharacterCreationImportCharacterFailure = 41,
|
|
60
|
+
MenuCharacterSelectionDeleteCharacter = 42,
|
|
61
|
+
MenuGameEndGhostDeleteSave = 43,
|
|
62
|
+
MenuGameEndWonDeleteSave = 44,
|
|
63
|
+
MenuGameEndReturnToTitleScreen = 45,
|
|
64
|
+
MenuGameEndReturnToTitleScreenChallengeMultiplayer = 46,
|
|
65
|
+
MenuGameEndReturnToTitleScreenChallenge = 47,
|
|
66
|
+
MenuGameEndReturnToTitleScreenMultiplayer = 48,
|
|
67
|
+
MenuLoadGameDeleteSave = 49,
|
|
68
|
+
MenuLoadGameDeleteSaves = 50,
|
|
69
|
+
MenuLoadGameExportType = 51,
|
|
70
|
+
MenuLoadGameImportSaveFailure = 52,
|
|
71
|
+
MenuLoadGameMissingMod = 53,
|
|
72
|
+
MenuLoadGameOldBuildTime = 54,
|
|
73
|
+
MenuLoadGamePublishError = 55,
|
|
74
|
+
MenuMainWelcomeToVersion = 56,
|
|
75
|
+
MenuMainOldVersionWarning = 57,
|
|
76
|
+
MenuModsConfirmPublish = 58,
|
|
77
|
+
MenuModsConfirmPublishUpdate = 59,
|
|
78
|
+
MenuModsModEnableMultipleLanguages = 60,
|
|
79
|
+
MenuModsModEnableUseLanguage = 61,
|
|
80
|
+
MenuModsPublishedReminderRequiredModsOnWorkshop = 62,
|
|
81
|
+
MenuModsPublishError = 63,
|
|
82
|
+
MenuModsPublishUpdateError = 64,
|
|
83
|
+
MenuModsInfoMissingDependencies = 65,
|
|
84
|
+
MenuModsConfirmEnableDisabledDependencies = 66,
|
|
85
|
+
MenuModsConfirmDisableDependents = 67,
|
|
86
|
+
MenuModsConfirmUninstallMod = 68,
|
|
87
|
+
MenuModsUnloadableSaveGameMod = 69,
|
|
88
|
+
MenuModsSubmenuEditInternalModsModsListChangeReload = 70,
|
|
89
|
+
MenuMultiplayerCannotJoinFailedToLoadMods = 71,
|
|
90
|
+
MenuNewGameTooManySaves = 72,
|
|
91
|
+
MenuCustomGameOptionsConfirmImport = 73,
|
|
92
|
+
MenuCustomGameOptionsImportFailure = 74,
|
|
93
|
+
MenuMilestoneModifiersConfirmImport = 75,
|
|
94
|
+
MenuMilestoneModifiersImportFailure = 76,
|
|
95
|
+
MenuOptionsReloadGame = 77,
|
|
96
|
+
MenuOptionsChangeReload = 78,
|
|
97
|
+
MenuOptionsConfirmUnlockMilestones = 79,
|
|
98
|
+
MenuOptionsConfirmUnlockRecipes = 80,
|
|
99
|
+
MenuOptionsSaveDataClearAll = 81,
|
|
100
|
+
MenuOptionsSaveDataClearCharacters = 82,
|
|
101
|
+
MenuOptionsSaveDataClearHighscores = 83,
|
|
102
|
+
MenuOptionsSaveDataClearMilestones = 84,
|
|
103
|
+
MenuOptionsSaveDataClearOptions = 85,
|
|
104
|
+
MenuOptionsSaveDataClearSaves = 86,
|
|
105
|
+
MenuOptionsSaveDataClearCraftingRecipes = 87,
|
|
106
|
+
MenuOptionsSaveDataClearBindings = 88,
|
|
107
|
+
MenuOptionsConfirmImportGlobalData = 89,
|
|
108
|
+
MenuPauseGhostKeepSave = 90,
|
|
109
|
+
MenuPauseReturnToTitleScreen = 91,
|
|
110
|
+
MenuPauseReturnToTitleScreenChallenge = 92,
|
|
111
|
+
MenuPauseReturnToTitleScreenChallengeMultiplayer = 93,
|
|
112
|
+
MenuPauseReturnToTitleScreenMultiplayer = 94,
|
|
113
|
+
MultiplayerFailedToConnect = 95,
|
|
114
|
+
MultiplayerRestartServerAfterLoadingSave = 96,
|
|
115
|
+
MultiplayerDisconnect = 97,
|
|
116
|
+
MultiplayerDisconnectRejoin = 98,
|
|
117
|
+
SteamworksURLOpenedInBrowser = 99,
|
|
118
|
+
SteamworksWorkshopOpenedInBrowser = 100,
|
|
119
|
+
SteamworksModWithNameAlreadyExists = 101,
|
|
120
|
+
SteamworksModImportSaveGameFailure = 102,
|
|
121
|
+
SteamworksModImportedSaveGame = 103,
|
|
122
|
+
SteamworksOpenFolderFailure = 104,
|
|
123
|
+
SteamworksModPublishModJsonUpdateFailed = 105,
|
|
124
|
+
SteamworksNotAvailableOnSteamDeck = 106,
|
|
125
|
+
UiSaveDrop = 107
|
|
129
126
|
}
|
|
130
127
|
export declare enum PromptType {
|
|
131
128
|
Info = 0,
|
|
@@ -21,16 +21,18 @@ export declare const promptGameDialogMessagesEditFiltersResetConfirm: import("ga
|
|
|
21
21
|
export declare const promptGameMessagesContextMenuClear: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
22
22
|
export declare const promptGameCannotRunGlError: import("game/meta/prompt/IPrompt").IPromptChoiceDescription<any[], InterruptChoice.Quit[]>;
|
|
23
23
|
export declare const promptGameCannotRunIndexedDbError: import("game/meta/prompt/IPrompt").IPromptChoiceDescription<any[], InterruptChoice.Quit[]>;
|
|
24
|
-
export declare const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export declare const promptGameConfirmationActionInLavaOrFire: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[{
|
|
25
|
+
WITH?: Text | undefined;
|
|
26
|
+
ACTION: Text;
|
|
27
|
+
AMOUNT: number;
|
|
28
|
+
LAVA?: true | undefined;
|
|
29
|
+
}]>;
|
|
30
|
+
export declare const promptGameConfirmationActionIsLava: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[gatherText: Text]>;
|
|
29
31
|
export declare const promptGameConfirmationDestroyOnGather: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[growthStage: Text | undefined, objectName: Text]>;
|
|
30
32
|
export declare const promptGameConfirmationDroppingContainer: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
31
33
|
export declare const promptGameConfirmationRestWithEquippedFireSource: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[actionVerb: Text, objectName: Text, actionNoun: Text]>;
|
|
32
34
|
export declare const promptGameContainerNotFull: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
33
|
-
export declare const promptGameDangerousStep: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[objectName: Text
|
|
35
|
+
export declare const promptGameDangerousStep: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[objectName: Text]>;
|
|
34
36
|
export declare const promptGameDesalinationNoNeed: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
35
37
|
export declare const promptGameExtinguishWaterStill: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[]>;
|
|
36
38
|
export declare const promptGameItemMayBeDestroyedInCraft: import("game/meta/prompt/IPrompt").IPromptConfirmDescription<[breakingItemsList: Text]>;
|
|
@@ -8,6 +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 type { GrowingStage } from "game/doodad/IDoodad";
|
|
11
12
|
import { DamageType } from "game/entity/IEntity";
|
|
12
13
|
import { EquipType, SkillType } from "game/entity/IHuman";
|
|
13
14
|
import { Stat } from "game/entity/IStats";
|
|
@@ -96,6 +97,8 @@ declare module Translation {
|
|
|
96
97
|
* This method returns a translated list of damage types.
|
|
97
98
|
*/
|
|
98
99
|
const damage: (damageTypes: ArrayOr<DamageType>, colorize?: boolean, reformatter?: TranslationImpl | ((type: DamageType) => Translation) | undefined) => TranslationImpl;
|
|
100
|
+
function growthStage(stage: GrowingStage, spores?: boolean): TranslationImpl;
|
|
101
|
+
function growthStage(stage?: GrowingStage, spores?: boolean): TranslationImpl | undefined;
|
|
99
102
|
const getString: typeof TranslationImpl.getString;
|
|
100
103
|
const resolve: typeof TranslationImpl.resolve;
|
|
101
104
|
function colorizeQuality(quality: Quality | string): Translation;
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { AnyActionDescription } from "game/entity/action/IAction";
|
|
12
|
+
import { ActionArgument, ActionType } from "game/entity/action/IAction";
|
|
13
|
+
import type Entity from "game/entity/Entity";
|
|
14
|
+
import { PacketType } from "multiplayer/packets/IPacket";
|
|
15
|
+
import ActionPacketBase from "multiplayer/packets/shared/ActionPacketBase";
|
|
16
|
+
export default class ActionConfirmerPacket extends ActionPacketBase {
|
|
17
|
+
entity: Entity;
|
|
18
|
+
actionType: ActionType;
|
|
19
|
+
arguments: any[];
|
|
20
|
+
argumentTypes: ActionArgument[];
|
|
21
|
+
getType(): PacketType;
|
|
22
|
+
get action(): AnyActionDescription;
|
|
23
|
+
getDebugInfo(): string;
|
|
24
|
+
process(): void;
|
|
25
|
+
protected writeData(): void;
|
|
26
|
+
protected readData(): void;
|
|
27
|
+
}
|
|
@@ -8,12 +8,11 @@
|
|
|
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 { Prompt } from "game/meta/prompt/IPrompt";
|
|
12
12
|
import ClientPacket from "multiplayer/packets/ClientPacket";
|
|
13
|
-
export default class
|
|
14
|
-
|
|
15
|
-
args: any
|
|
16
|
-
extraData: any;
|
|
13
|
+
export default class PromptPacket extends ClientPacket {
|
|
14
|
+
promptType: Prompt;
|
|
15
|
+
args: any;
|
|
17
16
|
getDebugInfo(): string;
|
|
18
17
|
process(): Promise<void>;
|
|
19
18
|
}
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
12
|
-
import type {
|
|
13
|
-
export default class
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
import type { IActionBarSlotData } from "ui/screen/screens/game/static/actions/IActionBar";
|
|
13
|
+
export default class UpdateActionBarPacket extends PlayerTargetedServerPacket {
|
|
14
|
+
slots: Uint8Array;
|
|
15
|
+
data: IActionBarSlotData[];
|
|
16
16
|
getDebugInfo(): string;
|
|
17
17
|
isSyncCheckEnabled(): boolean;
|
|
18
18
|
isAllowedWhenPaused(): boolean;
|
|
@@ -10,18 +10,23 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { IActionDescription } from "game/entity/action/IAction";
|
|
12
12
|
import { ActionArgument, ActionType } from "game/entity/action/IAction";
|
|
13
|
+
import type Entity from "game/entity/Entity";
|
|
13
14
|
import type Item from "game/item/Item";
|
|
14
|
-
import
|
|
15
|
-
|
|
15
|
+
import { PacketType } from "multiplayer/packets/IPacket";
|
|
16
|
+
import ActionPacketBase from "multiplayer/packets/shared/ActionPacketBase";
|
|
17
|
+
export default class ActionPacket extends ActionPacketBase {
|
|
18
|
+
entity: Entity | undefined;
|
|
16
19
|
actionType: ActionType;
|
|
17
20
|
arguments: any[];
|
|
18
21
|
items: Item[];
|
|
19
22
|
argumentTypes: ActionArgument[];
|
|
23
|
+
getType(): PacketType;
|
|
20
24
|
get action(): IActionDescription;
|
|
21
25
|
getDebugInfo(): string;
|
|
26
|
+
preProcess(): void;
|
|
22
27
|
process(): void;
|
|
28
|
+
protected preWriteData(): void;
|
|
23
29
|
protected writeData(): void;
|
|
30
|
+
protected preReadData(): void;
|
|
24
31
|
protected readData(): void;
|
|
25
|
-
private writeArgument;
|
|
26
|
-
private readArgument;
|
|
27
32
|
}
|
|
@@ -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 { ActionArgument } from "game/entity/action/IAction";
|
|
12
|
+
import type Entity from "game/entity/Entity";
|
|
13
|
+
import { Packet } from "multiplayer/packets/Packet";
|
|
14
|
+
export default abstract class ActionPacketBase extends Packet {
|
|
15
|
+
abstract entity: Entity | undefined;
|
|
16
|
+
protected writeArgument(expectedType: ActionArgument, value: any): void;
|
|
17
|
+
protected readArgument(expectedType: ActionArgument): any;
|
|
18
|
+
}
|
|
@@ -8,27 +8,23 @@
|
|
|
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 EventEmitter from "event/EventEmitter";
|
|
12
11
|
import type WebGlContext from "renderer/WebGlContext";
|
|
13
12
|
import type { IResourceContainer } from "resource/IResourceLoader";
|
|
14
|
-
export
|
|
15
|
-
load(): any;
|
|
16
|
-
}
|
|
17
|
-
export default class ResourceLoader extends EventEmitter.Host<IResourceLoaderEvents> {
|
|
13
|
+
export default class ResourceLoader {
|
|
18
14
|
private readonly webGlContext;
|
|
19
15
|
private concurrent;
|
|
20
|
-
private loadingCount;
|
|
21
16
|
private loadingInterval;
|
|
22
17
|
private waitingSlots;
|
|
23
18
|
private readonly maxConcurrent;
|
|
24
19
|
private spritePacker;
|
|
25
20
|
private tilePacker;
|
|
21
|
+
private pendingLoads;
|
|
22
|
+
private activeLoad;
|
|
26
23
|
private _resourceContainer;
|
|
27
24
|
private readonly spriteAtlas;
|
|
28
25
|
private readonly tileAtlas;
|
|
29
26
|
constructor(webGlContext: WebGlContext);
|
|
30
27
|
delete(): void;
|
|
31
|
-
get isLoading(): boolean;
|
|
32
28
|
get resourceContainer(): IResourceContainer | undefined;
|
|
33
29
|
initialize(): Promise<void>;
|
|
34
30
|
loadResources(background?: boolean): Promise<void>;
|
|
@@ -8,11 +8,10 @@
|
|
|
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 Doodad from "game/doodad/Doodad";
|
|
11
|
+
import type Doodad from "game/doodad/Doodad";
|
|
12
12
|
import { ActionType } from "game/entity/action/IAction";
|
|
13
13
|
import { EquipType } from "game/entity/IHuman";
|
|
14
14
|
import NPC from "game/entity/npc/NPC";
|
|
15
|
-
import type Player from "game/entity/player/Player";
|
|
16
15
|
import type { IContainer, IDismantleComponent } from "game/item/IItem";
|
|
17
16
|
import { ItemType } from "game/item/IItem";
|
|
18
17
|
import Item from "game/item/Item";
|
|
@@ -101,7 +100,6 @@ export default class InGameScreen extends BaseScreen {
|
|
|
101
100
|
constructor();
|
|
102
101
|
selector(): string;
|
|
103
102
|
bindElements(): void;
|
|
104
|
-
onChangeEquipmentOption(player: Player, id: "leftHand" | "rightHand", newValue: boolean): void;
|
|
105
103
|
toggleCraftingTab(which: "crafting" | "dismantle", canClose?: boolean): void;
|
|
106
104
|
toggleCraftingTabElements(which: "crafting" | "dismantle"): void;
|
|
107
105
|
unbindElements(): void;
|
|
@@ -14,14 +14,16 @@ import type { Reference } from "game/reference/ReferenceManager";
|
|
|
14
14
|
export interface IActionBarSlotData {
|
|
15
15
|
useOnMove?: true;
|
|
16
16
|
actionId?: string;
|
|
17
|
-
using?: Omit<IUsableActionPossibleUsing, "item" | "doodad" | "creature"> & {
|
|
17
|
+
using?: Omit<IUsableActionPossibleUsing, "item" | "doodad" | "creature" | "npc"> & {
|
|
18
18
|
item?: Reference<ReferenceType.Item>;
|
|
19
19
|
doodad?: Reference<ReferenceType.Doodad>;
|
|
20
20
|
creature?: Reference<ReferenceType.Creature>;
|
|
21
|
+
npc?: Reference<ReferenceType.NPC>;
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
export declare module IActionBarSlotData {
|
|
24
25
|
function using(slotData?: IActionBarSlotData): IUsableActionPossibleUsing;
|
|
25
26
|
function item(slotData?: IActionBarSlotData | IActionBarSlotData["using"]): import("../../../../../../game/item/Item").default | undefined;
|
|
26
27
|
function copy(slotData?: IActionBarSlotData): IActionBarSlotData;
|
|
28
|
+
function equals(a?: IActionBarSlotData, b?: IActionBarSlotData): boolean;
|
|
27
29
|
}
|
|
@@ -36,6 +36,9 @@ export interface IStringSection {
|
|
|
36
36
|
icon?: ISerializedIcon;
|
|
37
37
|
forceInclude?: true;
|
|
38
38
|
}
|
|
39
|
+
export declare namespace IStringSection {
|
|
40
|
+
function get(content?: string | IStringSection | Iterable<IStringSection>): Iterable<IStringSection>;
|
|
41
|
+
}
|
|
39
42
|
export interface IReferenceSection extends IStringSection {
|
|
40
43
|
reference: Reference;
|
|
41
44
|
}
|
package/package.json
CHANGED