@wayward/types 2.13.0-beta.dev.20230510.1 → 2.13.0-beta.dev.20230512.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 +1 -1
- package/definitions/game/game/entity/npc/npcs/Merchant.d.ts +1 -0
- package/definitions/game/game/entity/player/Player.d.ts +7 -0
- package/definitions/game/game/mapping/Background.d.ts +1 -1
- package/definitions/game/game/mapping/Obfuscation.d.ts +1 -1
- package/definitions/game/game/milestones/IMilestone.d.ts +2 -1
- package/definitions/game/game/milestones/MilestoneDefinition.d.ts +2 -0
- package/definitions/game/game/milestones/MilestoneManager.d.ts +1 -1
- package/definitions/game/language/LanguageManager.d.ts +2 -0
- package/definitions/game/multiplayer/packets/server/{UpdateDialogInfoPacket.d.ts → UpdateUiInfoPacket.d.ts} +9 -2
- package/definitions/game/renderer/fieldOfView/FieldOfView.d.ts +1 -1
- package/definitions/game/ui/component/Text.d.ts +5 -2
- package/definitions/game/ui/old/screens/InGameScreen.d.ts +2 -1
- package/definitions/game/ui/screen/screens/GameScreen.d.ts +5 -1
- package/definitions/game/ui/screen/screens/game/component/Dialog.d.ts +3 -0
- package/definitions/game/ui/screen/screens/game/component/GameDetails.d.ts +3 -10
- package/definitions/game/ui/screen/screens/game/component/PopupOverlay.d.ts +31 -0
- package/definitions/game/ui/screen/screens/game/dialog/CraftingDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/EquipmentDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/IslandsSailDialog.d.ts +4 -0
- package/definitions/game/ui/screen/screens/game/dialog/MessagesDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/NotesDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/QuestDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/QuickSettingsDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/SkillsDialog.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/dialog/islands/IslandsDialog.d.ts +0 -2
- package/definitions/game/ui/screen/screens/game/static/menubar/IMenuBarButton.d.ts +3 -1
- package/definitions/game/ui/screen/screens/game/static/stats/IStatDisplayDescription.d.ts +26 -1
- package/definitions/game/ui/screen/screens/game/static/stats/Reputation.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/static/stats/StatDisplayDescriptions.d.ts +2 -25
- package/definitions/game/ui/screen/screens/game/static/stats/component/Stat.d.ts +5 -2
- package/definitions/test/core/applicationInteractions.d.ts +3 -3
- package/package.json +1 -1
|
@@ -165,7 +165,7 @@ export declare class Game extends EventEmitter.Host<IGameEvents> {
|
|
|
165
165
|
updateGameOptions(gameOptions: IGameOptions): void;
|
|
166
166
|
initializeGameOptions(seed: string | number, mode?: GameMode, options?: IGameOptions, milestoneModifiers?: Set<Milestone>): void;
|
|
167
167
|
initializeModifiers(): void;
|
|
168
|
-
getMovementTime(delay: Delay | number): IMovementTime;
|
|
168
|
+
getMovementTime(delay: Delay | number, timestamp?: number): IMovementTime;
|
|
169
169
|
getMovementProgress(timeStamp: number, movementTime: IMovementTime | undefined): number;
|
|
170
170
|
getSynchronizeState(identifier: string): ISynchronizeState;
|
|
171
171
|
synchronizeState(synchronizeState: ISynchronizeState): void;
|
|
@@ -53,6 +53,7 @@ export default class MerchantNPC extends NPC {
|
|
|
53
53
|
protected getDefaultEquipment(equipType: EquipType): Item | ItemType | undefined;
|
|
54
54
|
protected getDefaultInventory(): Array<Item | ItemType>;
|
|
55
55
|
protected getDefaultAiType(): AiType;
|
|
56
|
+
protected onSpawn(): void;
|
|
56
57
|
private canSpawnItem;
|
|
57
58
|
protected runActions(): boolean;
|
|
58
59
|
get asMerchant(): MerchantNPC;
|
|
@@ -88,7 +88,14 @@ export default class Player extends Human implements IPreSerializeCallback, IUns
|
|
|
88
88
|
*/
|
|
89
89
|
prompt(type: Prompt, ...args: any[]): Promise<boolean | InterruptChoice>;
|
|
90
90
|
updateActionSlots(slots: number[], data: IActionBarSlotData[], enabled?: boolean): void;
|
|
91
|
+
/**
|
|
92
|
+
* Send a packet to the server about the dialog info for the dialog
|
|
93
|
+
*/
|
|
91
94
|
updateDialogInfo(dialogIndex: string | number | undefined): void;
|
|
95
|
+
/**
|
|
96
|
+
* Send a packet to the server about the sort info for the container
|
|
97
|
+
*/
|
|
98
|
+
updateContainerSortInfo(dialogIndex: string | number): void;
|
|
92
99
|
getDialogInfo(dialogIndex: string | number): IDialogInfo | undefined;
|
|
93
100
|
kill(): void;
|
|
94
101
|
respawn(reset: boolean): void;
|
|
@@ -13,7 +13,7 @@ export type CanvasImage = HTMLImageElement | HTMLCanvasElement | ImageBitmap;
|
|
|
13
13
|
export default class MapBackground {
|
|
14
14
|
private readonly seed?;
|
|
15
15
|
private readonly canvas;
|
|
16
|
-
constructor(radius: number, seed?:
|
|
16
|
+
constructor(radius: number, seed?: Uint16Array | undefined);
|
|
17
17
|
render(mapImage: CanvasImage, theme: DrawnMapTheme): Promise<HTMLCanvasElement>;
|
|
18
18
|
private lastTheme?;
|
|
19
19
|
private renderBackground;
|
|
@@ -13,7 +13,7 @@ import type { DrawnMapTheme } from "game/mapping/IMapRender";
|
|
|
13
13
|
export default class Obfuscation {
|
|
14
14
|
private readonly seed?;
|
|
15
15
|
private readonly canvas;
|
|
16
|
-
constructor(radius: number, seed?:
|
|
16
|
+
constructor(radius: number, seed?: Uint16Array | undefined);
|
|
17
17
|
obfuscate(mapImage: CanvasImage, obfuscation: number, theme: DrawnMapTheme): Promise<HTMLCanvasElement>;
|
|
18
18
|
private render;
|
|
19
19
|
}
|
|
@@ -59,7 +59,8 @@ export declare enum Milestone {
|
|
|
59
59
|
Murderer = 47,
|
|
60
60
|
Retailer = 48,
|
|
61
61
|
Masochist = 49,
|
|
62
|
-
Versatile = 50
|
|
62
|
+
Versatile = 50,
|
|
63
|
+
InternalStatDiscovery = 51
|
|
63
64
|
}
|
|
64
65
|
export type ExcludeInternalMilestones<MILESTONE extends Milestone> = PickValueKeys<typeof Milestone, MILESTONE> extends `Internal${string}` ? never : MILESTONE;
|
|
65
66
|
export declare enum MilestoneVisibility {
|
|
@@ -66,4 +66,6 @@ export default class MilestoneDefinition {
|
|
|
66
66
|
setNotDisabledByMods(): this;
|
|
67
67
|
unlockedHandler?: (tellPlayer: () => void) => any;
|
|
68
68
|
onUnlocked(handler: (tellPlayer: () => void) => any): this;
|
|
69
|
+
progressHandler?: (newData?: string | number) => any;
|
|
70
|
+
onProgress(handler: (newData?: string | number) => any): this;
|
|
69
71
|
}
|
|
@@ -20,7 +20,7 @@ export interface IMilestoneEvents {
|
|
|
20
20
|
* @param value The new value for this milestone
|
|
21
21
|
* @param max The max value for this milestone
|
|
22
22
|
*/
|
|
23
|
-
update(milestone: Milestone, value: number, max: number): void;
|
|
23
|
+
update(milestone: Milestone, value: number, max: number, newData?: string | number): void;
|
|
24
24
|
}
|
|
25
25
|
export declare class MilestoneManager extends EventEmitter.Host<IMilestoneEvents> {
|
|
26
26
|
private readonly game;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "event/EventEmitter";
|
|
12
|
+
import type { IIcon } from "game/inspection/InfoProvider";
|
|
12
13
|
import Dictionary from "language/Dictionary";
|
|
13
14
|
import Language from "language/Language";
|
|
14
15
|
import LanguageExtension from "language/LanguageExtension";
|
|
@@ -101,5 +102,6 @@ export interface ITranslationInjection {
|
|
|
101
102
|
selector: string;
|
|
102
103
|
translation: TranslationGenerator;
|
|
103
104
|
type?: "title" | "generic";
|
|
105
|
+
icon?: IIcon;
|
|
104
106
|
}
|
|
105
107
|
export {};
|
|
@@ -9,10 +9,17 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import PlayerTargetedServerPacket from "multiplayer/packets/PlayerTargetedServerPacket";
|
|
12
|
-
import type { IDialogInfo } from "ui/old/IOldUi";
|
|
13
|
-
export
|
|
12
|
+
import type { IContainerSortInfo, IDialogInfo } from "ui/old/IOldUi";
|
|
13
|
+
export declare enum UpdateUiInfoPacketType {
|
|
14
|
+
DialogInfo = 0,
|
|
15
|
+
DialogContainerInfo = 1,
|
|
16
|
+
ContainerSortInfo = 2
|
|
17
|
+
}
|
|
18
|
+
export default class UpdateUiInfoPacket extends PlayerTargetedServerPacket {
|
|
19
|
+
type: UpdateUiInfoPacketType;
|
|
14
20
|
index: string | number;
|
|
15
21
|
info: IDialogInfo;
|
|
22
|
+
containerSortInfo: IContainerSortInfo;
|
|
16
23
|
getDebugInfo(): string;
|
|
17
24
|
isSyncCheckEnabled(): boolean;
|
|
18
25
|
isAllowedWhenPaused(): boolean;
|
|
@@ -48,7 +48,7 @@ export default class FieldOfView extends EventEmitter.Host<IFieldOfViewEvents> {
|
|
|
48
48
|
texLight: WebGLTexture | undefined;
|
|
49
49
|
texLightOld: WebGLTexture | undefined;
|
|
50
50
|
private seed;
|
|
51
|
-
private
|
|
51
|
+
private transitionMovementTime;
|
|
52
52
|
private readonly transitioningExploredMap;
|
|
53
53
|
private lastComputedIslandId;
|
|
54
54
|
static initializePrograms(webGlContext: WebGlContext): Promise<void>;
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { Events, IEventEmitter } from "event/EventEmitter";
|
|
12
12
|
import type { EmitterOrBus, Event, Handler } from "event/EventManager";
|
|
13
|
+
import type { IIcon } from "game/inspection/InfoProvider";
|
|
13
14
|
import UiTranslation from "language/dictionary/UiTranslation";
|
|
15
|
+
import type { TranslationArg } from "language/ITranslation";
|
|
14
16
|
import type { IBindingsSection } from "language/segment/BindSegment";
|
|
15
17
|
import type { IColorSection } from "language/segment/ColorSegment";
|
|
16
18
|
import type { IHeadingSection } from "language/segment/HeadingSegment";
|
|
@@ -24,9 +26,9 @@ import type { IInput, Modifier } from "ui/input/IInput";
|
|
|
24
26
|
import type Tooltip from "ui/tooltip/Tooltip";
|
|
25
27
|
import type { IReferenceSection, ISegment, IStringSection } from "utilities/string/Interpolator";
|
|
26
28
|
export default class Text extends Component {
|
|
27
|
-
static resolve(translation: TranslationGenerator | undefined, additionalSegments?: ISegment[], ...args:
|
|
29
|
+
static resolve(translation: TranslationGenerator | undefined, additionalSegments?: ISegment[], ...args: TranslationArg[]): IStringSection[];
|
|
28
30
|
private static areIdenticalSections;
|
|
29
|
-
static toString(translation: TranslationGenerator | undefined, additionalSegments?: ISegment[]): string;
|
|
31
|
+
static toString(translation: TranslationGenerator | undefined, additionalSegments?: ISegment[], ...args: TranslationArg[]): string;
|
|
30
32
|
private segments;
|
|
31
33
|
private text?;
|
|
32
34
|
private args?;
|
|
@@ -84,6 +86,7 @@ export interface IBasicTextEvents extends Events<Component> {
|
|
|
84
86
|
handleLink(link: BasicTextLink): true | void;
|
|
85
87
|
}
|
|
86
88
|
export declare class BasicText extends Component {
|
|
89
|
+
static applyIcon(component?: Component, icon?: IIcon): void;
|
|
87
90
|
event: IEventEmitter<this, IBasicTextEvents>;
|
|
88
91
|
private _link;
|
|
89
92
|
inputIndex?: number;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type Doodad from "game/doodad/Doodad";
|
|
12
12
|
import type NPC from "game/entity/npc/NPC";
|
|
13
|
+
import type NPCManager from "game/entity/npc/NPCManager";
|
|
13
14
|
import type { ContainerReference, DisplayableItemType, IContainer, IDismantleComponent } from "game/item/IItem";
|
|
14
15
|
import { ItemType } from "game/item/IItem";
|
|
15
16
|
import type { IMoveItemOptions } from "game/item/IItemManager";
|
|
@@ -162,6 +163,7 @@ export default class InGameScreen extends BaseScreen {
|
|
|
162
163
|
completeAddingMultipleItemsToContainer(container: IContainer, itemsToSync?: Item[]): void;
|
|
163
164
|
onContainerItemAdd(itemManager: ItemManager, itemsAdded: Item[], container: IContainer, options?: IMoveItemOptions, customOptions?: IOldUiContainerItemAdd): void;
|
|
164
165
|
protected onContainerItemRemove(itemManager: ItemManager, itemsRemoved: Item[], containerRemovedFrom?: IContainer): void;
|
|
166
|
+
protected onNpcRemove(npcManager: NPCManager, npc: NPC): void;
|
|
165
167
|
refreshContainerName(container: IContainer, nestedUpdate?: boolean): void;
|
|
166
168
|
getInventoryItemsInOrder(): any[];
|
|
167
169
|
saveItemOrder(containerElement: JQuery, activeSort?: boolean): void;
|
|
@@ -236,7 +238,6 @@ export default class InGameScreen extends BaseScreen {
|
|
|
236
238
|
onDropItem(api: IBindHandlerApi): boolean;
|
|
237
239
|
onReleaseDrop(): void;
|
|
238
240
|
onMoreInformation(api: IBindHandlerApi): boolean;
|
|
239
|
-
onDismantleTab(): boolean;
|
|
240
241
|
private isOverlayVisible;
|
|
241
242
|
private readonly onInterrupt;
|
|
242
243
|
private readonly onInterruptClosed;
|
|
@@ -49,7 +49,9 @@ export default class GameScreen extends Screen {
|
|
|
49
49
|
private readonly gameCanvas;
|
|
50
50
|
private readonly effects;
|
|
51
51
|
private readonly placeholders;
|
|
52
|
-
private readonly
|
|
52
|
+
private readonly popupOverlayWrapper;
|
|
53
|
+
private islandIntroPopupOverlay?;
|
|
54
|
+
private readonly pausedPopupOverlay;
|
|
53
55
|
private readonly buttonRespawn;
|
|
54
56
|
constructor();
|
|
55
57
|
getQuadrantComponents(): import("@wayward/goodstream").default<QuadrantComponent>;
|
|
@@ -57,6 +59,8 @@ export default class GameScreen extends Screen {
|
|
|
57
59
|
getQuadrantContainer(): Component<HTMLElement>;
|
|
58
60
|
isMouseWithin(): Component<HTMLElement> | undefined;
|
|
59
61
|
mouseStartWasWithin(api: IBindHandlerApi): boolean | undefined;
|
|
62
|
+
private readonly cinematicModeReasons;
|
|
63
|
+
toggleCinematicMode(enabled: boolean, reason: string): this;
|
|
60
64
|
onGameStart(game: Game, _isLoadingSave: boolean, _playedCount: number): void;
|
|
61
65
|
onLoadedOnIsland(player: Player, island: Island): void;
|
|
62
66
|
private showIslandIntro;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import type { Events, IEventEmitter } from "event/EventEmitter";
|
|
12
|
+
import type { IIcon } from "game/inspection/InfoProvider";
|
|
12
13
|
import UiTranslation from "language/dictionary/UiTranslation";
|
|
13
14
|
import type { ISerializedTranslation } from "language/ITranslation";
|
|
14
15
|
import Translation from "language/Translation";
|
|
@@ -21,6 +22,7 @@ import type Bindable from "ui/input/Bindable";
|
|
|
21
22
|
import type { IDialogDescription } from "ui/screen/screens/game/Dialogs";
|
|
22
23
|
import { DialogId, Edge } from "ui/screen/screens/game/Dialogs";
|
|
23
24
|
import type { IDialog } from "ui/screen/screens/game/IGameScreenApi";
|
|
25
|
+
import type { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
24
26
|
import type TooltipLocationHandler from "ui/tooltip/TooltipLocationHandler";
|
|
25
27
|
import type { IDraggableEvents } from "ui/util/Draggable";
|
|
26
28
|
import Draggable from "ui/util/Draggable";
|
|
@@ -190,6 +192,7 @@ declare abstract class Dialog extends Component implements IDialog {
|
|
|
190
192
|
*/
|
|
191
193
|
getName(): Translation | UiTranslation | ISerializedTranslation | undefined;
|
|
192
194
|
getBindable(): Bindable | undefined;
|
|
195
|
+
getIcon(): MenuBarButtonType | IIcon | undefined;
|
|
193
196
|
/**
|
|
194
197
|
* Event handler for when this dialog is appended
|
|
195
198
|
*/
|
|
@@ -13,28 +13,25 @@ import type Island from "game/island/Island";
|
|
|
13
13
|
import Component from "ui/component/Component";
|
|
14
14
|
import type { IGameIconsHost, IGameModifiersHost } from "ui/component/GameIcons";
|
|
15
15
|
import GameIcons, { GameModifiers } from "ui/component/GameIcons";
|
|
16
|
-
import
|
|
16
|
+
import PopupOverlay from "ui/screen/screens/game/component/PopupOverlay";
|
|
17
17
|
import type { IGameOptionsIcon } from "ui/screen/screens/menu/menus/pause/GameOptionsIcons";
|
|
18
18
|
import { GameOptionsIcon } from "ui/screen/screens/menu/menus/pause/GameOptionsIcons";
|
|
19
19
|
import type Tooltip from "ui/tooltip/Tooltip";
|
|
20
|
-
export declare class GameDetails extends
|
|
20
|
+
export declare class GameDetails extends PopupOverlay implements IGameIconsHost, IGameModifiersHost {
|
|
21
21
|
get difficulty(): import("../../../../../game/options/IGameOptions").GameMode;
|
|
22
22
|
get pvp(): boolean;
|
|
23
23
|
get mods(): [string, import("ui/util/Misc").ModLoadability][];
|
|
24
24
|
get friends(): ISteamFriend[];
|
|
25
|
-
islandName: IslandName;
|
|
26
25
|
readonly gameModifiers: GameModifiers;
|
|
27
26
|
readonly gameIcons: GameIcons;
|
|
28
27
|
questsWrapper?: Component;
|
|
29
28
|
private refreshGameIconsTimeout?;
|
|
30
29
|
private steamworksFriends;
|
|
31
30
|
constructor(island: Island);
|
|
32
|
-
lockHidden(): this;
|
|
33
|
-
show(): this;
|
|
34
31
|
setHasLabels(hasLabels?: boolean): this;
|
|
35
32
|
setHasQuests(hasQuests?: boolean): this;
|
|
36
33
|
hasIcons(): boolean;
|
|
37
|
-
refresh():
|
|
34
|
+
refresh(): this;
|
|
38
35
|
getOptionsIconTooltipHandler(icon: GameOptionsIcon, description: IGameOptionsIcon): ((tooltip: Tooltip) => any) | undefined;
|
|
39
36
|
getOptionsIcons(): [GameOptionsIcon, IGameOptionsIcon][];
|
|
40
37
|
getChallengeModifiers(): import("../../../../../game/options/modifiers/challenge/IChallenge").Challenge[];
|
|
@@ -43,7 +40,3 @@ export declare class GameDetails extends Component implements IGameIconsHost, IG
|
|
|
43
40
|
protected refreshGameIcons(): void;
|
|
44
41
|
private refreshQuests;
|
|
45
42
|
}
|
|
46
|
-
export declare class IslandName extends Heading {
|
|
47
|
-
constructor();
|
|
48
|
-
setIsland(island: Island): void;
|
|
49
|
-
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 Component from "ui/component/Component";
|
|
12
|
+
import type { TranslationGenerator } from "ui/component/IComponent";
|
|
13
|
+
export declare enum PopupOverlayClasses {
|
|
14
|
+
Main = "popup-overlay",
|
|
15
|
+
Title = "popup-overlay-title",
|
|
16
|
+
TitleWord = "popup-overlay-title-word",
|
|
17
|
+
TitleChar = "popup-overlay-title-char"
|
|
18
|
+
}
|
|
19
|
+
export default class PopupOverlay extends Component {
|
|
20
|
+
title?: PopupOverlayTitle;
|
|
21
|
+
constructor();
|
|
22
|
+
private translation?;
|
|
23
|
+
setTitle(title: TranslationGenerator | string): this;
|
|
24
|
+
refresh(): this;
|
|
25
|
+
lockHidden(): this;
|
|
26
|
+
show(): this;
|
|
27
|
+
}
|
|
28
|
+
export declare class PopupOverlayTitle extends Component {
|
|
29
|
+
constructor();
|
|
30
|
+
setText(text: string): void;
|
|
31
|
+
}
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { IContainer } from "game/item/IItem";
|
|
12
12
|
import type Item from "game/item/Item";
|
|
13
|
+
import Bindable from "ui/input/Bindable";
|
|
13
14
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
15
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
14
16
|
export default class CraftingDialog extends Dialog {
|
|
15
17
|
private readonly craftableRecipes;
|
|
16
18
|
private accessible;
|
|
17
19
|
private readonly sort;
|
|
18
20
|
private readonly craftableWrapper;
|
|
19
21
|
constructor();
|
|
22
|
+
getBindable(): Bindable;
|
|
23
|
+
getIcon(): MenuBarButtonType;
|
|
20
24
|
protected updateCraftableInventories(): void;
|
|
21
25
|
protected onContainerItemAdd(_: any, items: Item[], container: IContainer): void;
|
|
22
26
|
protected onInventoryItemAdd(_: any, items: Item[]): void;
|
|
@@ -17,6 +17,7 @@ import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
|
17
17
|
import type { IItemDropApi, IItemPickUpApi, ItemSlot } from "ui/screen/screens/game/component/Item";
|
|
18
18
|
import ItemComponent, { ItemRefreshType } from "ui/screen/screens/game/component/Item";
|
|
19
19
|
import EquipmentSlotTooltipHandler from "ui/screen/screens/game/dialog/equipment/EquipmentSlotTooltip";
|
|
20
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
20
21
|
export declare enum EquipmentClasses {
|
|
21
22
|
Main = "game-dialog-equipment",
|
|
22
23
|
Body = "game-dialog-equipment-body",
|
|
@@ -34,7 +35,8 @@ export default class EquipmentDialog extends Dialog {
|
|
|
34
35
|
readonly slots: Component<HTMLElement>;
|
|
35
36
|
readonly tooltipHandler: EquipmentSlotTooltipHandler;
|
|
36
37
|
constructor();
|
|
37
|
-
getBindable(): Bindable
|
|
38
|
+
getBindable(): Bindable;
|
|
39
|
+
getIcon(): MenuBarButtonType;
|
|
38
40
|
protected onClearActionSlot(api: IBindHandlerApi): boolean;
|
|
39
41
|
}
|
|
40
42
|
export declare class EquipmentSlot extends ItemComponent {
|
|
@@ -12,11 +12,15 @@ import type { IIslandPort } from "game/island/IIsland";
|
|
|
12
12
|
import type Island from "game/island/Island";
|
|
13
13
|
import Button from "ui/component/Button";
|
|
14
14
|
import type Component from "ui/component/Component";
|
|
15
|
+
import Bindable from "ui/input/Bindable";
|
|
15
16
|
import IslandsDialog from "ui/screen/screens/game/dialog/islands/IslandsDialog";
|
|
17
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
16
18
|
export default class IslandsSailDialog extends IslandsDialog {
|
|
17
19
|
closeOnTravel: boolean;
|
|
18
20
|
constructor();
|
|
19
21
|
protected createExecuteButton(port?: IIslandPort): Button;
|
|
22
|
+
getBindable(): Bindable;
|
|
23
|
+
getIcon(): MenuBarButtonType;
|
|
20
24
|
protected onAppend(): void;
|
|
21
25
|
protected initializeSettingsPanel(panel: Component): void;
|
|
22
26
|
protected onChangedSelectedIsland(animate?: boolean): void;
|
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import Bindable from "ui/input/Bindable";
|
|
12
12
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
13
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
13
14
|
export default class MessagesDialog extends Dialog {
|
|
14
15
|
constructor();
|
|
15
|
-
getBindable(): Bindable
|
|
16
|
+
getBindable(): Bindable;
|
|
17
|
+
getIcon(): MenuBarButtonType;
|
|
16
18
|
protected onAppend2(): void;
|
|
17
19
|
protected willRemove(): void;
|
|
18
20
|
private onFocus;
|
|
@@ -12,11 +12,13 @@ import type Player from "game/entity/player/Player";
|
|
|
12
12
|
import { Milestone } from "game/milestones/IMilestone";
|
|
13
13
|
import Bindable from "ui/input/Bindable";
|
|
14
14
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
15
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
15
16
|
export default class MilestonesDialog extends Dialog {
|
|
16
17
|
private readonly milestones;
|
|
17
18
|
private readonly sortRow;
|
|
18
19
|
constructor();
|
|
19
|
-
getBindable(): Bindable
|
|
20
|
+
getBindable(): Bindable;
|
|
21
|
+
getIcon(): MenuBarButtonType;
|
|
20
22
|
onPlayerChangeTitle(player: Player, milestone?: Milestone): void;
|
|
21
23
|
onMilestoneUpdate(_: any, milestone: Milestone): void;
|
|
22
24
|
private sort;
|
|
@@ -12,6 +12,7 @@ import type { Events, IEventEmitter } from "event/EventEmitter";
|
|
|
12
12
|
import type Player from "game/entity/player/Player";
|
|
13
13
|
import Bindable from "ui/input/Bindable";
|
|
14
14
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
15
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
15
16
|
interface INotesDialogEvents extends Events<Dialog> {
|
|
16
17
|
/**
|
|
17
18
|
* @param noteId The note that was shown
|
|
@@ -26,7 +27,8 @@ export default class NotesDialog extends Dialog {
|
|
|
26
27
|
private note;
|
|
27
28
|
private current;
|
|
28
29
|
constructor();
|
|
29
|
-
getBindable(): Bindable
|
|
30
|
+
getBindable(): Bindable;
|
|
31
|
+
getIcon(): MenuBarButtonType;
|
|
30
32
|
onWrittenNote(_player: Player, _id: number): void;
|
|
31
33
|
showNote(noteId: number): this;
|
|
32
34
|
showFirstUnreadNote(): void;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import Bindable from "ui/input/Bindable";
|
|
12
12
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
13
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
13
14
|
export default class QuestDialog extends Dialog {
|
|
14
15
|
private readonly questsActiveWrapper;
|
|
15
16
|
private readonly questsActiveHeading;
|
|
@@ -22,7 +23,8 @@ export default class QuestDialog extends Dialog {
|
|
|
22
23
|
private readonly completeQuestButton;
|
|
23
24
|
private current;
|
|
24
25
|
constructor();
|
|
25
|
-
getBindable(): Bindable
|
|
26
|
+
getBindable(): Bindable;
|
|
27
|
+
getIcon(): MenuBarButtonType;
|
|
26
28
|
protected onDialogRemove(): void;
|
|
27
29
|
showQuest(id: number): this;
|
|
28
30
|
protected onSwitchPanel(panelId: string | number): void;
|
|
@@ -11,10 +11,12 @@
|
|
|
11
11
|
import type { IRefreshable } from "ui/component/Refreshable";
|
|
12
12
|
import Bindable from "ui/input/Bindable";
|
|
13
13
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
14
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
14
15
|
export default class QuickSettingsDialog extends Dialog implements IRefreshable {
|
|
15
16
|
private readonly refreshables;
|
|
16
17
|
constructor();
|
|
17
|
-
getBindable(): Bindable
|
|
18
|
+
getBindable(): Bindable;
|
|
19
|
+
getIcon(): MenuBarButtonType;
|
|
18
20
|
refresh(): this;
|
|
19
21
|
private addRefreshable;
|
|
20
22
|
}
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import Bindable from "ui/input/Bindable";
|
|
12
12
|
import Dialog from "ui/screen/screens/game/component/Dialog";
|
|
13
|
+
import { MenuBarButtonType } from "ui/screen/screens/game/static/menubar/IMenuBarButton";
|
|
13
14
|
export default class SkillsDialog extends Dialog {
|
|
14
15
|
private readonly skills;
|
|
15
16
|
private readonly inputFilter;
|
|
16
17
|
private readonly sortRow;
|
|
17
18
|
constructor();
|
|
18
|
-
getBindable(): Bindable
|
|
19
|
+
getBindable(): Bindable;
|
|
20
|
+
getIcon(): MenuBarButtonType;
|
|
19
21
|
protected onDialogRemove(): void;
|
|
20
22
|
private updateSkill;
|
|
21
23
|
private sort;
|
|
@@ -14,7 +14,6 @@ import type Island from "game/island/Island";
|
|
|
14
14
|
import type Button from "ui/component/Button";
|
|
15
15
|
import Component from "ui/component/Component";
|
|
16
16
|
import Input from "ui/component/Input";
|
|
17
|
-
import Bindable from "ui/input/Bindable";
|
|
18
17
|
import CanvasDialog from "ui/screen/screens/game/component/CanvasDialog";
|
|
19
18
|
import type { DialogId } from "ui/screen/screens/game/Dialogs";
|
|
20
19
|
import type { IVector2 } from "utilities/math/IVector";
|
|
@@ -50,7 +49,6 @@ export default abstract class IslandsDialog extends CanvasDialog {
|
|
|
50
49
|
readonly portsWrapper: Component<HTMLElement>;
|
|
51
50
|
readonly ports: IIslandsDialogPort[];
|
|
52
51
|
constructor(dialogId: DialogId, options: IIslandDialogOptions);
|
|
53
|
-
getBindable(): Bindable | undefined;
|
|
54
52
|
protected get island(): Island | undefined;
|
|
55
53
|
selectIsland(x: number, y: number): void;
|
|
56
54
|
protected onLoad(initial: boolean): Promise<void>;
|
|
@@ -30,7 +30,8 @@ export declare enum MenuBarButtonType {
|
|
|
30
30
|
Equipment = 11,
|
|
31
31
|
Skills = 12,
|
|
32
32
|
Islands = 13,
|
|
33
|
-
ActionsItems = 14
|
|
33
|
+
ActionsItems = 14,
|
|
34
|
+
Dismantle = 15
|
|
34
35
|
}
|
|
35
36
|
export declare const DEFAULT_MENU_BAR_BUTTON_ORDER: {
|
|
36
37
|
0: number;
|
|
@@ -48,6 +49,7 @@ export declare const DEFAULT_MENU_BAR_BUTTON_ORDER: {
|
|
|
48
49
|
12: number;
|
|
49
50
|
13: number;
|
|
50
51
|
14: number;
|
|
52
|
+
15: number;
|
|
51
53
|
};
|
|
52
54
|
export interface IMenuBarButtonDescription extends IModdable, IHasImagePath {
|
|
53
55
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { IHasImagePath } from "game/IObject";
|
|
12
12
|
import type EntityWithStats from "game/entity/EntityWithStats";
|
|
13
|
-
import type { IStat, StatDisplayType } from "game/entity/IStats";
|
|
13
|
+
import type { IStat, IStatBase, StatDisplayType } from "game/entity/IStats";
|
|
14
14
|
import type { Reference } from "game/reference/IReferenceManager";
|
|
15
15
|
import type { IModdable } from "mod/ModRegistry";
|
|
16
16
|
import type Component from "ui/component/Component";
|
|
@@ -60,3 +60,28 @@ export interface IStatDisplayDescription extends IModdable, IHasImagePath<string
|
|
|
60
60
|
subscribeCalculateEquipmentStats?: true;
|
|
61
61
|
}
|
|
62
62
|
export declare const STAT_DEFAULT_DISPLAY_ORDER = 100;
|
|
63
|
+
export interface IStatInfo extends Partial<IStatBase> {
|
|
64
|
+
value: number;
|
|
65
|
+
percent: number;
|
|
66
|
+
oldValue?: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns a `IStatDescription["onChange"]` handler that will check a predicate and run the handler with the result of that predicate.
|
|
70
|
+
* @param predicate A function that takes an `IStatInfo` object and returns whether it "matches".
|
|
71
|
+
* @param handler A function that takes whether the info matches, the `statElement`, the entity, and the `IStatInfo` object and "handles" it.
|
|
72
|
+
*/
|
|
73
|
+
export declare function when(predicate: (info: IStatInfo, entity: EntityWithStats) => boolean, handler: (matched: boolean, statElement: Component, entity: EntityWithStats, info: IStatInfo) => any): (statElement: Component, entity: EntityWithStats, stat: IStat, oldValue?: number) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Returns a `when()` handler that will toggle classes on a `statElement` based on whether the `predicate` matched.
|
|
76
|
+
*/
|
|
77
|
+
export declare function toggleClasses(...classes: string[]): (matched: boolean, statElement: Component) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Returns a `when()` handler that will discover a stat when the `predicate` matches.
|
|
80
|
+
*/
|
|
81
|
+
export declare function discover(matched: boolean, statElement: Component, entity: EntityWithStats, stat: IStatInfo): void;
|
|
82
|
+
/**
|
|
83
|
+
* Shakes the stat element if `shouldShake` is true, otherwise removes the `shake` class.
|
|
84
|
+
*
|
|
85
|
+
* When adding the `shake` class, removes it after 250 ms.
|
|
86
|
+
*/
|
|
87
|
+
export declare function shake(shouldShake: boolean, statElement: Component): Promise<void>;
|
|
@@ -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 type
|
|
11
|
+
import { type IStatDisplayDescription } from "ui/screen/screens/game/static/stats/IStatDisplayDescription";
|
|
12
12
|
declare const reputation: IStatDisplayDescription;
|
|
13
13
|
export default reputation;
|
|
@@ -8,30 +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 EntityWithStats from "game/entity/EntityWithStats";
|
|
12
|
-
import type { IStat, IStatBase } from "game/entity/IStats";
|
|
13
11
|
import { Stat } from "game/entity/IStats";
|
|
14
|
-
import type
|
|
15
|
-
|
|
12
|
+
import { discover, shake, toggleClasses, when, type IStatDisplayDescription } from "ui/screen/screens/game/static/stats/IStatDisplayDescription";
|
|
13
|
+
export { discover, shake, toggleClasses, when };
|
|
16
14
|
export declare const statDisplayDescriptions: Map<Stat, IStatDisplayDescription>;
|
|
17
|
-
export interface IStatInfo extends Partial<IStatBase> {
|
|
18
|
-
value: number;
|
|
19
|
-
percent: number;
|
|
20
|
-
oldValue?: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Returns a `IStatDescription["onChange"]` handler that will check a predicate and run the handler with the result of that predicate.
|
|
24
|
-
* @param predicate A function that takes an `IStatInfo` object and returns whether it "matches".
|
|
25
|
-
* @param handler A function that takes whether the info matches, the `statElement`, the entity, and the `IStatInfo` object and "handles" it.
|
|
26
|
-
*/
|
|
27
|
-
export declare function when(predicate: (info: IStatInfo) => boolean, handler: (matched: boolean, statElement: Component, entity: EntityWithStats, info: IStatInfo) => any): (statElement: Component, entity: EntityWithStats, stat: IStat, oldValue?: number) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Returns a `when()` handler that will toggle classes on a `statElement` based on whether the `predicate` matched.
|
|
30
|
-
*/
|
|
31
|
-
export declare function toggleClasses(...classes: string[]): (matched: boolean, statElement: Component) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Shakes the stat element if `shouldShake` is true, otherwise removes the `shake` class.
|
|
34
|
-
*
|
|
35
|
-
* When adding the `shake` class, removes it after 250 ms.
|
|
36
|
-
*/
|
|
37
|
-
export declare function shake(shouldShake: boolean, statElement: Component): Promise<void>;
|
|
@@ -45,7 +45,8 @@ export declare abstract class StatComponent extends Component {
|
|
|
45
45
|
* Returns the display priority for this stat.
|
|
46
46
|
*/
|
|
47
47
|
getDisplayOrder(): number;
|
|
48
|
-
abstract
|
|
48
|
+
abstract getTextElement(): Text;
|
|
49
|
+
abstract getDisplayElement(): Component;
|
|
49
50
|
/**
|
|
50
51
|
* Returns the generic string representation of this stat.
|
|
51
52
|
*/
|
|
@@ -76,7 +77,8 @@ export declare class Statbar extends StatComponent {
|
|
|
76
77
|
private readonly bar;
|
|
77
78
|
private readonly text;
|
|
78
79
|
constructor(entity: EntityWithStats, stat: Stat, noEvents?: true);
|
|
79
|
-
|
|
80
|
+
getTextElement(): Text;
|
|
81
|
+
getDisplayElement(): Component<HTMLElement>;
|
|
80
82
|
getGenericStatValue(stat: IStatMax): IStringSection[];
|
|
81
83
|
/**
|
|
82
84
|
* Overrides the superclass method of the same name. Calls the superclass method, then updates the CSS
|
|
@@ -88,6 +90,7 @@ export declare class Statbar extends StatComponent {
|
|
|
88
90
|
export declare class StatAttribute extends StatComponent {
|
|
89
91
|
private readonly attribute;
|
|
90
92
|
constructor(entity: EntityWithStats, stat: Stat, noEvents?: true);
|
|
93
|
+
getTextElement(): Text;
|
|
91
94
|
getDisplayElement(): Text;
|
|
92
95
|
}
|
|
93
96
|
export declare class Statbars extends StatsContainer<Statbar> {
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
/// <reference types="webdriverio/async" />
|
|
12
|
-
import type { TestRunContext } from "@wayward/test/testRunner";
|
|
13
12
|
import type { IInit } from "@wayward/game/Init";
|
|
14
13
|
import type { Stat } from "@wayward/game/game/entity/IStats";
|
|
15
14
|
import type { IslandId } from "@wayward/game/game/island/IIsland";
|
|
16
15
|
import { Direction } from "@wayward/game/utilities/math/Direction";
|
|
17
16
|
import type { Random } from "@wayward/game/utilities/random/Random";
|
|
18
|
-
import { ApplicationLogger } from "@wayward/test/core/applicationLogger";
|
|
19
17
|
import { ApplicationDom } from "@wayward/test/core/applicationDom";
|
|
20
|
-
import
|
|
18
|
+
import { ApplicationLogger } from "@wayward/test/core/applicationLogger";
|
|
19
|
+
import type { IDedicatedServerGameOptions, INewGameOptions, ITestJoinServerOptions, IWaitUntilGameLoadedOptions } from "@wayward/test/interfaces";
|
|
20
|
+
import type { TestRunContext } from "@wayward/test/testRunner";
|
|
21
21
|
export default class ApplicationInteractions {
|
|
22
22
|
protected readonly testContext: TestRunContext;
|
|
23
23
|
readonly appId: string;
|
package/package.json
CHANGED