@wayward/types 2.11.5-beta.dev.20220306.2 → 2.11.5-beta.dev.20220309.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/event/EventManager.d.ts +2 -1
- package/definitions/game/game/inspection/InfoProvider.d.ts +2 -1
- package/definitions/game/steamworks/ISteamworks.d.ts +1 -0
- package/definitions/game/steamworks/Steamworks.d.ts +2 -0
- package/definitions/game/ui/Ui.d.ts +1 -0
- package/definitions/game/ui/screen/screens/game/static/stats/IStatDisplayDescription.d.ts +9 -2
- package/definitions/game/ui/screen/screens/game/static/stats/component/Stat.d.ts +1 -1
- package/definitions/game/ui/util/ScaleManager.d.ts +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,8 @@ import { EventBus } from "event/EventBuses";
|
|
|
13
13
|
import type { Events, IEventEmitterHost, IEventEmitterHostClass } from "event/EventEmitter";
|
|
14
14
|
declare type HostOrHostClass = IEventEmitterHost<any> | IEventEmitterHostClass<any>;
|
|
15
15
|
declare type HostFromHostOrHostClass<H extends IEventEmitterHost<any> | IEventEmitterHostClass<any>> = H extends IEventEmitterHostClass<any> ? InstanceOf<H> : H;
|
|
16
|
-
export declare type
|
|
16
|
+
export declare type Emitter = HostOrHostClass & object;
|
|
17
|
+
export declare type EmitterOrBus = EventBus | Emitter;
|
|
17
18
|
export declare type Event<E extends EmitterOrBus> = keyof Events<E extends EventBus ? EventBusHost<E> : E>;
|
|
18
19
|
declare type ArgsOf<F> = ArgumentsOf<Extract<F, AnyFunction>>;
|
|
19
20
|
declare type ReturnOf<F> = ReturnType<Extract<F, AnyFunction>>;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://github.com/WaywardGame/types/wiki
|
|
10
10
|
*/
|
|
11
11
|
import EventEmitter from "event/EventEmitter";
|
|
12
|
-
import type { EmitterOrBus, Event, Handler } from "event/EventManager";
|
|
12
|
+
import type { Emitter, EmitterOrBus, Event, Handler } from "event/EventManager";
|
|
13
13
|
import { InfoDisplayLevel } from "game/inspection/IInfoProvider";
|
|
14
14
|
import type { InfoProviderContext } from "game/inspection/InfoProviderContext";
|
|
15
15
|
import Component from "ui/component/Component";
|
|
@@ -96,6 +96,7 @@ export declare abstract class InfoProvider extends EventEmitter.Host<IInfoProvid
|
|
|
96
96
|
* Note: Any existing initialized components will not be retroactively subscribed.
|
|
97
97
|
*/
|
|
98
98
|
subscribeRefreshOn<E extends EmitterOrBus, K extends Event<E>>(emitterOrBus: E, ...events: K[]): this;
|
|
99
|
+
subscribeRefreshOn<E extends Emitter, K extends Event<E>>(emitter: WeakRef<E>, ...events: K[]): this;
|
|
99
100
|
/**
|
|
100
101
|
* Call when this info provider should be refreshed.
|
|
101
102
|
*/
|
|
@@ -12,6 +12,7 @@ import type { ISteamNetworkRelayStatus, SteamNetworkingConnectionState } from "@
|
|
|
12
12
|
import type { IPlayOptions } from "game/IGame";
|
|
13
13
|
import type { MultiplayerSyncCheckLevel, ServerInfo } from "multiplayer/IMultiplayer";
|
|
14
14
|
export interface ISteamworksEvents {
|
|
15
|
+
batteryChange(): any;
|
|
15
16
|
overlayShown(): any;
|
|
16
17
|
overlayHidden(): any;
|
|
17
18
|
onRelayNetworkStatus(ready: boolean, status: ISteamNetworkRelayStatus): void;
|
|
@@ -19,6 +19,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
|
19
19
|
private buildTime;
|
|
20
20
|
private overlayWorks;
|
|
21
21
|
private runningOnSteamDeck;
|
|
22
|
+
private runningOnBatteryPower;
|
|
22
23
|
private floatingTextInputFocused;
|
|
23
24
|
private floatingTextInputBlurTime;
|
|
24
25
|
private initializingMods;
|
|
@@ -47,6 +48,7 @@ export default class Steamworks extends EventEmitter.Host<ISteamworksEvents> {
|
|
|
47
48
|
private _intervalIds;
|
|
48
49
|
get isGameOverlayActive(): boolean;
|
|
49
50
|
get isRunningOnSteamDeck(): boolean;
|
|
51
|
+
get isRunningOnBatteryPower(): boolean;
|
|
50
52
|
isElectron(): boolean;
|
|
51
53
|
reload(): Promise<void>;
|
|
52
54
|
openGpuInfoWindow(): void;
|
|
@@ -86,6 +86,7 @@ export declare class Ui extends EventEmitter.Host<IUiEvents> {
|
|
|
86
86
|
updateFontStyle(): void;
|
|
87
87
|
updateUIAnimations(): void;
|
|
88
88
|
updateUIOpacity(): void;
|
|
89
|
+
updatePowerMode(): void;
|
|
89
90
|
toggleDeveloperMode(enabled: boolean): this;
|
|
90
91
|
protected onGlobalSlotLoaded(): void;
|
|
91
92
|
protected onPlay(): void;
|
|
@@ -18,11 +18,18 @@ import type { IStringSection } from "utilities/string/Interpolator";
|
|
|
18
18
|
export interface IStatDisplayDescription extends IModdable {
|
|
19
19
|
imagePath?: string | ((entity: Entity, stat: IStat) => string);
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* The CSS variable to use for the stat bar color
|
|
22
|
+
* Defaults to white
|
|
22
23
|
*/
|
|
23
24
|
color?: string | ((entity: Entity, stat: IStat) => string);
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* The CSS variable to use for the stat bar color in RGB format
|
|
27
|
+
* Defaults to white
|
|
28
|
+
*/
|
|
29
|
+
rgbColor?: string | ((entity: Entity, stat: IStat) => string);
|
|
30
|
+
/**
|
|
31
|
+
* The CSS variable to use for the background of the stat bar
|
|
32
|
+
* Defaults to black
|
|
26
33
|
*/
|
|
27
34
|
darkColor?: string | ((entity: Entity, stat: IStat) => string);
|
|
28
35
|
/**
|
|
@@ -36,7 +36,7 @@ export declare abstract class StatElement extends Component {
|
|
|
36
36
|
/**
|
|
37
37
|
* Returns the color of this stat.
|
|
38
38
|
*/
|
|
39
|
-
getStatColor(
|
|
39
|
+
getStatColor(type?: "dark" | "rgb"): string;
|
|
40
40
|
/**
|
|
41
41
|
* Returns the formatted CSS url for the stat icon.
|
|
42
42
|
*/
|
package/package.json
CHANGED