@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,64 @@
|
|
|
1
|
+
type FoodstuffSeason = 'spring' | 'summer' | 'autumn' | 'winter';
|
|
2
|
+
type FoodstuffPlantingBed = 'earth' | 'water';
|
|
3
|
+
type FoodstuffStallSize = 'small' | 'large';
|
|
4
|
+
export interface FoodstuffConfig {
|
|
5
|
+
key?: string;
|
|
6
|
+
index?: number;
|
|
7
|
+
is_fishing_bait?: boolean;
|
|
8
|
+
name?: string;
|
|
9
|
+
singular?: string;
|
|
10
|
+
plural?: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
category?: string;
|
|
13
|
+
kitchen_item_type_icon?: string;
|
|
14
|
+
prop_folder?: string;
|
|
15
|
+
ingredient_alternatives?: Partial<Record<'normal' | 'lewd', string[]>>;
|
|
16
|
+
tending?: {
|
|
17
|
+
planting_bed?: FoodstuffPlantingBed;
|
|
18
|
+
growth_days?: number;
|
|
19
|
+
featCost?: number;
|
|
20
|
+
yield_multiplier?: number;
|
|
21
|
+
has_seeds?: boolean;
|
|
22
|
+
seed_name?: string;
|
|
23
|
+
seasons?: FoodstuffSeason[];
|
|
24
|
+
affected_by_tending_skill?: boolean;
|
|
25
|
+
tags?: string[];
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
shop?: {
|
|
29
|
+
sell_price?: number;
|
|
30
|
+
available_in?: string[];
|
|
31
|
+
bought_in_bulk?: number;
|
|
32
|
+
stall_size?: FoodstuffStallSize;
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
};
|
|
35
|
+
recipe?: {
|
|
36
|
+
recipe_name?: string;
|
|
37
|
+
difficulty?: number;
|
|
38
|
+
cook_minutes?: number;
|
|
39
|
+
servings?: number;
|
|
40
|
+
ingredients?: string[];
|
|
41
|
+
ingredient_alternatives?: Partial<Record<'normal' | 'lewd', Record<string, string[]>>>;
|
|
42
|
+
tags?: string[];
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
};
|
|
45
|
+
food?: {
|
|
46
|
+
handheld_gift?: boolean;
|
|
47
|
+
tags?: string[];
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
};
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
}
|
|
52
|
+
export type FoodstuffItem = FoodstuffConfig & Required<Pick<FoodstuffConfig, 'index' | 'name' | 'singular' | 'plural' | 'icon' | 'category' | 'kitchen_item_type_icon' | 'prop_folder'>>;
|
|
53
|
+
export declare const foodstuffData: Record<string, FoodstuffConfig>;
|
|
54
|
+
declare class Foodstuff {
|
|
55
|
+
static add(key: string, config: FoodstuffConfig): void;
|
|
56
|
+
static apply(): void;
|
|
57
|
+
static syncState(): void;
|
|
58
|
+
static applySetup(): void;
|
|
59
|
+
private static set;
|
|
60
|
+
private static nextIndex;
|
|
61
|
+
private static sort;
|
|
62
|
+
private static ensureState;
|
|
63
|
+
}
|
|
64
|
+
export default Foodstuff;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface LocationConfigOptions {
|
|
2
|
+
overwrite?: boolean;
|
|
3
|
+
layer?: string;
|
|
4
|
+
element?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LocationElement {
|
|
7
|
+
condition?: () => boolean;
|
|
8
|
+
image?: string;
|
|
9
|
+
frame?: number | (() => number);
|
|
10
|
+
animation?: {
|
|
11
|
+
frameDelay?: number;
|
|
12
|
+
cycleDelay?: number | (() => number);
|
|
13
|
+
};
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface LocationConfig extends LocationElement {
|
|
17
|
+
folder?: string;
|
|
18
|
+
base?: Record<string, LocationElement> | LocationElement;
|
|
19
|
+
emissive?: Record<string, LocationElement> | LocationElement;
|
|
20
|
+
reflective?: Record<string, LocationElement> | LocationElement;
|
|
21
|
+
layerTop?: Record<string, LocationElement> | LocationElement;
|
|
22
|
+
weather?: Record<string, unknown>;
|
|
23
|
+
particles?: Record<string, unknown>[];
|
|
24
|
+
customMapping?: () => string;
|
|
25
|
+
}
|
|
26
|
+
export interface LocationUpdate {
|
|
27
|
+
overwrite: boolean;
|
|
28
|
+
config: LocationConfig;
|
|
29
|
+
customMapping: (() => string) | null;
|
|
30
|
+
}
|
|
31
|
+
export declare const locationData: Record<string, LocationUpdate>;
|
|
32
|
+
declare class Location {
|
|
33
|
+
static configure(locationId: string, config: LocationConfig, options?: LocationConfigOptions): boolean;
|
|
34
|
+
static apply(): void;
|
|
35
|
+
}
|
|
36
|
+
export default Location;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface TraitCategory {
|
|
2
|
+
title: string;
|
|
3
|
+
traits: Trait[];
|
|
4
|
+
}
|
|
5
|
+
interface Trait {
|
|
6
|
+
name: string;
|
|
7
|
+
colour: string;
|
|
8
|
+
has: boolean;
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
export interface TraitConfig {
|
|
12
|
+
title: string;
|
|
13
|
+
name: string | (() => string);
|
|
14
|
+
colour: string | (() => string);
|
|
15
|
+
has: boolean | (() => boolean);
|
|
16
|
+
text: string | (() => string);
|
|
17
|
+
}
|
|
18
|
+
export declare const traitsData: TraitConfig[];
|
|
19
|
+
declare class Traits {
|
|
20
|
+
static add(...traits: Partial<TraitConfig>[]): void;
|
|
21
|
+
static inject(data: TraitCategory[], translate: (text: string) => string): TraitCategory[];
|
|
22
|
+
private static resolve;
|
|
23
|
+
}
|
|
24
|
+
export default Traits;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../../../core.js';
|
|
2
|
+
import Patch from '../../Frameworks/Patch.js';
|
|
3
|
+
import Traits from './Traits.js';
|
|
4
|
+
import Location from './Location.js';
|
|
5
|
+
import Bodywriting from './Bodywriting.js';
|
|
6
|
+
import Foodstuff from './Foodstuff.js';
|
|
7
|
+
import Antiques from './Antiques.js';
|
|
8
|
+
import Tips from './Tips.js';
|
|
9
|
+
import Fishing from './Fishing.js';
|
|
10
|
+
declare function register(core: MaplebirchCore, patch: Patch): (Patch<Record<never, never>> & {
|
|
11
|
+
traitsData: import("./Traits.js").TraitConfig[];
|
|
12
|
+
addTraits: typeof Traits.add;
|
|
13
|
+
injectTraits: (data: Parameters<typeof Traits.inject>[0]) => import("./Traits.js").TraitCategory[];
|
|
14
|
+
} & {
|
|
15
|
+
locationData: Record<string, import("./Location.js").LocationUpdate>;
|
|
16
|
+
configureLocation: typeof Location.configure;
|
|
17
|
+
applyLocation: typeof Location.apply;
|
|
18
|
+
} & {
|
|
19
|
+
bodywritingData: Record<string, import("./Bodywriting.js").BodywritingData>;
|
|
20
|
+
addBodywriting: typeof Bodywriting.add;
|
|
21
|
+
deleteBodywriting: typeof Bodywriting.delete;
|
|
22
|
+
applyBodywriting: typeof Bodywriting.apply;
|
|
23
|
+
} & {
|
|
24
|
+
fishData: Record<string, import("./Fishing.js").FishConfig>;
|
|
25
|
+
fishingLocationData: Partial<Record<import("./Fishing.js").FishingLocation, Record<string, number>>>;
|
|
26
|
+
addFish: typeof Fishing.addFish;
|
|
27
|
+
addBait: typeof Fishing.addBait;
|
|
28
|
+
configureFishingLocation: typeof Fishing.configureLocation;
|
|
29
|
+
applyFishing: typeof Fishing.apply;
|
|
30
|
+
} & {
|
|
31
|
+
foodstuffData: Record<string, import("./Foodstuff.js").FoodstuffConfig>;
|
|
32
|
+
addFoodstuff: typeof Foodstuff.add;
|
|
33
|
+
applyFoodstuff: typeof Foodstuff.apply;
|
|
34
|
+
} & {
|
|
35
|
+
antiquesData: Record<string, import("./Antiques.js").AntiqueConfig>;
|
|
36
|
+
addAntiques: typeof Antiques.add;
|
|
37
|
+
injectAntiques: typeof Antiques.inject;
|
|
38
|
+
} & {
|
|
39
|
+
tipsData: Record<string, string[]>;
|
|
40
|
+
addTips: typeof Tips.add;
|
|
41
|
+
applyTips: typeof Tips.apply;
|
|
42
|
+
injectTips: typeof Tips.inject;
|
|
43
|
+
}) & {
|
|
44
|
+
traits: {
|
|
45
|
+
data: import("./Traits.js").TraitConfig[];
|
|
46
|
+
add: typeof Traits.add;
|
|
47
|
+
inject: (data: Parameters<typeof Traits.inject>[0]) => import("./Traits.js").TraitCategory[];
|
|
48
|
+
};
|
|
49
|
+
location: {
|
|
50
|
+
data: Record<string, import("./Location.js").LocationUpdate>;
|
|
51
|
+
configure: typeof Location.configure;
|
|
52
|
+
apply: typeof Location.apply;
|
|
53
|
+
};
|
|
54
|
+
bodywriting: {
|
|
55
|
+
data: Record<string, import("./Bodywriting.js").BodywritingData>;
|
|
56
|
+
add: typeof Bodywriting.add;
|
|
57
|
+
delete: typeof Bodywriting.delete;
|
|
58
|
+
apply: typeof Bodywriting.apply;
|
|
59
|
+
};
|
|
60
|
+
fishing: {
|
|
61
|
+
data: Record<string, import("./Fishing.js").FishConfig>;
|
|
62
|
+
locations: Partial<Record<import("./Fishing.js").FishingLocation, Record<string, number>>>;
|
|
63
|
+
add: typeof Fishing.addFish;
|
|
64
|
+
addBait: typeof Fishing.addBait;
|
|
65
|
+
configure: typeof Fishing.configureLocation;
|
|
66
|
+
apply: typeof Fishing.apply;
|
|
67
|
+
};
|
|
68
|
+
foodstuff: {
|
|
69
|
+
data: Record<string, import("./Foodstuff.js").FoodstuffConfig>;
|
|
70
|
+
add: typeof Foodstuff.add;
|
|
71
|
+
apply: typeof Foodstuff.apply;
|
|
72
|
+
};
|
|
73
|
+
antiques: {
|
|
74
|
+
data: Record<string, import("./Antiques.js").AntiqueConfig>;
|
|
75
|
+
add: typeof Antiques.add;
|
|
76
|
+
inject: typeof Antiques.inject;
|
|
77
|
+
};
|
|
78
|
+
tips: {
|
|
79
|
+
data: Record<string, string[]>;
|
|
80
|
+
add: typeof Tips.add;
|
|
81
|
+
apply: typeof Tips.apply;
|
|
82
|
+
inject: typeof Tips.inject;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export type Patches = ReturnType<typeof register>;
|
|
86
|
+
export default register;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
declare const specialWidget: string[];
|
|
2
|
+
declare const defaultData: {
|
|
3
|
+
Init: string;
|
|
4
|
+
Header: string;
|
|
5
|
+
Footer: string;
|
|
6
|
+
Information: string;
|
|
7
|
+
Options: string;
|
|
8
|
+
Cheats: string;
|
|
9
|
+
NPCinit: string;
|
|
10
|
+
NPCinject: string;
|
|
11
|
+
};
|
|
12
|
+
declare const locationPassage: {
|
|
13
|
+
Start: {
|
|
14
|
+
src: string;
|
|
15
|
+
applybefore: string;
|
|
16
|
+
}[];
|
|
17
|
+
StoryCaption: ({
|
|
18
|
+
src: string;
|
|
19
|
+
applyafter: string;
|
|
20
|
+
applybefore?: undefined;
|
|
21
|
+
to?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
applyafter?: undefined;
|
|
24
|
+
src: string;
|
|
25
|
+
applybefore: string;
|
|
26
|
+
to?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
applyafter?: undefined;
|
|
29
|
+
applybefore?: undefined;
|
|
30
|
+
src: string;
|
|
31
|
+
to: string;
|
|
32
|
+
})[];
|
|
33
|
+
};
|
|
34
|
+
declare const widgetPassage: {
|
|
35
|
+
MuseumAntiques: {
|
|
36
|
+
src: string;
|
|
37
|
+
applybefore: string;
|
|
38
|
+
expected: number;
|
|
39
|
+
}[];
|
|
40
|
+
'Widgets Museum': {
|
|
41
|
+
src: string;
|
|
42
|
+
applybefore: string;
|
|
43
|
+
expected: number;
|
|
44
|
+
}[];
|
|
45
|
+
'Widgets Tips': {
|
|
46
|
+
src: string;
|
|
47
|
+
applybefore: string;
|
|
48
|
+
expected: number;
|
|
49
|
+
}[];
|
|
50
|
+
Characteristics: ({
|
|
51
|
+
applybefore?: undefined;
|
|
52
|
+
src: string;
|
|
53
|
+
applyafter: string;
|
|
54
|
+
} | {
|
|
55
|
+
applyafter?: undefined;
|
|
56
|
+
src: string;
|
|
57
|
+
applybefore: string;
|
|
58
|
+
})[];
|
|
59
|
+
overlayReplace: {
|
|
60
|
+
src: string;
|
|
61
|
+
applybefore: string;
|
|
62
|
+
}[];
|
|
63
|
+
'Options Overlay': {
|
|
64
|
+
src: string;
|
|
65
|
+
applybefore: string;
|
|
66
|
+
}[];
|
|
67
|
+
npcNamed: {
|
|
68
|
+
src: string;
|
|
69
|
+
applybefore: string;
|
|
70
|
+
}[];
|
|
71
|
+
Social: ({
|
|
72
|
+
applyafter?: undefined;
|
|
73
|
+
src: string;
|
|
74
|
+
applybefore: string;
|
|
75
|
+
} | {
|
|
76
|
+
applybefore?: undefined;
|
|
77
|
+
src: string;
|
|
78
|
+
applyafter: string;
|
|
79
|
+
})[];
|
|
80
|
+
'Widgets Named Npcs': ({
|
|
81
|
+
applybefore?: undefined;
|
|
82
|
+
srcmatch: RegExp;
|
|
83
|
+
to: string;
|
|
84
|
+
src?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
applybefore?: undefined;
|
|
87
|
+
srcmatch?: undefined;
|
|
88
|
+
src: string;
|
|
89
|
+
to: string;
|
|
90
|
+
} | {
|
|
91
|
+
to?: undefined;
|
|
92
|
+
srcmatch?: undefined;
|
|
93
|
+
src: string;
|
|
94
|
+
applybefore: string;
|
|
95
|
+
})[];
|
|
96
|
+
'Widgets Settings': ({
|
|
97
|
+
applyafter?: undefined;
|
|
98
|
+
src?: undefined;
|
|
99
|
+
srcmatch: RegExp;
|
|
100
|
+
to: string;
|
|
101
|
+
srcmatchgroup?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
applyafter?: undefined;
|
|
104
|
+
srcmatch?: undefined;
|
|
105
|
+
src?: undefined;
|
|
106
|
+
srcmatchgroup: RegExp;
|
|
107
|
+
to: string;
|
|
108
|
+
} | {
|
|
109
|
+
to?: undefined;
|
|
110
|
+
src?: undefined;
|
|
111
|
+
srcmatchgroup?: undefined;
|
|
112
|
+
srcmatch: RegExp;
|
|
113
|
+
applyafter: string;
|
|
114
|
+
} | {
|
|
115
|
+
to?: undefined;
|
|
116
|
+
srcmatch?: undefined;
|
|
117
|
+
srcmatchgroup?: undefined;
|
|
118
|
+
src: string;
|
|
119
|
+
applyafter: string;
|
|
120
|
+
})[];
|
|
121
|
+
Widgets: ({
|
|
122
|
+
to?: undefined;
|
|
123
|
+
srcmatchgroup?: undefined;
|
|
124
|
+
src: string;
|
|
125
|
+
applybefore: string;
|
|
126
|
+
} | {
|
|
127
|
+
applybefore?: undefined;
|
|
128
|
+
src?: undefined;
|
|
129
|
+
srcmatchgroup: RegExp;
|
|
130
|
+
to: string;
|
|
131
|
+
})[];
|
|
132
|
+
'Widgets Effects Man': {
|
|
133
|
+
src: string;
|
|
134
|
+
applybefore: string;
|
|
135
|
+
}[];
|
|
136
|
+
'Widgets Actions Speak': {
|
|
137
|
+
src: string;
|
|
138
|
+
applyafter: string;
|
|
139
|
+
}[];
|
|
140
|
+
'Widgets Struggle': {
|
|
141
|
+
src: string;
|
|
142
|
+
applyafter: string;
|
|
143
|
+
}[];
|
|
144
|
+
'Widgets Swarm Effects': {
|
|
145
|
+
src: string;
|
|
146
|
+
applyafter: string;
|
|
147
|
+
}[];
|
|
148
|
+
'Widgets Vore Effects': {
|
|
149
|
+
src: string;
|
|
150
|
+
applyafter: string;
|
|
151
|
+
}[];
|
|
152
|
+
'Machine Effects': {
|
|
153
|
+
src: string;
|
|
154
|
+
applyafter: string;
|
|
155
|
+
}[];
|
|
156
|
+
'Widgets Tentacles': {
|
|
157
|
+
src: string;
|
|
158
|
+
applyafter: string;
|
|
159
|
+
}[];
|
|
160
|
+
Traits: {
|
|
161
|
+
src: string;
|
|
162
|
+
applybefore: string;
|
|
163
|
+
}[];
|
|
164
|
+
'Widgets Journal': ({
|
|
165
|
+
applybefore?: undefined;
|
|
166
|
+
src?: undefined;
|
|
167
|
+
srcmatch: RegExp;
|
|
168
|
+
to: string;
|
|
169
|
+
} | {
|
|
170
|
+
to?: undefined;
|
|
171
|
+
srcmatch?: undefined;
|
|
172
|
+
src: string;
|
|
173
|
+
applybefore: string;
|
|
174
|
+
})[];
|
|
175
|
+
'Widgets Mirror': ({
|
|
176
|
+
src?: undefined;
|
|
177
|
+
srcmatch: RegExp;
|
|
178
|
+
to: string;
|
|
179
|
+
} | {
|
|
180
|
+
srcmatch?: undefined;
|
|
181
|
+
src: string;
|
|
182
|
+
to: string;
|
|
183
|
+
})[];
|
|
184
|
+
'Widgets NPCs': {
|
|
185
|
+
src: string;
|
|
186
|
+
to: string;
|
|
187
|
+
}[];
|
|
188
|
+
};
|
|
189
|
+
export { specialWidget, defaultData, locationPassage, widgetPassage };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../../core.js';
|
|
2
|
+
import ToolCollection from '../ToolCollection.js';
|
|
3
|
+
import DoLConsole from '../Frameworks/DoLConsole.js';
|
|
4
|
+
import DoLMacros from '../Frameworks/DoLMacros.js';
|
|
5
|
+
import { type Patches } from './Patches/index.js';
|
|
6
|
+
declare class DoLToolCollection extends ToolCollection {
|
|
7
|
+
readonly console: DoLConsole;
|
|
8
|
+
readonly macro: DoLMacros;
|
|
9
|
+
readonly patch: Patches;
|
|
10
|
+
private readonly macros;
|
|
11
|
+
private readonly optionEvents;
|
|
12
|
+
private readonly modI18N;
|
|
13
|
+
constructor(core: MaplebirchCore);
|
|
14
|
+
preInit(): void;
|
|
15
|
+
Init(): void;
|
|
16
|
+
}
|
|
17
|
+
export default DoLToolCollection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type DoLDynamic from './Dynamic.js';
|
|
2
|
+
import type DoLToolCollection from './ToolCollection.js';
|
|
3
|
+
import type Audio from '../Audio.js';
|
|
4
|
+
import type Variables from '../Variables.js';
|
|
5
|
+
import type Character from '../Character.js';
|
|
6
|
+
import type NPCManager from '../NamedNPC.js';
|
|
7
|
+
import type Combat from '../Combat.js';
|
|
8
|
+
export interface CoreModules {
|
|
9
|
+
readonly dynamic: DoLDynamic;
|
|
10
|
+
readonly tool: DoLToolCollection;
|
|
11
|
+
readonly audio: Audio;
|
|
12
|
+
readonly var: Variables;
|
|
13
|
+
readonly char: Character;
|
|
14
|
+
readonly npc: NPCManager;
|
|
15
|
+
readonly combat: Combat;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface MaplebirchExtensions extends CoreModules {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
3
|
+
import Lifecycle, { type LifecycleTarget } from '../infra/Lifecycle.js';
|
|
4
|
+
declare class Dynamic extends Lifecycle<string, LifecycleTarget> {
|
|
5
|
+
readonly core: MaplebirchCore;
|
|
6
|
+
readonly log: ScopedLog;
|
|
7
|
+
constructor(core: MaplebirchCore);
|
|
8
|
+
Init(): void;
|
|
9
|
+
}
|
|
10
|
+
export default Dynamic;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
2
|
+
export interface EventOptions {
|
|
3
|
+
priority?: number;
|
|
4
|
+
once?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare abstract class Event {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
protected readonly log: ScopedLog;
|
|
9
|
+
readonly priority: number;
|
|
10
|
+
readonly once: boolean;
|
|
11
|
+
protected abstract readonly eventName: string;
|
|
12
|
+
protected constructor(id: string, options: EventOptions, log: ScopedLog);
|
|
13
|
+
protected evaluate<T extends unknown[]>(label: string, callback: (...args: T) => boolean, ...args: T): boolean;
|
|
14
|
+
protected invoke<T extends unknown[]>(label: string, callback: ((...args: T) => void) | undefined, ...args: T): void;
|
|
15
|
+
}
|
|
16
|
+
export default Event;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ScopedLog } from '../../infra/Diagnostics.js';
|
|
2
|
+
interface CustomZone {
|
|
3
|
+
position: number;
|
|
4
|
+
macro: string;
|
|
5
|
+
}
|
|
6
|
+
interface LinkZoneConfig {
|
|
7
|
+
containerId: string;
|
|
8
|
+
linkSelector: string;
|
|
9
|
+
beforeMacro: () => string;
|
|
10
|
+
afterMacro: () => string;
|
|
11
|
+
customMacro: () => CustomZone[];
|
|
12
|
+
zoneStyle: Partial<CSSStyleDeclaration>;
|
|
13
|
+
onBeforeApply?: (() => void) | null;
|
|
14
|
+
onAfterApply?: ((result: boolean, config: LinkZoneConfig) => void) | null;
|
|
15
|
+
debug: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare class LinkZoneManager {
|
|
18
|
+
readonly containerId: string;
|
|
19
|
+
readonly linkSelector: string;
|
|
20
|
+
static readonly apply: (config?: Partial<LinkZoneConfig>) => boolean;
|
|
21
|
+
static readonly add: (config: LinkZoneConfig, customZones: CustomZone[]) => void;
|
|
22
|
+
static readonly defaultConfig: LinkZoneConfig;
|
|
23
|
+
firstLink: Element | null;
|
|
24
|
+
lastLink: Element | null;
|
|
25
|
+
links: Element[];
|
|
26
|
+
readonly log: ScopedLog;
|
|
27
|
+
constructor(containerId: string | undefined, linkSelector: string | undefined, logger: ScopedLog);
|
|
28
|
+
detect(): boolean;
|
|
29
|
+
applyZones(config: LinkZoneConfig, customZones: CustomZone[]): boolean;
|
|
30
|
+
private applyBefore;
|
|
31
|
+
private applyAfter;
|
|
32
|
+
private applyCustom;
|
|
33
|
+
private zone;
|
|
34
|
+
private insertAfterBreak;
|
|
35
|
+
private findBefore;
|
|
36
|
+
private isBreak;
|
|
37
|
+
private visible;
|
|
38
|
+
}
|
|
39
|
+
declare const applyLinkZone: typeof LinkZoneManager;
|
|
40
|
+
export default applyLinkZone;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type ToolCollection from '../ToolCollection.js';
|
|
2
|
+
interface JSExecutionResult {
|
|
3
|
+
success: boolean;
|
|
4
|
+
result?: any;
|
|
5
|
+
error?: string;
|
|
6
|
+
message: string;
|
|
7
|
+
globals?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
interface TwineExecutionResult {
|
|
10
|
+
success: boolean;
|
|
11
|
+
error?: string;
|
|
12
|
+
message: string;
|
|
13
|
+
hasNavigation?: boolean;
|
|
14
|
+
parsedContent?: string;
|
|
15
|
+
}
|
|
16
|
+
interface ExecutionResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
result?: any;
|
|
19
|
+
error?: string;
|
|
20
|
+
message: string;
|
|
21
|
+
globals?: Record<string, any>;
|
|
22
|
+
hasNavigation?: boolean;
|
|
23
|
+
parsedContent?: string;
|
|
24
|
+
}
|
|
25
|
+
declare class CheatConsole {
|
|
26
|
+
readonly manager: ToolCollection;
|
|
27
|
+
private readonly log;
|
|
28
|
+
private readonly core;
|
|
29
|
+
private readonly globals;
|
|
30
|
+
private readonly jsStatus;
|
|
31
|
+
private readonly twineStatus;
|
|
32
|
+
private readonly twineOutputs;
|
|
33
|
+
constructor(manager: ToolCollection);
|
|
34
|
+
executeJS(code?: string): JSExecutionResult;
|
|
35
|
+
executeTwine(code?: string): TwineExecutionResult;
|
|
36
|
+
execute(type: 'javascript' | 'twine', code?: string): ExecutionResult;
|
|
37
|
+
private runJavaScript;
|
|
38
|
+
private linkTarget;
|
|
39
|
+
private html;
|
|
40
|
+
private format;
|
|
41
|
+
private showStatus;
|
|
42
|
+
}
|
|
43
|
+
export default CheatConsole;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type ToolCollection from '../ToolCollection.js';
|
|
2
|
+
import Console from './ConsoleCheat.js';
|
|
3
|
+
import TimeTravelCheat from './TimeTravelCheat.js';
|
|
4
|
+
declare class DoLConsole extends Console {
|
|
5
|
+
readonly timeTravel: TimeTravelCheat;
|
|
6
|
+
constructor(manager: ToolCollection);
|
|
7
|
+
}
|
|
8
|
+
export default DoLConsole;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import defineMacros from './macros.js';
|
|
2
|
+
declare class DoLMacros extends defineMacros {
|
|
3
|
+
statChange(statType: string, amount: number, colorClass: string, condition?: () => boolean): DocumentFragment;
|
|
4
|
+
grace(amount: number, expectedRank?: string): DocumentFragment;
|
|
5
|
+
}
|
|
6
|
+
export default DoLMacros;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type MaplebirchCore } from '../../core.js';
|
|
2
|
+
import type { ScopedLog } from '../../infra/Diagnostics.js';
|
|
3
|
+
import type { MacroFunction } from './macros.js';
|
|
4
|
+
import type { MacroContext } from '../../macros/index.js';
|
|
5
|
+
export type HtmlRoot = Element | DocumentFragment;
|
|
6
|
+
export interface TextContext {
|
|
7
|
+
readonly macro?: MacroContext;
|
|
8
|
+
readonly args?: readonly unknown[];
|
|
9
|
+
readonly name?: string;
|
|
10
|
+
readonly widgetName?: string;
|
|
11
|
+
readonly passageTitle?: string;
|
|
12
|
+
readonly [key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
type TextContent = string | number | boolean | null | undefined;
|
|
15
|
+
type RawContent = TextContent | Node;
|
|
16
|
+
declare class Builder {
|
|
17
|
+
readonly parent: htmlTools;
|
|
18
|
+
readonly auto: (text: string) => string;
|
|
19
|
+
readonly fragment: HtmlRoot;
|
|
20
|
+
readonly context: TextContext;
|
|
21
|
+
constructor(parent: htmlTools, fragment: HtmlRoot, context?: TextContext);
|
|
22
|
+
text(content: TextContent, style?: string): this;
|
|
23
|
+
line(content?: TextContent, style?: string): this;
|
|
24
|
+
wikify(content: TextContent): this;
|
|
25
|
+
raw(content: RawContent): this;
|
|
26
|
+
box(content: RawContent, style?: string): this;
|
|
27
|
+
}
|
|
28
|
+
declare class htmlTools {
|
|
29
|
+
readonly core: MaplebirchCore;
|
|
30
|
+
readonly log: ScopedLog;
|
|
31
|
+
private uid;
|
|
32
|
+
private readonly store;
|
|
33
|
+
constructor(core: MaplebirchCore);
|
|
34
|
+
get Wikifier(): ReturnType<MaplebirchCore['host']['sugarcube']['require']>['Wikifier'];
|
|
35
|
+
replaceText(oldText: string, newText: string, root?: HtmlRoot | null): number;
|
|
36
|
+
renameLink(target: string | Element, label: string, root?: HtmlRoot | null): boolean;
|
|
37
|
+
replaceLink(target: string | Element, source: string, root?: HtmlRoot | null): boolean;
|
|
38
|
+
private findLink;
|
|
39
|
+
add(key: string, handler: (tools: Builder) => void, id?: string): string | false;
|
|
40
|
+
delete(key: string, idOrHandler?: string | ((tools: Builder) => void)): boolean;
|
|
41
|
+
clear(): void;
|
|
42
|
+
renderFragment(keys: string | string[], context?: TextContext): DocumentFragment;
|
|
43
|
+
renderInto(root: HtmlRoot, keys: string | string[], context?: TextContext): void;
|
|
44
|
+
render(macro: MacroContext, keys: string | string[]): void;
|
|
45
|
+
makeTextOutput(options?: {
|
|
46
|
+
CSV?: boolean;
|
|
47
|
+
}): MacroFunction;
|
|
48
|
+
}
|
|
49
|
+
export default htmlTools;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../../core.js';
|
|
2
|
+
declare class OptionEvents {
|
|
3
|
+
private readonly core;
|
|
4
|
+
private relationTimer;
|
|
5
|
+
private installed;
|
|
6
|
+
constructor(core: MaplebirchCore);
|
|
7
|
+
install(): void;
|
|
8
|
+
private get ready();
|
|
9
|
+
private report;
|
|
10
|
+
private refreshOptions;
|
|
11
|
+
private updateSidebar;
|
|
12
|
+
private updatePet;
|
|
13
|
+
private updateRelation;
|
|
14
|
+
}
|
|
15
|
+
export default OptionEvents;
|