@scml-dol-maplebirch/types 5.0.4 → 5.1.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/compat/DoLPcompat.d.ts +55 -0
- package/compat/ModI18N.d.ts +10 -0
- package/compat/Prototype.d.ts +43 -0
- package/compat/SimpleFrameworks.d.ts +1 -0
- package/constants.d.ts +52 -0
- package/core.d.ts +143 -0
- package/host/DoL.d.ts +44 -0
- package/host/ModLoader.d.ts +37 -0
- package/host/Resources.d.ts +15 -0
- package/host/SugarCube.d.ts +25 -0
- package/index.d.ts +11 -30
- package/infra/Catalog.d.ts +14 -0
- package/infra/Diagnostics.d.ts +48 -0
- package/infra/Emitter.d.ts +18 -0
- package/infra/Hooks.d.ts +15 -0
- package/infra/Lifecycle.d.ts +24 -0
- package/infra/Logger.d.ts +15 -0
- package/macros/helpers.d.ts +54 -0
- package/macros/index.d.ts +8 -0
- package/macros/lanButton.d.ts +2 -0
- package/macros/lanLink.d.ts +2 -0
- package/macros/lanListbox.d.ts +2 -0
- package/macros/lanSwitch.d.ts +3 -0
- package/macros/language.d.ts +2 -0
- package/macros/macros.d.ts +14 -0
- package/macros/maplebirchReplace.d.ts +1 -0
- package/macros/radiobuttonsfrom.d.ts +2 -0
- package/main.d.ts +22 -0
- package/maplebirch.d.ts +11 -4439
- package/modules/Audio.d.ts +118 -0
- package/modules/AudioAddon/Ambience.d.ts +17 -0
- package/modules/AudioAddon/AudioBufferPlayer.d.ts +20 -0
- package/modules/AudioAddon/Playlist.d.ts +29 -0
- package/modules/AudioAddon/Track.d.ts +15 -0
- package/modules/Character.d.ts +39 -0
- package/modules/CharacterAddon/Pet.d.ts +61 -0
- package/modules/CharacterAddon/Transformation.d.ts +70 -0
- package/modules/CharacterAddon/TransformationConfig.d.ts +20 -0
- package/modules/Combat.d.ts +17 -0
- package/modules/CombatAddon/CombatAction.d.ts +63 -0
- package/modules/CombatAddon/CombatTypes.d.ts +4 -0
- package/modules/DoL/Config.d.ts +50 -0
- package/modules/DoL/Dynamic.d.ts +23 -0
- package/modules/DoL/Integration.d.ts +13 -0
- package/modules/DoL/Patches/Antiques.d.ts +17 -0
- package/modules/DoL/Patches/Bodywriting.d.ts +33 -0
- package/modules/DoL/Patches/Fishing.d.ts +32 -0
- package/modules/DoL/Patches/Foodstuff.d.ts +64 -0
- package/modules/DoL/Patches/Location.d.ts +36 -0
- package/modules/DoL/Patches/Tips.d.ts +7 -0
- package/modules/DoL/Patches/Traits.d.ts +24 -0
- package/modules/DoL/Patches/config.d.ts +2 -0
- package/modules/DoL/Patches/index.d.ts +86 -0
- package/modules/DoL/Replacements.d.ts +189 -0
- package/modules/DoL/ToolCollection.d.ts +17 -0
- package/modules/DoL/index.d.ts +1 -0
- package/modules/DoL/types.d.ts +20 -0
- package/modules/Dynamic.d.ts +10 -0
- package/modules/Event.d.ts +16 -0
- package/modules/Frameworks/ApplyLinkZone.d.ts +40 -0
- package/modules/Frameworks/ConsoleCheat.d.ts +43 -0
- package/modules/Frameworks/DoLConsole.d.ts +8 -0
- package/modules/Frameworks/DoLMacros.d.ts +6 -0
- package/modules/Frameworks/HtmlTools.d.ts +49 -0
- package/modules/Frameworks/ImageLoader.d.ts +6 -0
- package/modules/Frameworks/OptionEvents.d.ts +15 -0
- package/modules/Frameworks/Patch.d.ts +24 -0
- package/modules/Frameworks/RandSystem.d.ts +27 -0
- package/modules/Frameworks/TextStore.d.ts +7 -0
- package/modules/Frameworks/TimeTravelCheat.d.ts +17 -0
- package/modules/Frameworks/ZonesManager.d.ts +69 -0
- package/modules/Frameworks/macros.d.ts +27 -0
- package/modules/Frameworks/migration.d.ts +33 -0
- package/modules/NamedNPC.d.ts +164 -0
- package/modules/NamedNPCAddon/NPCClothes/Condition.d.ts +3 -0
- package/modules/NamedNPCAddon/NPCClothes/NPCOutfitSets.d.ts +38 -0
- package/modules/NamedNPCAddon/NPCClothes/NPCSidebarArt.d.ts +25 -0
- package/modules/NamedNPCAddon/NPCClothes/NPCSidebarWardrobe.d.ts +60 -0
- package/modules/NamedNPCAddon/NPCClothes.d.ts +12 -0
- package/modules/NamedNPCAddon/NPCFluids.d.ts +17 -0
- package/modules/NamedNPCAddon/NPCPregnancy.d.ts +127 -0
- package/modules/NamedNPCAddon/NPCSchedules.d.ts +77 -0
- package/modules/NamedNPCAddon/NPCSidebar.d.ts +28 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/base_layers.d.ts +212 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/face_layers.d.ts +220 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/feet_layers.d.ts +274 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/fluids_layers.d.ts +109 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/functions.d.ts +509 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/handheld_layers.d.ts +292 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/hands_layers.d.ts +381 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/head_layers.d.ts +490 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/legs_layers.d.ts +274 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/lower_layers.d.ts +800 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/neck_layers.d.ts +112 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/transformation_layers.d.ts +1672 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/types.d.ts +130 -0
- package/modules/NamedNPCAddon/NPCSidebarConfig/upper_layers.d.ts +1516 -0
- package/modules/NamedNPCAddon/NPCTransformation.d.ts +51 -0
- package/modules/NamedNPCAddon/NPCUtils.d.ts +8 -0
- package/modules/State.d.ts +46 -0
- package/modules/TimeStateWeather/DateTime.d.ts +4 -0
- package/modules/TimeStateWeather/Time.d.ts +14 -0
- package/modules/TimeStateWeather/TimeEvents.d.ts +130 -0
- package/modules/TimeStateWeather/WeatherEvents.d.ts +56 -0
- package/modules/ToolCollection.d.ts +33 -0
- package/modules/Variables.d.ts +32 -0
- package/package.d.ts +30 -0
- package/package.json +5 -7
- package/services/AddonPlugin.d.ts +92 -0
- package/services/CloudSave.d.ts +124 -0
- package/services/CredentialVault.d.ts +80 -0
- package/services/GUIControl.d.ts +54 -0
- package/services/IndexedDB.d.ts +28 -0
- package/services/Modules.d.ts +75 -0
- package/services/Translator.d.ts +60 -0
- package/types/global.d.ts +123 -0
- package/types/twine-sugarcube.d.ts +456 -0
- package/utils/array.d.ts +10 -0
- package/utils/binary.d.ts +8 -0
- package/utils/condition.d.ts +1 -0
- package/utils/index.d.ts +22 -0
- package/utils/object.d.ts +16 -0
- package/utils/selector.d.ts +20 -0
- package/utils/string.d.ts +8 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
3
|
+
import Playlist, { type PlayModeType } from './AudioAddon/Playlist.js';
|
|
4
|
+
import Track from './AudioAddon/Track.js';
|
|
5
|
+
import Ambience from './AudioAddon/Ambience.js';
|
|
6
|
+
declare const PlayState: {
|
|
7
|
+
readonly IDLE: 'idle';
|
|
8
|
+
readonly LOADING: 'loading';
|
|
9
|
+
readonly PLAYING: 'playing';
|
|
10
|
+
readonly PAUSED: 'paused';
|
|
11
|
+
readonly STOPPED: 'stopped';
|
|
12
|
+
};
|
|
13
|
+
type PlayStateType = (typeof PlayState)[keyof typeof PlayState];
|
|
14
|
+
interface AudioEventData {
|
|
15
|
+
type: string;
|
|
16
|
+
data?: unknown[];
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
type AudioEventHandler = (eventData: AudioEventData) => void;
|
|
20
|
+
interface AudioProgress {
|
|
21
|
+
currentTime: number;
|
|
22
|
+
duration: number;
|
|
23
|
+
percent: number;
|
|
24
|
+
}
|
|
25
|
+
interface AudioSnapshot {
|
|
26
|
+
state: PlayStateType;
|
|
27
|
+
track: Track | null;
|
|
28
|
+
playlist: string;
|
|
29
|
+
index: number;
|
|
30
|
+
length: number;
|
|
31
|
+
mode: PlayModeType;
|
|
32
|
+
volume: number;
|
|
33
|
+
muted: boolean;
|
|
34
|
+
progress: AudioProgress;
|
|
35
|
+
}
|
|
36
|
+
declare class Audio {
|
|
37
|
+
readonly core: MaplebirchCore;
|
|
38
|
+
readonly log: ScopedLog;
|
|
39
|
+
readonly ambience: Ambience;
|
|
40
|
+
private readonly STORE;
|
|
41
|
+
private readonly playlists;
|
|
42
|
+
private readonly playlistLoads;
|
|
43
|
+
private readonly eventListeners;
|
|
44
|
+
private readonly cache;
|
|
45
|
+
private readonly pendingLoads;
|
|
46
|
+
private activePlaylist;
|
|
47
|
+
private currentTrack;
|
|
48
|
+
private loadingTrack;
|
|
49
|
+
private currentHowl;
|
|
50
|
+
private state;
|
|
51
|
+
private volume;
|
|
52
|
+
private muted;
|
|
53
|
+
private autoNext;
|
|
54
|
+
private maxCache;
|
|
55
|
+
private cacheCount;
|
|
56
|
+
private playRequestId;
|
|
57
|
+
private progressTimer;
|
|
58
|
+
private progressBindings;
|
|
59
|
+
constructor(core: MaplebirchCore);
|
|
60
|
+
private initDB;
|
|
61
|
+
protected on(event: string, handler: AudioEventHandler): void;
|
|
62
|
+
protected off(event: string, handler: AudioEventHandler): boolean;
|
|
63
|
+
protected once(event: string, handler: AudioEventHandler): void;
|
|
64
|
+
play(track: Track): Promise<boolean>;
|
|
65
|
+
pause(): boolean;
|
|
66
|
+
resume(): boolean;
|
|
67
|
+
stop(): boolean;
|
|
68
|
+
togglePlayPause(): void;
|
|
69
|
+
next(): Promise<boolean>;
|
|
70
|
+
previous(): Promise<boolean>;
|
|
71
|
+
playAt(modName: string, index: number): Promise<boolean>;
|
|
72
|
+
seek(percent: number): boolean;
|
|
73
|
+
seekTo(seconds: number): boolean;
|
|
74
|
+
getPlaylist(modName: string): Promise<Playlist>;
|
|
75
|
+
playFromMod(modName: string, audioName?: string): Promise<boolean | string>;
|
|
76
|
+
import(modName: string, audioFolder?: string): Promise<boolean>;
|
|
77
|
+
addFile(file: File, modName?: string): Promise<boolean | string>;
|
|
78
|
+
delete(modName: string, audioName: string): Promise<boolean>;
|
|
79
|
+
clearAudio(modName: string): Promise<boolean | string>;
|
|
80
|
+
clearCache(): void;
|
|
81
|
+
destroy(): void;
|
|
82
|
+
playlist(modName: string): Playlist;
|
|
83
|
+
get Mute(): boolean;
|
|
84
|
+
set Mute(value: boolean);
|
|
85
|
+
get Volume(): number;
|
|
86
|
+
set Volume(value: number);
|
|
87
|
+
get PlayMode(): PlayModeType;
|
|
88
|
+
set PlayMode(mode: PlayModeType);
|
|
89
|
+
cyclePlayMode(): PlayModeType;
|
|
90
|
+
get AutoNext(): boolean;
|
|
91
|
+
set AutoNext(value: boolean);
|
|
92
|
+
get State(): PlayStateType;
|
|
93
|
+
get CurrentTrack(): Track | null;
|
|
94
|
+
get ActivePlaylist(): Playlist | null;
|
|
95
|
+
get currentTime(): number;
|
|
96
|
+
get duration(): number;
|
|
97
|
+
get progress(): AudioProgress;
|
|
98
|
+
get snapshot(): AudioSnapshot;
|
|
99
|
+
formatTime(seconds: number): string;
|
|
100
|
+
bindProgress(sliderId: string, timeId: string, interval?: number): void;
|
|
101
|
+
unbindProgress(sliderId: string, timeId: string): void;
|
|
102
|
+
preInit(): Promise<void>;
|
|
103
|
+
private load;
|
|
104
|
+
private save;
|
|
105
|
+
private readRecords;
|
|
106
|
+
private cacheAudio;
|
|
107
|
+
private unloadCache;
|
|
108
|
+
private trimCache;
|
|
109
|
+
private release;
|
|
110
|
+
private stopCurrent;
|
|
111
|
+
private get outputVolume();
|
|
112
|
+
private startProgressTimer;
|
|
113
|
+
private stopProgressTimer;
|
|
114
|
+
private handleTrackEnd;
|
|
115
|
+
private dispatch;
|
|
116
|
+
private emit;
|
|
117
|
+
}
|
|
118
|
+
export default Audio;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Howl, type HowlOptions } from 'howler';
|
|
2
|
+
import type ModLoader from '../../host/ModLoader.js';
|
|
3
|
+
declare class Ambience {
|
|
4
|
+
private readonly modloader;
|
|
5
|
+
private active;
|
|
6
|
+
private request;
|
|
7
|
+
constructor(modloader: ModLoader);
|
|
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;
|
|
12
|
+
private fadeOut;
|
|
13
|
+
private dispose;
|
|
14
|
+
private clamp;
|
|
15
|
+
private duration;
|
|
16
|
+
}
|
|
17
|
+
export default Ambience;
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import Track from './Track.js';
|
|
2
|
+
export declare const PlayMode: {
|
|
3
|
+
readonly SEQUENTIAL: 'sequential';
|
|
4
|
+
readonly LOOP_ALL: 'loop_all';
|
|
5
|
+
readonly LOOP_ONE: 'loop_one';
|
|
6
|
+
readonly SHUFFLE: 'shuffle';
|
|
7
|
+
};
|
|
8
|
+
export type PlayModeType = (typeof PlayMode)[keyof typeof PlayMode];
|
|
9
|
+
declare class Playlist {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
tracks: Track[];
|
|
12
|
+
currentIndex: number;
|
|
13
|
+
playMode: PlayModeType;
|
|
14
|
+
private shuffleOrder;
|
|
15
|
+
private shuffleIndex;
|
|
16
|
+
constructor(name: string);
|
|
17
|
+
add(input: Track | Track[]): void;
|
|
18
|
+
removeAt(index: number): boolean;
|
|
19
|
+
remove(audioName: string): boolean;
|
|
20
|
+
clear(): void;
|
|
21
|
+
setMode(mode: PlayModeType): void;
|
|
22
|
+
select(index: number): Track | null;
|
|
23
|
+
next(): Track | null;
|
|
24
|
+
previous(): Track | null;
|
|
25
|
+
get length(): number;
|
|
26
|
+
private resetShuffle;
|
|
27
|
+
private shuffle;
|
|
28
|
+
}
|
|
29
|
+
export default Playlist;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type AudioFormat = 'mp3' | 'wav' | 'ogg' | 'm4a' | 'flac' | 'webm';
|
|
2
|
+
interface TrackMeta {
|
|
3
|
+
title?: string;
|
|
4
|
+
artist?: string;
|
|
5
|
+
}
|
|
6
|
+
declare class Track {
|
|
7
|
+
readonly audioName: string;
|
|
8
|
+
readonly modName: string;
|
|
9
|
+
title: string;
|
|
10
|
+
artist: string;
|
|
11
|
+
duration: number;
|
|
12
|
+
format: AudioFormat;
|
|
13
|
+
constructor(audioName: string, modName: string, meta?: TrackMeta);
|
|
14
|
+
}
|
|
15
|
+
export default Track;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
3
|
+
import type AddonPlugin from '../services/AddonPlugin.js';
|
|
4
|
+
import Pet from './CharacterAddon/Pet.js';
|
|
5
|
+
import Transformation from './CharacterAddon/Transformation.js';
|
|
6
|
+
export type ProcessType = 'pre' | 'post';
|
|
7
|
+
export type ModelTarget<TModel = CanvasModel | CanvasModelOptions> = string | string[] | ((modelName: string, model?: TModel) => boolean);
|
|
8
|
+
export type ProcessHandler = (options: any, model?: CanvasModel) => void;
|
|
9
|
+
interface LayerUseOptions {
|
|
10
|
+
pet?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function mask(x?: number, rotation?: number, swap?: boolean, width?: number, height?: number): string;
|
|
13
|
+
declare class Character {
|
|
14
|
+
readonly core: MaplebirchCore;
|
|
15
|
+
readonly log: ScopedLog;
|
|
16
|
+
readonly mask: typeof mask;
|
|
17
|
+
readonly faceStyleMap: Map<string, string[]>;
|
|
18
|
+
private readonly processors;
|
|
19
|
+
private nextProcessor;
|
|
20
|
+
private readonly layers;
|
|
21
|
+
readonly pet: Pet;
|
|
22
|
+
readonly transformation: Transformation;
|
|
23
|
+
constructor(core: MaplebirchCore);
|
|
24
|
+
get ZIndices(): {
|
|
25
|
+
[key: string]: number;
|
|
26
|
+
};
|
|
27
|
+
modifyFaceStyle(manager: AddonPlugin): void;
|
|
28
|
+
faceStyleImagePaths(files: Record<string, unknown>): void;
|
|
29
|
+
private faceStyleSetupOption;
|
|
30
|
+
modifyCanvasModel(manager: AddonPlugin): void;
|
|
31
|
+
patchCanvasModel<T extends CanvasModelConstructor>(BaseCanvasModel: T): T;
|
|
32
|
+
use(type: ProcessType, handler: ProcessHandler, target?: ModelTarget<CanvasModel>): this;
|
|
33
|
+
use(layers: CanvasLayerMap, target?: ModelTarget<CanvasModelOptions>, options?: LayerUseOptions): this;
|
|
34
|
+
process(type: ProcessType, options: CanvasModelOptionsData, model?: CanvasModel): void;
|
|
35
|
+
preInit(): void;
|
|
36
|
+
Init(): void;
|
|
37
|
+
loadInit(): void;
|
|
38
|
+
}
|
|
39
|
+
export default Character;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type Character from '../Character.js';
|
|
2
|
+
export interface PetOptions {
|
|
3
|
+
mask?: number;
|
|
4
|
+
rotation?: number;
|
|
5
|
+
animated?: boolean;
|
|
6
|
+
floating?: boolean;
|
|
7
|
+
scale?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PetSettings extends PetOptions {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type PetTarget = string | HTMLElement;
|
|
13
|
+
interface PetHost {
|
|
14
|
+
mask(x?: number, rotation?: number): string;
|
|
15
|
+
}
|
|
16
|
+
interface FloatingPetConfig {
|
|
17
|
+
elementId: string;
|
|
18
|
+
storageKey: string;
|
|
19
|
+
className: string;
|
|
20
|
+
fallback(size: number): {
|
|
21
|
+
left: number;
|
|
22
|
+
top: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export declare abstract class FloatingPet {
|
|
26
|
+
protected readonly host: PetHost;
|
|
27
|
+
protected readonly petConfig: FloatingPetConfig;
|
|
28
|
+
protected canvas?: HTMLCanvasElement;
|
|
29
|
+
protected model?: CanvasModel;
|
|
30
|
+
protected container?: HTMLElement;
|
|
31
|
+
protected options: Required<PetOptions>;
|
|
32
|
+
private cleanupDrag?;
|
|
33
|
+
protected constructor(host: PetHost, petConfig: FloatingPetConfig);
|
|
34
|
+
configure(options?: PetOptions): this;
|
|
35
|
+
unmount(): void;
|
|
36
|
+
refresh(): boolean;
|
|
37
|
+
protected abstract draw(model: CanvasModel, context: CanvasRenderingContext2D): void;
|
|
38
|
+
protected mount(container: HTMLElement, model: CanvasModel, canvas: HTMLCanvasElement): void;
|
|
39
|
+
protected stopAnimation(): void;
|
|
40
|
+
private get displaySize();
|
|
41
|
+
private clearBox;
|
|
42
|
+
private enableDrag;
|
|
43
|
+
}
|
|
44
|
+
declare class Pet extends FloatingPet {
|
|
45
|
+
private manager;
|
|
46
|
+
readonly modelName: string;
|
|
47
|
+
private readonly layers;
|
|
48
|
+
private syncing;
|
|
49
|
+
private rendering;
|
|
50
|
+
private syncFrame;
|
|
51
|
+
constructor(manager: Character);
|
|
52
|
+
sync(): boolean;
|
|
53
|
+
use(layers: CanvasLayerMap): this;
|
|
54
|
+
capture(mainModel?: CanvasModelOptions): void;
|
|
55
|
+
render(target: PetTarget, options?: PetOptions): boolean;
|
|
56
|
+
unmount(): void;
|
|
57
|
+
private cancel;
|
|
58
|
+
private readSettings;
|
|
59
|
+
protected draw(model: CanvasModel, context: CanvasRenderingContext2D): void;
|
|
60
|
+
}
|
|
61
|
+
export default Pet;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Translation } from '../../services/Translator.js';
|
|
2
|
+
import type AddonPlugin from '../../services/AddonPlugin.js';
|
|
3
|
+
import type Character from '../Character.js';
|
|
4
|
+
import { type DecayCondition, type SuppressCondition, type BuildUpdater } from './TransformationConfig.js';
|
|
5
|
+
interface Part {
|
|
6
|
+
name: string;
|
|
7
|
+
tfRequired: number;
|
|
8
|
+
default?: string;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
type TransformHook = (options: any, model?: CanvasModel) => void;
|
|
12
|
+
type TransformMessage = Record<string, {
|
|
13
|
+
up: string[];
|
|
14
|
+
down: string[];
|
|
15
|
+
}>;
|
|
16
|
+
type TranslationInput = Record<string, Translation> | Map<string, Translation>;
|
|
17
|
+
interface EntryOptions {
|
|
18
|
+
build?: number;
|
|
19
|
+
level?: number;
|
|
20
|
+
update?: number[];
|
|
21
|
+
icon?: string;
|
|
22
|
+
message?: TransformMessage;
|
|
23
|
+
decay?: boolean;
|
|
24
|
+
decayConditions?: DecayCondition[];
|
|
25
|
+
suppress?: boolean;
|
|
26
|
+
suppressConditions?: SuppressCondition[];
|
|
27
|
+
pre?: TransformHook;
|
|
28
|
+
post?: TransformHook;
|
|
29
|
+
layers?: CanvasLayerMap;
|
|
30
|
+
translations?: TranslationInput;
|
|
31
|
+
}
|
|
32
|
+
interface TransformationOption extends EntryOptions {
|
|
33
|
+
parts: Part[];
|
|
34
|
+
traits?: Part[];
|
|
35
|
+
}
|
|
36
|
+
declare class Transformation {
|
|
37
|
+
private manager;
|
|
38
|
+
private get log();
|
|
39
|
+
private config;
|
|
40
|
+
readonly decayConditions: Record<string, DecayCondition[]>;
|
|
41
|
+
readonly suppressConditions: Record<string, SuppressCondition[]>;
|
|
42
|
+
readonly buildUpdaters: Record<string, BuildUpdater>;
|
|
43
|
+
constructor(manager: Character);
|
|
44
|
+
private get isDoLP();
|
|
45
|
+
private get animalTransforms();
|
|
46
|
+
private get animalMacros();
|
|
47
|
+
private get historyTransforms();
|
|
48
|
+
wikifier(widget: string, ...args: any[]): any;
|
|
49
|
+
modifyEffect(manager: AddonPlugin): void;
|
|
50
|
+
add(name: string, type: string, options: TransformationOption): this;
|
|
51
|
+
inject(): void;
|
|
52
|
+
private _update;
|
|
53
|
+
state(): void;
|
|
54
|
+
private _clear;
|
|
55
|
+
private suppress;
|
|
56
|
+
_transform(name: string, change: number): void;
|
|
57
|
+
updateTransform(name: string): void;
|
|
58
|
+
_updateParts(name: string, oldLevel: number, newLevel: number): void;
|
|
59
|
+
_transformationAlteration(): void;
|
|
60
|
+
_transformationStateUpdate(): void;
|
|
61
|
+
private handleHiddenTransformParts;
|
|
62
|
+
message(key: string, tools: {
|
|
63
|
+
element: (tag: string, text: any, className?: string) => void;
|
|
64
|
+
wikifier: (macro: string, param: string) => void;
|
|
65
|
+
}): boolean;
|
|
66
|
+
get icon(): string;
|
|
67
|
+
setTransform(name: string, level?: number | null): void;
|
|
68
|
+
part(partName: string): boolean;
|
|
69
|
+
}
|
|
70
|
+
export default Transformation;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type DecayCondition = () => boolean;
|
|
2
|
+
export type SuppressCondition = (sourceName: string) => boolean;
|
|
3
|
+
export type BuildUpdater = (change: number) => void;
|
|
4
|
+
export interface NativeTransformState {
|
|
5
|
+
name: string;
|
|
6
|
+
level: () => number;
|
|
7
|
+
build: () => number;
|
|
8
|
+
}
|
|
9
|
+
export type NativeMacroMap = Record<string, [string, () => number]>;
|
|
10
|
+
export interface NativeHistoryEntry {
|
|
11
|
+
name: string;
|
|
12
|
+
level: () => number;
|
|
13
|
+
max: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const DecayConditions: Record<string, DecayCondition[]>;
|
|
16
|
+
export declare const SuppressConditions: Record<string, SuppressCondition[]>;
|
|
17
|
+
export declare const AnimalTransforms: NativeTransformState[];
|
|
18
|
+
export declare const AnimalMacros: NativeMacroMap;
|
|
19
|
+
export declare const HistoryTransforms: NativeHistoryEntry[];
|
|
20
|
+
export declare const BuildUpdaters: Record<string, BuildUpdater>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type MaplebirchCore } from '../core.js';
|
|
2
|
+
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
3
|
+
import CombatActions from './CombatAddon/CombatAction.js';
|
|
4
|
+
declare class Combat {
|
|
5
|
+
readonly core: MaplebirchCore;
|
|
6
|
+
readonly log: ScopedLog;
|
|
7
|
+
readonly CombatAction: CombatActions;
|
|
8
|
+
private readonly pendingDefaults;
|
|
9
|
+
constructor(core: MaplebirchCore);
|
|
10
|
+
preInit(): void;
|
|
11
|
+
private _assignCombatDefaults;
|
|
12
|
+
private _generateCombatAction;
|
|
13
|
+
private _combatListColor;
|
|
14
|
+
private _combatButtonAdjustments;
|
|
15
|
+
Init(): void;
|
|
16
|
+
}
|
|
17
|
+
export default Combat;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ActionType, CombatType } from './CombatTypes.js';
|
|
2
|
+
export { actionTypes, combatTypes } from './CombatTypes.js';
|
|
3
|
+
export type { ActionType, CombatType } from './CombatTypes.js';
|
|
4
|
+
export type OptionType = ActionType | 'ask';
|
|
5
|
+
export type ActionValue = string | number;
|
|
6
|
+
interface Context {
|
|
7
|
+
actionType?: OptionType;
|
|
8
|
+
combatType?: CombatType;
|
|
9
|
+
encounterType?: CombatType;
|
|
10
|
+
action?: ActionValue;
|
|
11
|
+
id?: string;
|
|
12
|
+
originalCount?: number;
|
|
13
|
+
label?: string;
|
|
14
|
+
}
|
|
15
|
+
interface ActionEntry {
|
|
16
|
+
id: string;
|
|
17
|
+
actionType: ActionType;
|
|
18
|
+
cond: (ctx: Context) => boolean;
|
|
19
|
+
display: (ctx: Context) => string;
|
|
20
|
+
value: (ctx: Context) => ActionValue;
|
|
21
|
+
color: (ctx: Context) => string;
|
|
22
|
+
difficulty: (ctx: Context) => string;
|
|
23
|
+
effect: (ctx: Context) => string;
|
|
24
|
+
combatType: (ctx: Context) => CombatType | CombatType[];
|
|
25
|
+
order: (ctx: Context) => number;
|
|
26
|
+
}
|
|
27
|
+
interface ActionConfig {
|
|
28
|
+
id: string;
|
|
29
|
+
actionType: ActionType | ActionType[];
|
|
30
|
+
cond: (ctx: Context) => boolean;
|
|
31
|
+
display: (ctx: Context) => string;
|
|
32
|
+
value: (ctx: Context) => ActionValue;
|
|
33
|
+
color?: string | ((ctx: Context) => string);
|
|
34
|
+
difficulty?: string | ((ctx: Context) => string);
|
|
35
|
+
effect?: string | ((ctx: Context) => string);
|
|
36
|
+
combatType?: CombatType | CombatType[] | ((ctx: Context) => CombatType | CombatType[]);
|
|
37
|
+
order?: number | ((ctx: Context) => number);
|
|
38
|
+
}
|
|
39
|
+
interface ModificationConfig {
|
|
40
|
+
id: string;
|
|
41
|
+
actionType: OptionType | OptionType[];
|
|
42
|
+
value: ActionValue;
|
|
43
|
+
combatType?: CombatType | CombatType[] | ((ctx: Context) => CombatType | CombatType[]);
|
|
44
|
+
cond?: (ctx: Context) => boolean;
|
|
45
|
+
display?: string | ((ctx: Context) => string);
|
|
46
|
+
order?: number | ((ctx: Context) => number);
|
|
47
|
+
}
|
|
48
|
+
export interface OptionsTable {
|
|
49
|
+
[key: string]: ActionValue;
|
|
50
|
+
}
|
|
51
|
+
declare class CombatActions {
|
|
52
|
+
readonly actions: ActionEntry[];
|
|
53
|
+
private readonly modifications;
|
|
54
|
+
private matches;
|
|
55
|
+
reg(...configs: ActionConfig[]): this;
|
|
56
|
+
modify(...configs: ModificationConfig[]): this;
|
|
57
|
+
private eval;
|
|
58
|
+
patchOptions(optionsTable: OptionsTable, actionType: OptionType, combatType?: CombatType): OptionsTable;
|
|
59
|
+
color(action: ActionValue, encounterType?: CombatType): string | null;
|
|
60
|
+
difficulty(action: ActionValue, combatType?: CombatType): string | null;
|
|
61
|
+
effect(combatType: CombatType | undefined, ...actionTypes: ActionType[]): string;
|
|
62
|
+
}
|
|
63
|
+
export default CombatActions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const actionTypes: readonly ['leftaction', 'rightaction', 'feetaction', 'mouthaction', 'penisaction', 'vaginaaction', 'anusaction', 'chestaction', 'thighaction'];
|
|
2
|
+
export type ActionType = (typeof actionTypes)[number];
|
|
3
|
+
export declare const combatTypes: readonly ['Default', 'Self', 'Struggle', 'Swarm', 'Vore', 'Machine', 'Tentacle'];
|
|
4
|
+
export type CombatType = (typeof combatTypes)[number];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../../core.js';
|
|
2
|
+
import type { BootTask } from '../../services/AddonPlugin.js';
|
|
3
|
+
import type { zonesManager, ZoneWidgetConfig } from '../Frameworks/ZonesManager.js';
|
|
4
|
+
import type { Patches } from './Patches/index.js';
|
|
5
|
+
import type { BodywritingConfig } from './Patches/Bodywriting.js';
|
|
6
|
+
import type { FoodstuffConfig } from './Patches/Foodstuff.js';
|
|
7
|
+
import type { AntiqueConfig } from './Patches/Antiques.js';
|
|
8
|
+
import type { FishConfig, FishingLocation } from './Patches/Fishing.js';
|
|
9
|
+
type ConfigFileSource = string | string[];
|
|
10
|
+
type KeyedConfig<T> = T & {
|
|
11
|
+
key?: string;
|
|
12
|
+
};
|
|
13
|
+
interface TraitBootConfig {
|
|
14
|
+
title?: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
colour?: string;
|
|
17
|
+
has?: boolean | string;
|
|
18
|
+
text?: string;
|
|
19
|
+
}
|
|
20
|
+
type TraitConfigSource = TraitBootConfig[] | ConfigFileSource;
|
|
21
|
+
type BodywritingConfigSource = KeyedConfig<BodywritingConfig>[] | Record<string, BodywritingConfig> | ConfigFileSource;
|
|
22
|
+
type FoodstuffConfigSource = KeyedConfig<FoodstuffConfig>[] | Record<string, FoodstuffConfig> | ConfigFileSource;
|
|
23
|
+
type AntiquesConfigSource = KeyedConfig<AntiqueConfig>[] | Record<string, AntiqueConfig> | ConfigFileSource;
|
|
24
|
+
type TipsConfigSource = string[] | Record<string, string[]> | ConfigFileSource;
|
|
25
|
+
type FrameworkWidgetConfig = string | ZoneWidgetConfig | [number, string | ZoneWidgetConfig];
|
|
26
|
+
export interface FrameworkConfig {
|
|
27
|
+
traits?: TraitConfigSource;
|
|
28
|
+
bodywriting?: BodywritingConfigSource;
|
|
29
|
+
foodstuff?: FoodstuffConfigSource;
|
|
30
|
+
antiques?: AntiquesConfigSource;
|
|
31
|
+
tips?: TipsConfigSource;
|
|
32
|
+
fish?: KeyedConfig<FishConfig>[] | Record<string, FishConfig> | ConfigFileSource;
|
|
33
|
+
bait?: FoodstuffConfigSource;
|
|
34
|
+
fishingLocations?: Partial<Record<FishingLocation, Record<string, number>>> | ConfigFileSource;
|
|
35
|
+
addto?: string;
|
|
36
|
+
widget?: FrameworkWidgetConfig;
|
|
37
|
+
}
|
|
38
|
+
declare class FrameworkConfigLoader {
|
|
39
|
+
private readonly core;
|
|
40
|
+
private readonly patch;
|
|
41
|
+
private readonly zone;
|
|
42
|
+
private readonly handlers;
|
|
43
|
+
constructor(core: MaplebirchCore, patch: Patches, zone: zonesManager);
|
|
44
|
+
apply(task: BootTask<FrameworkConfig | FrameworkConfig[]>): Promise<void>;
|
|
45
|
+
private loadSources;
|
|
46
|
+
private addTrait;
|
|
47
|
+
private addKeyedConfig;
|
|
48
|
+
private addTips;
|
|
49
|
+
}
|
|
50
|
+
export default FrameworkConfigLoader;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import BaseDynamic from '../Dynamic.js';
|
|
2
|
+
import type { StateEventOptions, StateManager } from '../State.js';
|
|
3
|
+
import { TimeManager, type TimeEventOptions, type TimeTravelOptions, type TimeEventType } from '../TimeStateWeather/TimeEvents.js';
|
|
4
|
+
import { WeatherManager, type WeatherEventOptions, type WeatherTypeConfig, type WeatherException } from '../TimeStateWeather/WeatherEvents.js';
|
|
5
|
+
declare class DoLDynamic extends BaseDynamic {
|
|
6
|
+
get State(): StateManager;
|
|
7
|
+
get Time(): TimeManager;
|
|
8
|
+
get Weather(): WeatherManager;
|
|
9
|
+
regStateEvent(type: 'gate' | 'append', eventId: string, options: StateEventOptions): boolean;
|
|
10
|
+
delStateEvent(type: 'gate' | 'append', eventId: string): boolean;
|
|
11
|
+
trigger(type: 'gate' | 'append'): string;
|
|
12
|
+
get StateEvents(): StateManager['events'];
|
|
13
|
+
regTimeEvent(type: TimeEventType, eventId: string, options: TimeEventOptions): boolean;
|
|
14
|
+
delTimeEvent(type: TimeEventType, eventId: string): boolean;
|
|
15
|
+
timeTravel(options?: TimeTravelOptions): boolean;
|
|
16
|
+
get TimeEvents(): TimeManager['events'];
|
|
17
|
+
regWeatherEvent(eventId: string, options: WeatherEventOptions): boolean;
|
|
18
|
+
delWeatherEvent(eventId: string): boolean;
|
|
19
|
+
addWeather(data: WeatherException | WeatherTypeConfig): boolean | void;
|
|
20
|
+
Init(): void;
|
|
21
|
+
private fixDynamicTask;
|
|
22
|
+
}
|
|
23
|
+
export default DoLDynamic;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../../core.js';
|
|
2
|
+
declare class DoLIntegration {
|
|
3
|
+
private readonly core;
|
|
4
|
+
constructor(core: MaplebirchCore);
|
|
5
|
+
install(): void;
|
|
6
|
+
private filterOriginalImagePack;
|
|
7
|
+
private preparePatch;
|
|
8
|
+
private patchTimeScripts;
|
|
9
|
+
private preloadFaceStyles;
|
|
10
|
+
private configureBeautySelector;
|
|
11
|
+
private modifyOptionsDateFormat;
|
|
12
|
+
}
|
|
13
|
+
export default DoLIntegration;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AntiqueConfig {
|
|
2
|
+
hint: string;
|
|
3
|
+
museum: string;
|
|
4
|
+
name: string;
|
|
5
|
+
cn_name?: string;
|
|
6
|
+
journal: string;
|
|
7
|
+
journalName?: string;
|
|
8
|
+
icon: string;
|
|
9
|
+
key?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const antiquesData: Record<string, AntiqueConfig>;
|
|
12
|
+
declare class Antiques {
|
|
13
|
+
static add(key: string, config: AntiqueConfig): void;
|
|
14
|
+
static inject(data: Record<string, AntiqueConfig>): Record<string, AntiqueConfig>;
|
|
15
|
+
static syncState(): void;
|
|
16
|
+
}
|
|
17
|
+
export default Antiques;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface BodywritingConfig {
|
|
2
|
+
writing?: string;
|
|
3
|
+
writ_cn?: string;
|
|
4
|
+
type?: 'text' | 'object';
|
|
5
|
+
arrow?: 0 | 1;
|
|
6
|
+
special?: string;
|
|
7
|
+
gender?: 'n' | 'f' | 'm' | 'h';
|
|
8
|
+
lewd?: 0 | 1;
|
|
9
|
+
degree?: number;
|
|
10
|
+
featSkip?: boolean;
|
|
11
|
+
sprites?: string[];
|
|
12
|
+
index?: number;
|
|
13
|
+
key?: string;
|
|
14
|
+
}
|
|
15
|
+
export type BodywritingData = {
|
|
16
|
+
operation: 'add';
|
|
17
|
+
config: BodywritingConfig;
|
|
18
|
+
} | {
|
|
19
|
+
operation: 'del';
|
|
20
|
+
};
|
|
21
|
+
export type BodywritingItem = BodywritingConfig & {
|
|
22
|
+
index: number;
|
|
23
|
+
key: string;
|
|
24
|
+
};
|
|
25
|
+
export declare const bodywritingData: Record<string, BodywritingData>;
|
|
26
|
+
declare class Bodywriting {
|
|
27
|
+
static add(key: string, config: BodywritingConfig): void;
|
|
28
|
+
static delete(key: string): void;
|
|
29
|
+
static apply(): void;
|
|
30
|
+
private static remove;
|
|
31
|
+
private static set;
|
|
32
|
+
}
|
|
33
|
+
export default Bodywriting;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type FoodstuffConfig } from './Foodstuff.js';
|
|
2
|
+
export type FishingLocation = 'fishingBeach' | 'fishingPier' | 'fishingCoastPath' | 'fishingForestLake' | 'fishingMoor';
|
|
3
|
+
export type FishingSeason = 'spring' | 'summer' | 'autumn' | 'winter';
|
|
4
|
+
export type FishBehavior = 'runner' | 'darter' | 'panicked' | 'anchor' | 'thrasher' | 'slipper';
|
|
5
|
+
export interface FishConfig {
|
|
6
|
+
minSize: number;
|
|
7
|
+
maxSize: number;
|
|
8
|
+
locations: Partial<Record<FishingLocation, number>>;
|
|
9
|
+
icon: string;
|
|
10
|
+
preferredSeason?: FishingSeason[];
|
|
11
|
+
preferredLocation?: FishingLocation[];
|
|
12
|
+
preferredBait?: string;
|
|
13
|
+
cookable?: boolean;
|
|
14
|
+
requiresBaitFish?: boolean;
|
|
15
|
+
isBaitFish?: boolean;
|
|
16
|
+
minigame?: {
|
|
17
|
+
behavior: FishBehavior;
|
|
18
|
+
maxStamina: number;
|
|
19
|
+
armFatigueDifficulty: number;
|
|
20
|
+
};
|
|
21
|
+
foodstuff?: FoodstuffConfig;
|
|
22
|
+
}
|
|
23
|
+
export type FishData = Omit<FishConfig, 'foodstuff'> & Required<Pick<FishConfig, 'preferredSeason' | 'preferredLocation' | 'cookable'>>;
|
|
24
|
+
export declare const fishData: Record<string, FishConfig>;
|
|
25
|
+
export declare const fishingLocationData: Partial<Record<FishingLocation, Record<string, number>>>;
|
|
26
|
+
declare class Fishing {
|
|
27
|
+
static addFish(key: string, config: FishConfig): boolean;
|
|
28
|
+
static addBait(key: string, config: FoodstuffConfig): void;
|
|
29
|
+
static configureLocation(location: FishingLocation, weights: Record<string, number>): boolean;
|
|
30
|
+
static apply(): void;
|
|
31
|
+
}
|
|
32
|
+
export default Fishing;
|