@wayward/types 2.14.4-beta.dev.20241231.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/magic/MagicalPropertyManager.d.ts +2 -1
- package/definitions/game/language/DictionaryMap.d.ts +2 -2
- package/definitions/game/language/dictionary/Message.d.ts +37 -37
- package/definitions/game/language/dictionary/UiTranslation.d.ts +924 -917
- package/definitions/game/save/data/ISaveDataGlobal.d.ts +2 -1
- package/definitions/game/ui/{screen/screens/splash → component}/Notice.d.ts +4 -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/item/ItemComponentEventBus.d.ts +2 -1
- 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 +2 -0
- package/definitions/game/ui/screen/screens/splash/DevelopmentBranchNotice.d.ts +1 -1
- package/definitions/game/utilities/Version.d.ts +1 -1
- package/definitions/lint/condition-complexity.d.mts +26 -0
- 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
@@ -32,9 +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;
|
37
|
-
|
38
|
+
developerReportErrorsToWaywardTeam: boolean;
|
38
39
|
dialogOpacity: number;
|
39
40
|
directionTurnDelay: number;
|
40
41
|
disableAcrylicTransparency: boolean;
|
@@ -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>;
|
@@ -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 {};
|
@@ -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
|
}
|
@@ -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
|
+
}
|
@@ -23,6 +23,8 @@ export default class TabDeveloper extends Tab implements IRefreshable {
|
|
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;
|
@@ -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
|
}
|
@@ -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';
|
@@ -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
|