@scml-dol-maplebirch/types 5.4.8 → 5.4.10
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/macros/helpers.d.ts +1 -0
- package/modules/Audio.d.ts +10 -2
- package/modules/AudioAddon/Ambience.d.ts +6 -6
- package/modules/AudioAddon/Effects.d.ts +26 -0
- package/modules/AudioAddon/Sound.d.ts +5 -0
- package/modules/Character.d.ts +1 -0
- package/modules/CharacterAddon/Transformation.d.ts +2 -0
- package/modules/DoL/Replacements.d.ts +8 -2
- package/package.json +1 -1
- package/modules/AudioAddon/AudioBufferPlayer.d.ts +0 -20
package/macros/helpers.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare function macroTranslation(key: unknown, core?: MaplebirchCore): s
|
|
|
50
50
|
export declare function readStyle(args: unknown[], start?: number): StyleArgs;
|
|
51
51
|
export declare function isStyleArg(arg: string): boolean;
|
|
52
52
|
export declare function translatedText(source: unknown, convertMode: ConvertMode | null): string;
|
|
53
|
+
export declare function labelText(source: string | readonly string[], convertMode: ConvertMode | null): () => string;
|
|
53
54
|
export declare function appendMacroIcon($target: JQuery, icon: string): void;
|
|
54
55
|
export declare function addClasses($target: JQuery, className: string): void;
|
|
55
56
|
export declare function bindLanguageUpdate($target: JQuery, key: string, update: () => void): void;
|
package/modules/Audio.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { MaplebirchCore } from '../core.js';
|
|
1
|
+
import type { MaplebirchCore } from '../core.js';
|
|
2
2
|
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
3
|
+
import { type Howl, type HowlOptions } from 'howler';
|
|
3
4
|
import Playlist, { type PlayModeType } from './AudioAddon/Playlist.js';
|
|
4
5
|
import Track from './AudioAddon/Track.js';
|
|
5
6
|
import Ambience from './AudioAddon/Ambience.js';
|
|
7
|
+
import Effects from './AudioAddon/Effects.js';
|
|
6
8
|
declare const PlayState: {
|
|
7
9
|
readonly IDLE: 'idle';
|
|
8
10
|
readonly LOADING: 'loading';
|
|
@@ -37,6 +39,7 @@ declare class Audio {
|
|
|
37
39
|
readonly core: MaplebirchCore;
|
|
38
40
|
readonly log: ScopedLog;
|
|
39
41
|
readonly ambience: Ambience;
|
|
42
|
+
readonly effects: Effects;
|
|
40
43
|
private readonly STORE;
|
|
41
44
|
private readonly playlists;
|
|
42
45
|
private readonly playlistLoads;
|
|
@@ -48,6 +51,8 @@ declare class Audio {
|
|
|
48
51
|
private currentTrack;
|
|
49
52
|
private loadingTrack;
|
|
50
53
|
private currentHowl;
|
|
54
|
+
private currentSoundId;
|
|
55
|
+
private currentStarted;
|
|
51
56
|
private state;
|
|
52
57
|
private volume;
|
|
53
58
|
private muted;
|
|
@@ -62,6 +67,7 @@ declare class Audio {
|
|
|
62
67
|
protected on(event: string, handler: AudioEventHandler): void;
|
|
63
68
|
protected off(event: string, handler: AudioEventHandler): boolean;
|
|
64
69
|
protected once(event: string, handler: AudioEventHandler): void;
|
|
70
|
+
protected create(options: HowlOptions): Howl;
|
|
65
71
|
play(track: Track): Promise<boolean>;
|
|
66
72
|
pause(): boolean;
|
|
67
73
|
resume(): boolean;
|
|
@@ -110,11 +116,13 @@ declare class Audio {
|
|
|
110
116
|
private unloadCache;
|
|
111
117
|
private trimCache;
|
|
112
118
|
private release;
|
|
119
|
+
private cancelLoad;
|
|
113
120
|
private stopCurrent;
|
|
114
|
-
private get
|
|
121
|
+
private get trackVolume();
|
|
115
122
|
private startProgressTimer;
|
|
116
123
|
private stopProgressTimer;
|
|
117
124
|
private handleTrackEnd;
|
|
125
|
+
private handlePlaybackError;
|
|
118
126
|
private dispatch;
|
|
119
127
|
private emit;
|
|
120
128
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Howl,
|
|
1
|
+
import type { Howl, HowlOptions } from 'howler';
|
|
2
2
|
import type ModLoader from '../../host/ModLoader.js';
|
|
3
3
|
declare class Ambience {
|
|
4
4
|
private readonly modloader;
|
|
5
|
-
private
|
|
6
|
-
private
|
|
5
|
+
private readonly channels;
|
|
6
|
+
private readonly fading;
|
|
7
7
|
constructor(modloader: ModLoader);
|
|
8
8
|
protected create(options: HowlOptions): Howl;
|
|
9
|
-
play(modName: string, path: string, volume?: number, fadeMs?: number): Promise<boolean>;
|
|
10
|
-
setVolume(volume: number, fadeMs?: number): void;
|
|
11
|
-
stop(fadeMs?: number): void;
|
|
9
|
+
play(modName: string, path: string, volume?: number, fadeMs?: number, layer?: string): Promise<boolean>;
|
|
10
|
+
setVolume(volume: number, fadeMs?: number, layer?: string): void;
|
|
11
|
+
stop(fadeMs?: number, layer?: string): void;
|
|
12
12
|
private resume;
|
|
13
13
|
private fadeOut;
|
|
14
14
|
private dispose;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Howl, type HowlOptions } from 'howler';
|
|
2
|
+
import type ModLoader from '../../host/ModLoader.js';
|
|
3
|
+
interface EffectOptions {
|
|
4
|
+
volume?: number;
|
|
5
|
+
channel?: string;
|
|
6
|
+
cooldownMs?: number;
|
|
7
|
+
}
|
|
8
|
+
declare class Effects {
|
|
9
|
+
private readonly modloader;
|
|
10
|
+
private readonly enabled;
|
|
11
|
+
private readonly active;
|
|
12
|
+
private readonly cache;
|
|
13
|
+
private readonly recent;
|
|
14
|
+
constructor(modloader: ModLoader, enabled?: () => boolean);
|
|
15
|
+
protected create(options: HowlOptions): Howl;
|
|
16
|
+
protected get ready(): boolean;
|
|
17
|
+
protected get context(): AudioContext | null;
|
|
18
|
+
play(modName: string, path: string, options?: EffectOptions): Promise<boolean>;
|
|
19
|
+
stop(modName?: string, channel?: string): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
private resume;
|
|
22
|
+
private load;
|
|
23
|
+
private finish;
|
|
24
|
+
private dispose;
|
|
25
|
+
}
|
|
26
|
+
export default Effects;
|
package/modules/Character.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare class Character {
|
|
|
28
28
|
faceStyleImagePaths(files: Record<string, unknown>): void;
|
|
29
29
|
private faceStyleSetupOption;
|
|
30
30
|
modifyCanvasModel(manager: AddonPlugin): void;
|
|
31
|
+
private splitHairLayers;
|
|
31
32
|
patchCanvasModel<T extends CanvasModelConstructor>(BaseCanvasModel: T): T;
|
|
32
33
|
use(type: ProcessType, handler: ProcessHandler, target?: ModelTarget<CanvasModel>): this;
|
|
33
34
|
use(layers: CanvasLayerMap, target?: ModelTarget<CanvasModelOptions>, options?: LayerUseOptions): this;
|
|
@@ -52,8 +52,10 @@ declare class Transformation {
|
|
|
52
52
|
readonly decayConditions: Record<string, DecayCondition[]>;
|
|
53
53
|
readonly suppressConditions: Record<string, SuppressCondition[]>;
|
|
54
54
|
readonly buildUpdaters: Record<string, BuildUpdater>;
|
|
55
|
+
readonly coexistConditions: Array<() => boolean>;
|
|
55
56
|
constructor(manager: Character);
|
|
56
57
|
private get isDoLP();
|
|
58
|
+
get coexist(): boolean;
|
|
57
59
|
private get animalTransforms();
|
|
58
60
|
private get animalMacros();
|
|
59
61
|
private get historyTransforms();
|
|
@@ -196,11 +196,17 @@ declare const widgetPassage: {
|
|
|
196
196
|
src: string;
|
|
197
197
|
to: string;
|
|
198
198
|
})[];
|
|
199
|
-
'Transformation Widgets': {
|
|
199
|
+
'Transformation Widgets': ({
|
|
200
|
+
applybefore?: undefined;
|
|
201
|
+
src: string;
|
|
202
|
+
to: string;
|
|
203
|
+
expected: number;
|
|
204
|
+
} | {
|
|
205
|
+
to?: undefined;
|
|
200
206
|
src: string;
|
|
201
207
|
applybefore: string;
|
|
202
208
|
expected: number;
|
|
203
|
-
}[];
|
|
209
|
+
})[];
|
|
204
210
|
'Widgets NPCs': {
|
|
205
211
|
src: string;
|
|
206
212
|
to: string;
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare class AudioBufferPlayer {
|
|
2
|
-
private readonly context;
|
|
3
|
-
private readonly buffer;
|
|
4
|
-
private readonly onend;
|
|
5
|
-
private source;
|
|
6
|
-
private readonly gain;
|
|
7
|
-
private startedAt;
|
|
8
|
-
private offset;
|
|
9
|
-
private playing;
|
|
10
|
-
constructor(context: AudioContext, buffer: AudioBuffer, volume: number, onend: () => void);
|
|
11
|
-
play(): void;
|
|
12
|
-
pause(): void;
|
|
13
|
-
stop(): void;
|
|
14
|
-
seek(value?: number): number;
|
|
15
|
-
duration(): number;
|
|
16
|
-
volume(value: number): void;
|
|
17
|
-
unload(): void;
|
|
18
|
-
private stopSource;
|
|
19
|
-
}
|
|
20
|
-
export default AudioBufferPlayer;
|