@scml-dol-maplebirch/types 5.0.0 → 5.0.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/maplebirch.d.ts +18 -21
- package/package.json +1 -1
package/maplebirch.d.ts
CHANGED
|
@@ -897,13 +897,6 @@ interface PatchResult {
|
|
|
897
897
|
expected?: number;
|
|
898
898
|
error?: string;
|
|
899
899
|
}
|
|
900
|
-
interface ModRequirement {
|
|
901
|
-
name: string;
|
|
902
|
-
range?: string;
|
|
903
|
-
version?: string;
|
|
904
|
-
status: 'available' | 'missing' | 'incompatible' | 'invalid';
|
|
905
|
-
error?: string;
|
|
906
|
-
}
|
|
907
900
|
interface ModConflict {
|
|
908
901
|
source: string;
|
|
909
902
|
dataSource: string;
|
|
@@ -927,11 +920,9 @@ export declare class Diagnostics extends Logger {
|
|
|
927
920
|
get patches(): PatchResult[];
|
|
928
921
|
recordPatch(result: PatchResult): void;
|
|
929
922
|
clearPatches(): void;
|
|
930
|
-
mod(name: string, range?: string): ModRequirement;
|
|
931
|
-
checkDependencies(): boolean;
|
|
932
923
|
get conflicts(): ModConflict[] | undefined;
|
|
933
924
|
export(): string;
|
|
934
|
-
|
|
925
|
+
reset(): void;
|
|
935
926
|
}
|
|
936
927
|
//#endregion
|
|
937
928
|
//#region src/host/Resources.d.ts
|
|
@@ -1703,6 +1694,8 @@ export declare class Catalog<Key, Value> extends Diagnostics {
|
|
|
1703
1694
|
get(key: Key): Value | undefined;
|
|
1704
1695
|
has(key: Key): boolean;
|
|
1705
1696
|
list(): Value[];
|
|
1697
|
+
clear(): void;
|
|
1698
|
+
get entries(): ReadonlyMap<Key, Value>;
|
|
1706
1699
|
}
|
|
1707
1700
|
//#endregion
|
|
1708
1701
|
//#region src/services/IndexedDB.d.ts
|
|
@@ -2010,8 +2003,10 @@ export declare class Lifecycle<Key = string, Target extends LifecycleTarget = Li
|
|
|
2010
2003
|
Init(): void;
|
|
2011
2004
|
loadInit(): void;
|
|
2012
2005
|
postInit(): void;
|
|
2013
|
-
execute(target: Target, phase:
|
|
2014
|
-
|
|
2006
|
+
execute(target: Target, phase: 'preInit', scope?: string): Promise<LifecycleResult>;
|
|
2007
|
+
execute(target: Target, phase: Exclude<LifecyclePhase, 'preInit'>, scope?: string): LifecycleResult;
|
|
2008
|
+
execute(target: Target, phase: LifecyclePhase, scope?: string): LifecycleResult | Promise<LifecycleResult>;
|
|
2009
|
+
private failure;
|
|
2015
2010
|
}
|
|
2016
2011
|
//#endregion
|
|
2017
2012
|
//#region src/services/Modules.d.ts
|
|
@@ -2137,12 +2132,15 @@ export declare class GUIControl {
|
|
|
2137
2132
|
//#endregion
|
|
2138
2133
|
//#region src/infra/Hooks.d.ts
|
|
2139
2134
|
type HookCallback<Args extends unknown[] = unknown[], Result = unknown> = (...args: Args) => Result | Promise<Result>;
|
|
2135
|
+
type HookErrorPolicy = 'throw' | 'continue';
|
|
2140
2136
|
export declare class Hooks<Args extends unknown[] = unknown[], Result = unknown> extends Catalog<string, HookCallback<Args, Result>> {
|
|
2137
|
+
private readonly onError;
|
|
2141
2138
|
private readonly order;
|
|
2142
|
-
constructor(modloader?: ModLoader);
|
|
2139
|
+
constructor(modloader?: ModLoader, onError?: HookErrorPolicy);
|
|
2143
2140
|
add(name: string, callback: HookCallback<Args, Result>, order?: number): boolean;
|
|
2144
2141
|
remove(name: string): boolean;
|
|
2145
|
-
|
|
2142
|
+
clear(): void;
|
|
2143
|
+
execute(...args: Args): Result[];
|
|
2146
2144
|
call(name: string, ...args: Args): Promise<Awaited<Result> | undefined>;
|
|
2147
2145
|
}
|
|
2148
2146
|
//#endregion
|
|
@@ -2745,8 +2743,7 @@ interface PatchDefinition<T extends object = object, Flat extends object = T> {
|
|
|
2745
2743
|
}
|
|
2746
2744
|
declare class Patch<Extensions extends Record<string, object> = Record<never, never>> {
|
|
2747
2745
|
private readonly report;
|
|
2748
|
-
private readonly
|
|
2749
|
-
private readonly extensionValues;
|
|
2746
|
+
private readonly definitions;
|
|
2750
2747
|
constructor(report: (name: string, error: unknown) => void);
|
|
2751
2748
|
add<T extends object, Flat extends object = T>(name: string, definition: PatchDefinition<T, Flat>): this & Flat;
|
|
2752
2749
|
get<Name extends keyof Extensions>(name: Name): Extensions[Name] | undefined;
|
|
@@ -2911,9 +2908,8 @@ declare class TimeEvent extends Event {
|
|
|
2911
2908
|
}
|
|
2912
2909
|
declare class TimeManager {
|
|
2913
2910
|
private readonly manager;
|
|
2914
|
-
private readonly eventTypes;
|
|
2915
2911
|
private readonly timeEvents;
|
|
2916
|
-
private readonly
|
|
2912
|
+
private readonly travelHooks;
|
|
2917
2913
|
readonly log: DoLDynamic['log'];
|
|
2918
2914
|
readonly TimeConstants: Readonly<{
|
|
2919
2915
|
secondsPerDay: 86400;
|
|
@@ -2949,6 +2945,7 @@ declare class TimeManager {
|
|
|
2949
2945
|
patchTime(TimeObject: typeof Time): void;
|
|
2950
2946
|
register(type: TimeEventType, eventId: string, options: TimeEventOptions): boolean;
|
|
2951
2947
|
unregister(type: string, eventId: string): boolean;
|
|
2948
|
+
onTravel(name: string, callback: (data: TimeData) => void): boolean;
|
|
2952
2949
|
timeTravel(options?: TimeTravelOptions): boolean;
|
|
2953
2950
|
updateTimeLanguage(choice?: 'JournalTime'): string | boolean;
|
|
2954
2951
|
private handleTimePass;
|
|
@@ -2995,7 +2992,6 @@ declare class WeatherManager {
|
|
|
2995
2992
|
private readonly manager;
|
|
2996
2993
|
private readonly weatherEvents;
|
|
2997
2994
|
private readonly activeEvents;
|
|
2998
|
-
private sortedEventsCache;
|
|
2999
2995
|
private readonly Exceptions;
|
|
3000
2996
|
private readonly WeatherTypes;
|
|
3001
2997
|
private readonly layerModifications;
|
|
@@ -3003,6 +2999,7 @@ declare class WeatherManager {
|
|
|
3003
2999
|
private weatherTriggered;
|
|
3004
3000
|
private readonly log;
|
|
3005
3001
|
constructor(manager: DoLDynamic);
|
|
3002
|
+
private refresh;
|
|
3006
3003
|
private checkEvents;
|
|
3007
3004
|
register(eventId: string, options: WeatherEventOptions): boolean;
|
|
3008
3005
|
unregister(eventId: string): boolean;
|
|
@@ -3518,7 +3515,8 @@ declare class Character {
|
|
|
3518
3515
|
readonly log: ScopedLog;
|
|
3519
3516
|
readonly mask: typeof mask;
|
|
3520
3517
|
readonly faceStyleMap: Map<string, string[]>;
|
|
3521
|
-
private readonly
|
|
3518
|
+
private readonly processors;
|
|
3519
|
+
private nextProcessor;
|
|
3522
3520
|
private readonly layers;
|
|
3523
3521
|
readonly pet: Pet;
|
|
3524
3522
|
readonly transformation: Transformation;
|
|
@@ -4429,7 +4427,6 @@ export {
|
|
|
4429
4427
|
type LogLevel,
|
|
4430
4428
|
type MaplebirchCore,
|
|
4431
4429
|
type ModConflict,
|
|
4432
|
-
type ModRequirement,
|
|
4433
4430
|
type Module,
|
|
4434
4431
|
type ModulesMeta,
|
|
4435
4432
|
type PatchResult,
|