@wayward/types 2.14.4-beta.dev.20241230.1 → 2.14.4-beta.dev.20250101.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/{devserver → core}/middleware/E404.d.ts +1 -1
- package/definitions/{devserver → core}/middleware/Static.d.ts +1 -1
- package/definitions/{devserver → core}/middleware/Validate.d.ts +1 -1
- package/definitions/{devserver/middleware → core}/util/SendFile.d.ts +1 -1
- package/definitions/{devserver → dev}/middleware/CustomInternalMods.d.ts +1 -1
- package/definitions/{devserver → dev}/middleware/SaveFolder.d.ts +1 -1
- package/definitions/error/Router.d.ts +13 -0
- package/definitions/error/index.d.ts +11 -0
- package/definitions/error/middleware/ReportError.d.ts +13 -0
- package/definitions/game/game/doodad/Doodad.d.ts +1 -1
- package/definitions/game/game/entity/player/quest/quest/IQuest.d.ts +1 -0
- package/definitions/game/game/inspection/infoProviders/LevelValue.d.ts +3 -1
- package/definitions/game/game/inspection/infoProviders/MagicalDamageReduction.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/MagicalDamageRegeneration.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/MagicalPropertyValue.d.ts +3 -2
- package/definitions/game/game/inspection/infoProviders/item/MagicalSourceTooltip.d.ts +2 -1
- package/definitions/game/game/inspection/infoProviders/item/use/ItemBuildInfo.d.ts +1 -1
- package/definitions/game/game/inspection/infoProviders/item/use/ItemEquipInfo.d.ts +1 -1
- package/definitions/game/game/inspection/inspections/MagicInspection.d.ts +2 -2
- package/definitions/game/game/item/IItem.d.ts +1 -1
- package/definitions/game/game/item/Item.d.ts +2 -1
- package/definitions/game/game/magic/IMagicalProperty.d.ts +85 -0
- package/definitions/game/game/magic/MagicalPropertyManager.d.ts +5 -73
- package/definitions/game/game/magic/MagicalPropertyType.d.ts +1 -1
- package/definitions/game/game/meta/prompt/IPrompt.d.ts +27 -26
- package/definitions/game/game/meta/prompt/PromptDescriptions.d.ts +1 -0
- package/definitions/game/game/reference/IReferenceManager.d.ts +1 -1
- package/definitions/game/language/Dictionary.d.ts +58 -57
- package/definitions/game/language/DictionaryMap.d.ts +116 -114
- package/definitions/game/language/Translation.d.ts +1 -2
- package/definitions/game/language/dictionary/Message.d.ts +511 -510
- package/definitions/game/language/dictionary/UiTranslation.d.ts +924 -910
- package/definitions/game/language/english/item/MagicalSubPropertyAffixes.d.ts +13 -0
- package/definitions/game/save/data/ISaveData.d.ts +23 -0
- package/definitions/game/save/data/ISaveDataGlobal.d.ts +2 -0
- package/definitions/game/save/data/SaveData.d.ts +10 -1
- package/definitions/game/save/serializer/PropertiesToSerialize.d.ts +4 -0
- package/definitions/game/save/upgrade/versions/beta2.14.4/beta2.14.4-dev20241231.d.ts +12 -0
- package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
- package/definitions/game/steamworks/Steamworks.d.ts +6 -2
- package/definitions/game/ui/{screen/screens/splash → component}/Notice.d.ts +4 -2
- package/definitions/game/ui/component/dropdown/MagicalPropertyDropdown.d.ts +1 -2
- package/definitions/game/ui/screen/screens/SplashScreen.d.ts +1 -1
- package/definitions/game/ui/screen/screens/game/DialogManager.d.ts +8 -3
- package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/component/item/ItemComponentEventBus.d.ts +2 -1
- package/definitions/game/ui/screen/screens/game/dialog/MilestonesDialog.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/dialog/unlockables/UnlockablesDialog.d.ts +1 -0
- package/definitions/game/ui/screen/screens/menu/menus/options/ErrorReportingNotice.d.ts +14 -0
- package/definitions/game/ui/screen/screens/menu/menus/options/TabDeveloper.d.ts +3 -1
- package/definitions/game/ui/screen/screens/menu/menus/options/TabSaveData.d.ts +1 -0
- package/definitions/game/ui/screen/screens/splash/DevelopmentBranchNotice.d.ts +1 -1
- package/definitions/game/ui/util/HighlightManager.d.ts +11 -1
- package/definitions/game/ui/util/IHighlight.d.ts +1 -0
- package/definitions/game/utilities/Version.d.ts +1 -1
- package/definitions/lint/condition-complexity.d.mts +26 -0
- package/definitions/test/core/applicationDom.d.ts +3 -1
- package/definitions/utilities/Log.d.ts +3 -2
- package/definitions/utilities/event/EventEmitter.d.ts +12 -7
- package/package.json +1 -1
- /package/definitions/{devserver/middleware/util → core}/Middleware.d.ts +0 -0
- /package/definitions/{devserver/middleware → core}/util/GameLogFilter.d.ts +0 -0
- /package/definitions/{devserver → core}/util/Log.d.ts +0 -0
- /package/definitions/{devserver → dev}/Router.d.ts +0 -0
- /package/definitions/{devserver → dev}/index.d.ts +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 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 { MagicalPropertyIdentityHash } from "@wayward/game/game/magic/IMagicalProperty";
|
12
|
+
declare const magicalSubPropertyAffixes: PartialRecord<MagicalPropertyIdentityHash, [adjective: string, noun: string]>;
|
13
|
+
export default magicalSubPropertyAffixes;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 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 { RunningContext } from "@wayward/game/steamworks/ISteamworks";
|
12
|
+
import type Version from "@wayward/game/utilities/Version";
|
13
|
+
import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
|
14
|
+
export interface IGameCreationInfo {
|
15
|
+
build: IGameCreationInfoBuild;
|
16
|
+
creationTime: number;
|
17
|
+
runningContext: RunningContext;
|
18
|
+
version: Version.String;
|
19
|
+
}
|
20
|
+
export interface IGameCreationInfoBuild {
|
21
|
+
id: IBuildId | undefined;
|
22
|
+
time: number;
|
23
|
+
}
|
@@ -32,8 +32,10 @@ export interface IOptions {
|
|
32
32
|
currentGame: number;
|
33
33
|
customTitleBar: boolean;
|
34
34
|
defaultCursor: boolean;
|
35
|
+
developerLogMessagesForContainerDesyncs: boolean;
|
35
36
|
developerMode: boolean;
|
36
37
|
developerModeContextMenu: boolean;
|
38
|
+
developerReportErrorsToWaywardTeam: boolean;
|
37
39
|
dialogOpacity: number;
|
38
40
|
directionTurnDelay: number;
|
39
41
|
disableAcrylicTransparency: boolean;
|
@@ -13,7 +13,9 @@ import type { GameMode, IGameOptions } from "@wayward/game/game/options/IGameOpt
|
|
13
13
|
import type { ISerializedTranslation } from "@wayward/game/language/ITranslation";
|
14
14
|
import type { IMultiplayerState } from "@wayward/game/multiplayer/IMultiplayer";
|
15
15
|
import type IClientStore from "@wayward/game/save/clientStore/IClientStore";
|
16
|
+
import type { IGameCreationInfo } from "@wayward/game/save/data/ISaveData";
|
16
17
|
import type EnumInfo from "@wayward/game/utilities/enum/EnumInfo";
|
18
|
+
import type Version from "@wayward/game/utilities/Version";
|
17
19
|
import type { IBuildId } from "@wayward/hosts/shared/globalTypes";
|
18
20
|
export declare const saveDataVersionUnknown = "Unknown";
|
19
21
|
export default class SaveData {
|
@@ -30,7 +32,14 @@ export default class SaveData {
|
|
30
32
|
saveManagerDifficulty: GameMode;
|
31
33
|
saveManagerOptions: IGameOptions;
|
32
34
|
saveManagerScore: number;
|
33
|
-
saveManagerOriginalVersion:
|
35
|
+
saveManagerOriginalVersion: Version.String;
|
36
|
+
/**
|
37
|
+
* Contains extra information about the creation of this save.
|
38
|
+
* This may not be accurate for older saves before this was added (beta2.14.4).
|
39
|
+
* The existing data must not be modified after initial save creation.
|
40
|
+
* TODO: Remove gameCreationTime & saveManagerOriginalVersion and use this instead?
|
41
|
+
*/
|
42
|
+
gameCreationInfo: Readonly<IGameCreationInfo>;
|
34
43
|
saveManagerDeathBy: ISerializedTranslation;
|
35
44
|
modManagerSaveData: Record<string, any>;
|
36
45
|
modManagerUnloadable: Record<string, {
|
@@ -57,6 +57,10 @@ declare const propertiesToSerializeObject: {
|
|
57
57
|
saveManagerOriginalVersion: {
|
58
58
|
property: string[];
|
59
59
|
};
|
60
|
+
gameCreationInfo: {
|
61
|
+
property: string[];
|
62
|
+
savePropertyFlag: SavePropertyFlag;
|
63
|
+
};
|
60
64
|
gameThumbnail: {
|
61
65
|
property: string[];
|
62
66
|
savePropertyFlag: SavePropertyFlag;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 Unlok
|
3
|
+
* https://www.unlok.ca
|
4
|
+
*
|
5
|
+
* Credits & Thanks:
|
6
|
+
* https://www.unlok.ca/credits-thanks/
|
7
|
+
*
|
8
|
+
* Wayward is a copyrighted and licensed work. Modification and/or distribution of any source files is prohibited. If you wish to modify the game in any way, please refer to the modding guide:
|
9
|
+
* https://github.com/WaywardGame/types/wiki
|
10
|
+
*/
|
11
|
+
declare const _default: import("@wayward/game/save/upgrade/UpgradeVersion").IUpgradeVersionDefinition;
|
12
|
+
export default _default;
|
@@ -63,3 +63,4 @@ export declare const steamStatTypes: {
|
|
63
63
|
};
|
64
64
|
export type SteamStatTypeValues<T extends SteamStatArea> = typeof steamStatTypes[T][keyof typeof steamStatTypes[T]];
|
65
65
|
export declare const actionToSteamMarker: OptionalDescriptions<ActionType, SteamTimelineMarker>;
|
66
|
+
export type RunningContext = "Steam" | "Electron" | "Node.js" | "Browser";
|
@@ -15,7 +15,7 @@ import IActionContext from "@wayward/game/game/entity/action/IActionContext";
|
|
15
15
|
import { ModType } from "@wayward/game/mod/IModInformation";
|
16
16
|
import type { ModInformation } from "@wayward/game/mod/ModInformation";
|
17
17
|
import type { IJoinServerOptions, ServerInfo } from "@wayward/game/multiplayer/IMultiplayer";
|
18
|
-
import type { IBuild, IDedicatedServerInfo, IModPath, ISteamworksEvents, SteamStatTypeValues } from "@wayward/game/steamworks/ISteamworks";
|
18
|
+
import type { IBuild, IDedicatedServerInfo, IModPath, ISteamworksEvents, RunningContext, SteamStatTypeValues } from "@wayward/game/steamworks/ISteamworks";
|
19
19
|
import { SteamStatArea } from "@wayward/game/steamworks/ISteamworks";
|
20
20
|
import type { ISteamBeta } from "@wayward/hosts/shared/interfaces";
|
21
21
|
import { type IMatchmakingServer, type INapiDiscordPresenceInfo, type IRemoteFile, type ISteamFriend, type ISteamId, type ISteamworksNetworking, type IWaywardPreload, type IWorkshopItem, type LobbyType } from "@wayward/hosts/shared/interfaces";
|
@@ -92,7 +92,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
92
92
|
/** @deprecated For console use */
|
93
93
|
protected setBuildId(id?: string): void;
|
94
94
|
initialize(): Promise<IWaywardPreload | undefined>;
|
95
|
-
enableSafePaths(): void
|
95
|
+
enableSafePaths(): Promise<void>;
|
96
96
|
onUnload(): void;
|
97
97
|
getHeapStatistics(): Promise<HeapStatistics | undefined>;
|
98
98
|
setFullscreen(fullscreen: boolean): Promise<void>;
|
@@ -130,6 +130,10 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
130
130
|
* - {@link Island.saveBuildId}
|
131
131
|
*/
|
132
132
|
get buildId(): IBuildId | undefined;
|
133
|
+
/**
|
134
|
+
* Returns a string about how the game is running
|
135
|
+
*/
|
136
|
+
get runningContext(): RunningContext;
|
133
137
|
getPublishedMods(): IWorkshopItem[] | undefined;
|
134
138
|
getStatInt(name: string): number | undefined;
|
135
139
|
/**
|
@@ -27,11 +27,13 @@ export declare enum NoticeClasses {
|
|
27
27
|
Markdown = "notice-markdown"
|
28
28
|
}
|
29
29
|
export default class Notice extends Component {
|
30
|
-
static await(noticeClass: Class<Notice>, appendTo: Component): Promise<
|
30
|
+
static await(noticeClass: Class<Notice>, appendTo: Component | HTMLElement): Promise<boolean>;
|
31
31
|
readonly sections: Component<HTMLElement>;
|
32
32
|
readonly footer: Component<HTMLElement>;
|
33
33
|
readonly footerContent: Component<HTMLElement>;
|
34
|
-
|
34
|
+
private returnValue;
|
35
|
+
readonly proceedButton: Button;
|
36
|
+
get cancelButton(): Button;
|
35
37
|
constructor();
|
36
38
|
addSection(initializer: (section: NoticeSection) => any): this;
|
37
39
|
hideAndRemove(): Promise<void>;
|
@@ -8,8 +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
|
12
|
-
import { MagicalPropertyIdentity } from "@wayward/game/game/magic/MagicalPropertyManager";
|
11
|
+
import { MagicalPropertyIdentity, type MagicalPropertyIdentityHash } from "@wayward/game/game/magic/IMagicalProperty";
|
13
12
|
import MagicalPropertyType from "@wayward/game/game/magic/MagicalPropertyType";
|
14
13
|
import type TranslationImpl from "@wayward/game/language/impl/TranslationImpl";
|
15
14
|
import type { IDropdownOption } from "@wayward/game/ui/component/Dropdown";
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import Screen from "@wayward/game/ui/screen/Screen";
|
12
|
-
import Notice from "@wayward/game/ui/
|
12
|
+
import Notice from "@wayward/game/ui/component/Notice";
|
13
13
|
export default class SplashScreen extends Screen {
|
14
14
|
static getNotices(): Array<Class<Notice>>;
|
15
15
|
static show(): Promise<void>;
|
@@ -13,12 +13,15 @@ import type { IDialogStates } from "@wayward/game/ui/screen/screens/GameScreen";
|
|
13
13
|
import type { DialogById } from "@wayward/game/ui/screen/screens/game/DialogMap";
|
14
14
|
import { DialogId } from "@wayward/game/ui/screen/screens/game/Dialogs";
|
15
15
|
import Dialog from "@wayward/game/ui/screen/screens/game/component/Dialog";
|
16
|
-
|
16
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
17
|
+
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
18
|
+
type IDialogManagerEvents = IEventSubscriberEvents;
|
19
|
+
export default class DialogManager extends EventEmitter.Host<IDialogManagerEvents> {
|
17
20
|
private readonly map;
|
18
21
|
/**
|
19
22
|
* Flag set when the dialog manager / parent screen is being removed
|
20
23
|
*/
|
21
|
-
private
|
24
|
+
private disposing;
|
22
25
|
private readonly screenRef;
|
23
26
|
get screen(): Screen;
|
24
27
|
constructor(screen: Screen);
|
@@ -31,7 +34,7 @@ export default class DialogManager {
|
|
31
34
|
open<DIALOG extends Dialog>(id: DialogId, initializer?: (dialog: DIALOG) => any, subId?: string, highlightIfAlreadyOpen?: boolean): DIALOG;
|
32
35
|
isVisible(id: DialogId, subId?: string): boolean | undefined;
|
33
36
|
close(id: DialogId | `${DialogId}` | `${DialogId},${string}`, subId?: string): boolean;
|
34
|
-
closeAll(
|
37
|
+
closeAll(): boolean;
|
35
38
|
toggle<ID extends DialogId>(id: ID, force?: boolean, initializer?: (dialog: DialogById[ID]) => any, subId?: string, highlightIfAlreadyOpen?: boolean): this;
|
36
39
|
toggle<DIALOG extends Dialog>(id: DialogId, force?: boolean, initializer?: (dialog: DIALOG) => any, subId?: string, highlightIfAlreadyOpen?: boolean): this;
|
37
40
|
toggleAll(states: IDialogStates, loaded?: boolean): this;
|
@@ -40,4 +43,6 @@ export default class DialogManager {
|
|
40
43
|
private breakKey;
|
41
44
|
private getKey;
|
42
45
|
private updateDialogId;
|
46
|
+
dispose(): void;
|
43
47
|
}
|
48
|
+
export {};
|
package/definitions/game/ui/screen/screens/game/component/container/ContainerBucketItemList.d.ts
CHANGED
@@ -96,6 +96,7 @@ export default class ContainerBucketItemList extends Component implements ISorta
|
|
96
96
|
private readonly transientItemComponents;
|
97
97
|
addTransientItem(item: Item): ItemComponent | undefined;
|
98
98
|
removeTransientItem(item: Item): void;
|
99
|
+
ensureItemComponent(item: Item): ItemComponent | undefined;
|
99
100
|
private readonly itemComponents;
|
100
101
|
private getItemComponent;
|
101
102
|
private readonly itemStacks;
|
@@ -13,8 +13,9 @@ import { type ItemRefreshType } from "@wayward/game/ui/screen/screens/game/compo
|
|
13
13
|
import type ItemComponent from "@wayward/game/ui/screen/screens/game/component/ItemComponent";
|
14
14
|
import type ActionBar from "@wayward/game/ui/screen/screens/game/static/ActionBar";
|
15
15
|
import type { ActionSlot } from "@wayward/game/ui/screen/screens/game/static/actions/ActionSlot";
|
16
|
+
import type { IEventSubscriberEvents } from "@wayward/utilities/event/EventEmitter";
|
16
17
|
import EventEmitter from "@wayward/utilities/event/EventEmitter";
|
17
|
-
interface IItemComponentEventBusEvents {
|
18
|
+
interface IItemComponentEventBusEvents extends IEventSubscriberEvents {
|
18
19
|
update(type: ItemRefreshType): any;
|
19
20
|
changeHovered(): any;
|
20
21
|
}
|
@@ -22,6 +22,7 @@ export declare enum MilestonesDialogClasses {
|
|
22
22
|
}
|
23
23
|
export default class MilestonesDialog extends UnlockablesDialog<Milestone, MilestoneSort> {
|
24
24
|
constructor();
|
25
|
+
refreshNotUnlockableWarning(): void;
|
25
26
|
getBindable(): Bindable;
|
26
27
|
getIcon(): MenuBarButtonType;
|
27
28
|
protected getUnlockablesName(): Translation;
|
@@ -38,6 +38,7 @@ export default abstract class UnlockablesDialog<UNLOCKABLE extends number, SORT
|
|
38
38
|
readonly sectionUnlockableInMode: Component;
|
39
39
|
readonly sectionNotUnlockableInMode: Component;
|
40
40
|
readonly sectionHidden: Component;
|
41
|
+
readonly noticeNotUnlockable: Paragraph;
|
41
42
|
readonly noticeRowsHidden: Paragraph;
|
42
43
|
readonly sortFilterRow: DialogSortFilter<SORT>;
|
43
44
|
constructor(id: DialogId);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2011-2024 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 Notice from "@wayward/game/ui/component/Notice";
|
12
|
+
export default class ErrorReportingNotice extends Notice {
|
13
|
+
constructor();
|
14
|
+
}
|
@@ -19,10 +19,12 @@ export default class TabDeveloper extends Tab implements IRefreshable {
|
|
19
19
|
private readonly buttonReloadStylesheets;
|
20
20
|
private readonly buttonReloadTexturesCache;
|
21
21
|
private readonly buttonTogglePrepackedSprites;
|
22
|
-
private readonly
|
22
|
+
private readonly buttonToggleContainerDesyncMessages;
|
23
23
|
private readonly buttonToggleTraceRecording;
|
24
24
|
private readonly buttonDisposeReflection;
|
25
25
|
private readonly blockLogSourceFiltering;
|
26
|
+
private readonly checkButtonReportErrors;
|
27
|
+
private onTryEnableReportErrors;
|
26
28
|
private readonly blockUIExperiments;
|
27
29
|
constructor();
|
28
30
|
refresh(): this;
|
@@ -24,6 +24,7 @@ export default class TabSaveData extends Tab implements IRefreshable {
|
|
24
24
|
private onClearOptions;
|
25
25
|
private onClearSaves;
|
26
26
|
private onClearCharacters;
|
27
|
+
private onClearUI;
|
27
28
|
private onClearHighscores;
|
28
29
|
private onClearMilestones;
|
29
30
|
private onClearCraftingRecipes;
|
@@ -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 Notice from "@wayward/game/ui/
|
11
|
+
import Notice from "@wayward/game/ui/component/Notice";
|
12
12
|
export default class DevelopmentBranchNotice extends Notice {
|
13
13
|
constructor();
|
14
14
|
}
|
@@ -9,16 +9,26 @@
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
10
10
|
*/
|
11
11
|
import Component from "@wayward/game/ui/component/Component";
|
12
|
-
import type { HighlightSelector, IHighlight } from "@wayward/game/ui/util/IHighlight";
|
12
|
+
import type { HighlightSelector, HighlightSelectorResolved, IHighlight } from "@wayward/game/ui/util/IHighlight";
|
13
|
+
import { HighlightType } from "@wayward/game/ui/util/IHighlight";
|
13
14
|
import type { Events } from "@wayward/utilities/event/EventEmitter";
|
14
15
|
export default class HighlightManager {
|
15
16
|
private readonly highlightableComponents;
|
17
|
+
private readonly highlightableResolvers;
|
16
18
|
/**
|
17
19
|
* Registers this component to the given highlight selector.
|
18
20
|
*
|
19
21
|
* Note: When not providing `until` events, the `remove` event will be subscribed to automatically.
|
20
22
|
*/
|
21
23
|
register<C extends Component>(component: C, selector: HighlightSelector | undefined, ...until: Array<keyof Events<C>>): void;
|
24
|
+
/**
|
25
|
+
* Registers a "resolver" function to the given highlight selector. This resolver function will be called to produce an additional list
|
26
|
+
* of components to highlight when the highlight is started.
|
27
|
+
*
|
28
|
+
* This resolver function will never be automatically deregistered. Use {@link deregisterResolver} to deregister it.
|
29
|
+
*/
|
30
|
+
registerResolver<C extends Component>(type: HighlightType | undefined, resolver: (selector: HighlightSelectorResolved) => ArrayOr<C> | undefined): void;
|
31
|
+
deregisterResolver<C extends Component>(type: HighlightType | undefined, resolver: (selector: HighlightSelectorResolved) => ArrayOr<C> | undefined): void;
|
22
32
|
is(component: Component, selector: HighlightSelector): boolean;
|
23
33
|
private getHighlightSelectorId;
|
24
34
|
private getHighlightableComponents;
|
@@ -11,6 +11,7 @@
|
|
11
11
|
import type { IContainer } from "@wayward/game/game/item/IItem";
|
12
12
|
import type Item from "@wayward/game/game/item/Item";
|
13
13
|
export type HighlightSelector = [HighlightType, GetterOfOr<string | number>];
|
14
|
+
export type HighlightSelectorResolved = [HighlightType, string | number];
|
14
15
|
export interface IHighlight {
|
15
16
|
selectors: SupplierOr<HighlightSelector[]>;
|
16
17
|
time?: number;
|
@@ -80,7 +80,7 @@ declare namespace Version {
|
|
80
80
|
export interface Info extends IVersionInfo {
|
81
81
|
}
|
82
82
|
export class Info {
|
83
|
-
constructor(info: IVersionInfo | Version.String | Version.StringSemVer);
|
83
|
+
constructor(info: IVersionInfo | Version.String | Version.StringSemVer | Version.StringBuildId);
|
84
84
|
/**
|
85
85
|
* Returns whether this version is compatible with the game's version. This is used to check, for example,
|
86
86
|
* if a mod is compatible with the game's version.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
declare namespace _default {
|
2
|
+
export namespace meta {
|
3
|
+
export let type: string;
|
4
|
+
export namespace docs {
|
5
|
+
let description: string;
|
6
|
+
let category: string;
|
7
|
+
let recommended: boolean;
|
8
|
+
}
|
9
|
+
export { messages };
|
10
|
+
export let schema: never[];
|
11
|
+
export let fixable: string;
|
12
|
+
}
|
13
|
+
export { createRuleListener as create };
|
14
|
+
}
|
15
|
+
export default _default;
|
16
|
+
export type Context = TSESLint.RuleContext<keyof typeof messages, []>;
|
17
|
+
declare namespace messages {
|
18
|
+
let conditionTooComplexVariable: string;
|
19
|
+
let conditionTooComplexFunction: string;
|
20
|
+
}
|
21
|
+
/**
|
22
|
+
* @param {Context} context
|
23
|
+
* @returns {TSESLint.RuleListener}
|
24
|
+
*/
|
25
|
+
declare function createRuleListener(context: Context): TSESLint.RuleListener;
|
26
|
+
import type { TSESLint } from '@typescript-eslint/utils';
|
@@ -31,7 +31,9 @@ export declare class ApplicationDom {
|
|
31
31
|
}>): Promise<void>;
|
32
32
|
waitForVisibleElements(selector: string, timeout?: number, scrollIntoView?: boolean): Promise<WebdriverIO.Element[]>;
|
33
33
|
waitForNotVisible(selector: string, timeout?: number): Promise<void>;
|
34
|
-
waitUntil(executor: () => Promise<boolean>, options: WaitUntilOptions
|
34
|
+
waitUntil(executor: () => Promise<boolean>, options: WaitUntilOptions & {
|
35
|
+
triggerDebugger?: true;
|
36
|
+
}): Promise<true | void>;
|
35
37
|
}
|
36
38
|
export interface WaitUntilOptions extends Omit<webdriverio.WaitUntilOptions, "timeoutMsg"> {
|
37
39
|
timeoutMsg?: string | (() => string);
|
@@ -87,7 +87,8 @@ declare namespace Log {
|
|
87
87
|
Memory = 2
|
88
88
|
}
|
89
89
|
function setMemoryLog(memoryLog: MemoryLog | undefined): void;
|
90
|
-
function
|
90
|
+
function disableFileLogger(): void;
|
91
|
+
function disableFileLoggingForSource(source: string): void;
|
91
92
|
function initializeGameState(): void;
|
92
93
|
function setCallback(cb?: (...args: any[]) => void): void;
|
93
94
|
function addPreConsoleCallback(cb: (...args: any[]) => void): void;
|
@@ -95,7 +96,7 @@ declare namespace Log {
|
|
95
96
|
/**
|
96
97
|
* Setups file logging
|
97
98
|
*/
|
98
|
-
function setupFileLogger(fileSystem: IFileSystem, logsPath: string): void
|
99
|
+
function setupFileLogger(fileSystem: IFileSystem, logsPath: string): Promise<void>;
|
99
100
|
/**
|
100
101
|
* Flushes pending logs to disk if the file logger is active
|
101
102
|
*/
|
@@ -64,11 +64,11 @@ export interface IEventEmitter<H = any, E = any> {
|
|
64
64
|
emitAsyncParallel<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): Promise<Array<(Extract<ReturnOf<E[K]>, Promise<any>> extends Promise<infer R> ? R : never) | Exclude<ReturnOf<E[K]>, Promise<any>>>> & {
|
65
65
|
isResolved?: true;
|
66
66
|
};
|
67
|
-
subscribe<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
67
|
+
subscribe<K extends ArrayOr<keyof E>>(this: IEventEmitter<IEventEmitterHost<IEventSubscriberEvents>, E>, host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
68
68
|
/** @deprecated */
|
69
69
|
subscribe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
70
70
|
subscribeUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number, once?: boolean): H;
|
71
|
-
subscribeNext<K extends ArrayOr<keyof E>>(host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
71
|
+
subscribeNext<K extends ArrayOr<keyof E>>(this: IEventEmitter<IEventEmitterHost<IEventSubscriberEvents>, E>, host: IEventEmitterHost<IEventSubscriberEvents>, event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
72
72
|
/** @deprecated */
|
73
73
|
subscribeNext<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
74
74
|
subscribeNextUnsafe<K extends ArrayOr<keyof E>>(event: K, handler: Handler<H, K extends any[] ? E[K[number]] : E[Extract<K, keyof E>]>, priority?: number): H;
|
@@ -94,11 +94,13 @@ export interface IUntilSubscriber<H, E> {
|
|
94
94
|
}
|
95
95
|
declare class EventEmitter<H, E> {
|
96
96
|
private readonly host;
|
97
|
-
static RECORD_MODE: boolean;
|
98
97
|
private readonly hostClass;
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
/**
|
99
|
+
* We're not always initializing these since they're not always needed.
|
100
|
+
*/
|
101
|
+
private subscriptions?;
|
102
|
+
private cachedEmitSelfHandlers?;
|
103
|
+
private cachedClassHandlers?;
|
102
104
|
constructor(host: H);
|
103
105
|
raw(): IEventEmitter<H, E>;
|
104
106
|
emitSelf<K extends keyof E>(event: K, ...args: ArgsOf<E[K]>): H;
|
@@ -125,8 +127,11 @@ declare class EventEmitter<H, E> {
|
|
125
127
|
until(promise: Promise<any>): IUntilSubscriber<H, E>;
|
126
128
|
hasHandlersForEvent(...events: Array<keyof E>): boolean;
|
127
129
|
private copyFrom;
|
128
|
-
private readonly cachedClassHandlers;
|
129
130
|
protected handlersForEvent<K extends keyof E>(event: K, ignoreClassSubscriptions?: true): Array<keyof H | WeakHandler<any, any>>;
|
131
|
+
/**
|
132
|
+
* Deletes an event from the cached handler maps and deletes the maps if they are empty.
|
133
|
+
*/
|
134
|
+
private deleteCachedHandler;
|
130
135
|
}
|
131
136
|
declare namespace EventEmitter {
|
132
137
|
class Host<E> implements IEventEmitterHost<E> {
|
package/package.json
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|