@wayward/types 2.13.2-beta.dev.20230529.1 → 2.13.2-beta.dev.20230530.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/entity/Human.d.ts +2 -0
- package/definitions/game/game/entity/action/Action.d.ts +7 -1
- package/definitions/game/game/entity/action/ActionExecutor.d.ts +5 -1
- package/definitions/game/game/entity/action/IAction.d.ts +15 -0
- package/definitions/game/game/entity/action/actions/Eat.d.ts +1 -1
- package/definitions/game/game/entity/action/actions/Throw.d.ts +1 -1
- package/definitions/game/game/entity/npc/NPCManager.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/RecipeInspection.d.ts +2 -1
- package/definitions/game/game/inspection/inspections/SkillInspection.d.ts +1 -1
- package/definitions/game/game/tile/events/Fire.d.ts +5 -1
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/component/Dialog.d.ts +4 -4
- package/definitions/game/ui/screen/screens/game/component/TabDialog.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/dialog/QuestDialog.d.ts +2 -1
- package/package.json +1 -1
|
@@ -221,6 +221,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
221
221
|
*/
|
|
222
222
|
processInput(timeStamp: number): IMovementIntent | undefined;
|
|
223
223
|
staminaReduction(skill?: SkillType, level?: number): void;
|
|
224
|
+
updateReputationForAttackingWithTamedCreature(target: Creature, attacker: Creature): void;
|
|
224
225
|
updateReputation(reputation: number): void;
|
|
225
226
|
protected checkOnLoadMilestones(): void;
|
|
226
227
|
capReputation(): void;
|
|
@@ -251,6 +252,7 @@ export default abstract class Human<TypeType extends number = number> extends En
|
|
|
251
252
|
hasWalkPath(): boolean;
|
|
252
253
|
setWalkPath(path: IVector2[] | undefined, force?: boolean): void;
|
|
253
254
|
checkUnder(inFacingDirection?: boolean, options?: ICheckUnderOptions): ICheckUnderOptions;
|
|
255
|
+
trampleFire(fireEvent: TileEvent): void;
|
|
254
256
|
damageByInteractingWith(thing: Doodad | TileEvent, options: ICheckUnderOptions | undefined, damageLocation: EquipType): ICheckUnderOptions;
|
|
255
257
|
equip(item: Item, slot: EquipType, internal?: boolean): boolean;
|
|
256
258
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "game/doodad/Doodad";
|
|
12
|
-
import type { ActionArgument, ActionArgumentTupleTypes, ActionFlag, ActionUsability, IActionApi, IActionConfirmerApi, IActionDescription, IActionHandlerApi, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
|
|
12
|
+
import type { ActionArgument, ActionArgumentTupleTypes, ActionFlag, ActionUsability, IActionApi, IActionConfirmerApi, IActionDescription, IActionExample, IActionExampleApi, IActionHandlerApi, IActionNotUsable, IActionUsable } from "game/entity/action/IAction";
|
|
13
13
|
import type Corpse from "game/entity/creature/corpse/Corpse";
|
|
14
14
|
import type Creature from "game/entity/creature/Creature";
|
|
15
15
|
import type Entity from "game/entity/Entity";
|
|
@@ -34,12 +34,14 @@ export declare class Action<A extends Array<ActionArgument | ActionArgument[]>,
|
|
|
34
34
|
canUseHandler: (actionApi: IActionHandlerApi<E, CU>, ...args: AV) => CU | IActionNotUsable;
|
|
35
35
|
handler: (actionApi: IActionHandlerApi<E, CU>, ...args: AV) => R;
|
|
36
36
|
confirmer?: (actionApi: IActionConfirmerApi<E, any>, ...args: AV) => Promise<boolean>;
|
|
37
|
+
exampleHandler?: (actionApi: IActionExampleApi<E, CU>, ...args: AV) => IActionExample;
|
|
37
38
|
private shouldSkipConfirmation;
|
|
38
39
|
constructor(...argumentTypes: A);
|
|
39
40
|
/**
|
|
40
41
|
* Check if the action has setup CanUse logic
|
|
41
42
|
*/
|
|
42
43
|
get hasSetCanUse(): boolean;
|
|
44
|
+
getExample(executor: E, ...args: AV): IActionExample | undefined;
|
|
43
45
|
canUse(actionApi: IActionApi<E, any>, ...args: AV): CU | IActionNotUsable;
|
|
44
46
|
canUse(executor: E, ...args: AV): CU | IActionNotUsable;
|
|
45
47
|
canUseWhileFacing(actionExecutor: E, position: IVector3, direction: Direction.Cardinal, ...args: AV): CU | IActionNotUsable;
|
|
@@ -67,6 +69,10 @@ export declare class Action<A extends Array<ActionArgument | ActionArgument[]>,
|
|
|
67
69
|
* @return `false` to cancel the execution of the action.
|
|
68
70
|
*/
|
|
69
71
|
setConfirmer(confirmer: (actionApi: IActionConfirmerApi<E, CU>, ...args: AV) => Promise<boolean>): this;
|
|
72
|
+
/**
|
|
73
|
+
* Add an example to this action.
|
|
74
|
+
*/
|
|
75
|
+
setExample(exampleHandler: (actionApi: IActionExampleApi<E, CU>, ...args: AV) => IActionExample): this;
|
|
70
76
|
/**
|
|
71
77
|
* Add a can use handler for this action.
|
|
72
78
|
*
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { SfxType } from "audio/IAudio";
|
|
12
12
|
import EventEmitter from "event/EventEmitter";
|
|
13
|
-
import type { ActionExecutorEvents, AnyActionDescription, IActionApi, IActionArgumentTypeMap, IActionConfirmerApi, IActionDescription, IActionNotUsable, IActionParticle, IActionSoundEffect, IActionUsable, IProtectedItems } from "game/entity/action/IAction";
|
|
13
|
+
import type { ActionExecutorEvents, AnyActionDescription, IActionApi, IActionArgumentTypeMap, IActionConfirmerApi, IActionDescription, IActionExample, IActionNotUsable, IActionParticle, IActionSoundEffect, IActionUsable, IProtectedItems } 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
|
+
import type Human from "game/entity/Human";
|
|
16
17
|
import type { SkillType } from "game/entity/IHuman";
|
|
17
18
|
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
18
19
|
import type Item from "game/item/Item";
|
|
@@ -60,6 +61,7 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
60
61
|
private itemsUsed;
|
|
61
62
|
private readonly action;
|
|
62
63
|
constructor(action?: IActionDescription<A, E, R, CU>, type?: number | undefined);
|
|
64
|
+
get description(): IActionDescription<A, E, R, CU>;
|
|
63
65
|
skipConfirmation(): this;
|
|
64
66
|
/**
|
|
65
67
|
* Check if a creature on a tile and blocking the execution of the action
|
|
@@ -71,6 +73,7 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
71
73
|
* true if a creature is on a tile, false otherwise
|
|
72
74
|
*/
|
|
73
75
|
isCreatureBlocking(tile: Tile): boolean;
|
|
76
|
+
getExample(executor: E, ...args: AV): IActionExample | undefined;
|
|
74
77
|
/**
|
|
75
78
|
* Check if an action can be used.
|
|
76
79
|
* When used within an action, the result will automatically be processed.
|
|
@@ -119,6 +122,7 @@ export default class ActionExecutor<A extends Array<ActionArgument | ActionArgum
|
|
|
119
122
|
private executeInternal;
|
|
120
123
|
private createActionPacket;
|
|
121
124
|
private handleApiOnActionFailure;
|
|
125
|
+
protected handleReputationChange(human: Human): void;
|
|
122
126
|
private handleApi;
|
|
123
127
|
private canExecute;
|
|
124
128
|
private isUsableWhen;
|
|
@@ -21,7 +21,9 @@ import type NPC from "game/entity/npc/NPC";
|
|
|
21
21
|
import type { IPackedMessage } from "game/entity/player/IMessageManager";
|
|
22
22
|
import type { TurnTypeFlag } from "game/entity/player/IPlayer";
|
|
23
23
|
import type Player from "game/entity/player/Player";
|
|
24
|
+
import type { IIslandTemplate } from "game/IGame";
|
|
24
25
|
import type { Quality } from "game/IObject";
|
|
26
|
+
import type { Automation } from "game/island/automation/Automation";
|
|
25
27
|
import type Island from "game/island/Island";
|
|
26
28
|
import type { IContainer, ItemType } from "game/item/IItem";
|
|
27
29
|
import type Item from "game/item/Item";
|
|
@@ -226,6 +228,7 @@ export interface IActionDescription<A extends Array<ActionArgument | ActionArgum
|
|
|
226
228
|
* Check if the action has setup CanUse logic
|
|
227
229
|
*/
|
|
228
230
|
readonly hasSetCanUse: boolean;
|
|
231
|
+
getExample(executor: E, ...args: AV): IActionExample | undefined;
|
|
229
232
|
canUse(executor: E, ...args: AV): CU | IActionNotUsable;
|
|
230
233
|
/**
|
|
231
234
|
* Called internally during `execute`
|
|
@@ -243,6 +246,10 @@ export interface IActionDescription<A extends Array<ActionArgument | ActionArgum
|
|
|
243
246
|
* Called internally during `execute`
|
|
244
247
|
*/
|
|
245
248
|
confirmer?(actionApi: IActionConfirmerApi<E, CU>, ...args: AV): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* Called internally before `execute`
|
|
251
|
+
*/
|
|
252
|
+
exampleHandler?(actionApi: IActionExampleApi<E, CU>, ...args: AV): IActionExample;
|
|
246
253
|
skipConfirmation(): this;
|
|
247
254
|
clone(): IActionDescription<A, E, R, CU, AV>;
|
|
248
255
|
}
|
|
@@ -317,6 +324,13 @@ export interface IActionConfirmerApi<E extends Entity = Entity, CU extends IActi
|
|
|
317
324
|
*/
|
|
318
325
|
prompt<PROMPT extends IPromptDescriptionBase<any[]>>(prompt: PROMPT, ...args: PromptDescriptionArgs<PROMPT>): Promise<boolean>;
|
|
319
326
|
}
|
|
327
|
+
export interface IActionExampleApi<E extends Entity = Entity, CU extends IActionUsable = IActionUsable> extends IActionApi<E, CU> {
|
|
328
|
+
description: IActionDescription<Array<ActionArgument | ActionArgument[]>, E, any, CU, any[]>;
|
|
329
|
+
}
|
|
330
|
+
export interface IActionExample {
|
|
331
|
+
automation: Automation;
|
|
332
|
+
template: IIslandTemplate;
|
|
333
|
+
}
|
|
320
334
|
export interface IActionSoundEffect {
|
|
321
335
|
type: SfxType;
|
|
322
336
|
inFront?: boolean;
|
|
@@ -446,4 +460,5 @@ export interface ActionExecutorEvents {
|
|
|
446
460
|
*/
|
|
447
461
|
postExecuteAction<A extends Array<ActionArgument | ActionArgument[]> = Array<ActionArgument | ActionArgument[]>, E extends Entity = Entity, AV extends any[] = ActionArgumentTupleTypes<A>, CU extends IActionUsable = any>(actionType: ActionType, actionApi: IActionHandlerApi<E, CU>, args: AV): any;
|
|
448
462
|
}
|
|
463
|
+
export declare const defaultExampleIslandTemplate: IIslandTemplate;
|
|
449
464
|
export {};
|
|
@@ -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("
|
|
11
|
+
declare const _default: import("../Action").Action<[import("game/entity/action/IAction").ActionArgument.ItemNearby], import("../../Human").default<number>, void, import("game/entity/action/actions/ConsumeItem").IConsumeItemCanUse, [import("../../../item/Item").default]>;
|
|
12
12
|
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("
|
|
11
|
+
declare const _default: 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<number>, void, import("game/entity/action/actions/Attack").IAttackCanUse, [(import("../../../item/Item").default | undefined)?, (import("../../IEntity").AttackType | undefined)?, (import("../../../item/Item").default | undefined)?]>;
|
|
12
12
|
export default _default;
|
|
@@ -42,7 +42,7 @@ export default class NPCManager extends EntityManager<NPC> {
|
|
|
42
42
|
load(): void;
|
|
43
43
|
spawn(npcType: NPCType, tile: Tile, options?: INPCCanCreateOptions): NPC | undefined;
|
|
44
44
|
remove(npc: NPC): void;
|
|
45
|
-
addPlayerLike(npc: NPC): void;
|
|
45
|
+
addPlayerLike(npc: NPC, addToIsland?: boolean): void;
|
|
46
46
|
removePlayerLike(npc: NPC): void;
|
|
47
47
|
updateAll(): void;
|
|
48
48
|
/**
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { InspectType } from "game/inspection/IInspection";
|
|
12
12
|
import { InfoProvider } from "game/inspection/InfoProvider";
|
|
13
13
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
14
|
+
import LabelledValue from "game/inspection/infoProviders/LabelledValue";
|
|
14
15
|
import Inspection from "game/inspection/Inspection";
|
|
15
16
|
import { ItemType } from "game/item/IItem";
|
|
16
17
|
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
@@ -22,7 +23,7 @@ export default class RecipeInspection extends Inspection<ItemType> {
|
|
|
22
23
|
get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
|
|
23
24
|
private getDetails;
|
|
24
25
|
private isUnskilled;
|
|
25
|
-
|
|
26
|
+
protected getReputation(): LabelledValue | undefined;
|
|
26
27
|
private getDescription;
|
|
27
28
|
private getDoodadUses;
|
|
28
29
|
private getRequirements;
|
|
@@ -25,6 +25,6 @@ export default class SkillInspection extends Inspection<SkillType> {
|
|
|
25
25
|
get(context: InfoProviderContext): ArrayOr<TranslationGenerator | InfoProvider>;
|
|
26
26
|
private getCurrentValue;
|
|
27
27
|
private getDescription;
|
|
28
|
-
|
|
28
|
+
protected getReputationImpact(): 0 | import("../../../language/impl/TranslationImpl").default | undefined;
|
|
29
29
|
private getCanIncrease;
|
|
30
30
|
}
|
|
@@ -9,5 +9,9 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { ITileEventDescription } from "game/tile/ITileEvent";
|
|
12
|
-
|
|
12
|
+
import type TileEvent from "game/tile/TileEvent";
|
|
13
|
+
interface IFireDescription extends ITileEventDescription {
|
|
14
|
+
spread(tileEvent: TileEvent): void;
|
|
15
|
+
}
|
|
16
|
+
declare const fire: IFireDescription;
|
|
13
17
|
export default fire;
|
|
@@ -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 type
|
|
11
|
+
import { type Events, type IEventEmitter } from "event/EventEmitter";
|
|
12
12
|
import type { IIcon } from "game/inspection/InfoProvider";
|
|
13
13
|
import UiTranslation from "language/dictionary/UiTranslation";
|
|
14
14
|
import type { ISerializedTranslation } from "language/ITranslation";
|
|
@@ -123,8 +123,8 @@ declare abstract class Dialog extends Component implements IDialog {
|
|
|
123
123
|
private _footer?;
|
|
124
124
|
private readonly handles;
|
|
125
125
|
private readonly panels;
|
|
126
|
-
private currentPanel
|
|
127
|
-
private lastPanel
|
|
126
|
+
private currentPanel?;
|
|
127
|
+
private lastPanel?;
|
|
128
128
|
private cachedSnapPositions?;
|
|
129
129
|
private readonly activeReasons;
|
|
130
130
|
protected readonly scrollableHandler: void;
|
|
@@ -158,7 +158,7 @@ declare abstract class Dialog extends Component implements IDialog {
|
|
|
158
158
|
close(): Promise<boolean>;
|
|
159
159
|
protected onRemove1(): void;
|
|
160
160
|
addPanel(id: string | number): Component<HTMLElement>;
|
|
161
|
-
showPanel(id: string | number): Component<HTMLElement> | undefined;
|
|
161
|
+
showPanel(id: string | number, disableAnimations?: boolean): Component<HTMLElement> | undefined;
|
|
162
162
|
getPanel(id: string | number): Component<HTMLElement> | undefined;
|
|
163
163
|
isPanelVisible(id: string | number): boolean;
|
|
164
164
|
/**
|
|
@@ -29,6 +29,7 @@ export default abstract class TabDialog<T extends TabDialogPanel = TabDialogPane
|
|
|
29
29
|
protected activePanel: T | undefined;
|
|
30
30
|
protected storePanels: boolean;
|
|
31
31
|
constructor(id: DialogId, subId?: string, initializeSubpanels?: boolean);
|
|
32
|
+
protected onLoad(): void;
|
|
32
33
|
/**
|
|
33
34
|
* Implements the abstract method in "TabDialog". Returns an array of subpanels.
|
|
34
35
|
* This will only be called once
|
|
@@ -44,7 +45,7 @@ export default abstract class TabDialog<T extends TabDialogPanel = TabDialogPane
|
|
|
44
45
|
*/
|
|
45
46
|
protected abstract getSubpanelInformation(subpanels: T[]): SubpanelInformation[];
|
|
46
47
|
protected initializeSubpanels(): void;
|
|
47
|
-
protected getDefaultSubpanelInformation(): SubpanelInformation;
|
|
48
|
+
protected getDefaultSubpanelInformation(): SubpanelInformation | undefined;
|
|
48
49
|
/**
|
|
49
50
|
* Returns a function that will be executed when the passed subpanel is shown.
|
|
50
51
|
*
|
|
@@ -25,8 +25,9 @@ export default class QuestDialog extends Dialog {
|
|
|
25
25
|
constructor();
|
|
26
26
|
getBindable(): Bindable;
|
|
27
27
|
getIcon(): MenuBarButtonType;
|
|
28
|
+
protected onDialogLoad(): void;
|
|
28
29
|
protected onDialogRemove(): void;
|
|
29
|
-
showQuest(id: number): this;
|
|
30
|
+
showQuest(id: number, disableAnimations?: boolean): this;
|
|
30
31
|
protected onSwitchPanel(panelId: string | number): void;
|
|
31
32
|
private onQuestOrRequirementComplete;
|
|
32
33
|
private refreshFooter;
|
package/package.json
CHANGED