@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.
Files changed (124) hide show
  1. package/compat/DoLPcompat.d.ts +55 -0
  2. package/compat/ModI18N.d.ts +10 -0
  3. package/compat/Prototype.d.ts +43 -0
  4. package/compat/SimpleFrameworks.d.ts +1 -0
  5. package/constants.d.ts +52 -0
  6. package/core.d.ts +143 -0
  7. package/host/DoL.d.ts +44 -0
  8. package/host/ModLoader.d.ts +37 -0
  9. package/host/Resources.d.ts +15 -0
  10. package/host/SugarCube.d.ts +25 -0
  11. package/index.d.ts +11 -30
  12. package/infra/Catalog.d.ts +14 -0
  13. package/infra/Diagnostics.d.ts +48 -0
  14. package/infra/Emitter.d.ts +18 -0
  15. package/infra/Hooks.d.ts +15 -0
  16. package/infra/Lifecycle.d.ts +24 -0
  17. package/infra/Logger.d.ts +15 -0
  18. package/macros/helpers.d.ts +54 -0
  19. package/macros/index.d.ts +8 -0
  20. package/macros/lanButton.d.ts +2 -0
  21. package/macros/lanLink.d.ts +2 -0
  22. package/macros/lanListbox.d.ts +2 -0
  23. package/macros/lanSwitch.d.ts +3 -0
  24. package/macros/language.d.ts +2 -0
  25. package/macros/macros.d.ts +14 -0
  26. package/macros/maplebirchReplace.d.ts +1 -0
  27. package/macros/radiobuttonsfrom.d.ts +2 -0
  28. package/main.d.ts +22 -0
  29. package/maplebirch.d.ts +11 -4439
  30. package/modules/Audio.d.ts +118 -0
  31. package/modules/AudioAddon/Ambience.d.ts +17 -0
  32. package/modules/AudioAddon/AudioBufferPlayer.d.ts +20 -0
  33. package/modules/AudioAddon/Playlist.d.ts +29 -0
  34. package/modules/AudioAddon/Track.d.ts +15 -0
  35. package/modules/Character.d.ts +39 -0
  36. package/modules/CharacterAddon/Pet.d.ts +61 -0
  37. package/modules/CharacterAddon/Transformation.d.ts +70 -0
  38. package/modules/CharacterAddon/TransformationConfig.d.ts +20 -0
  39. package/modules/Combat.d.ts +17 -0
  40. package/modules/CombatAddon/CombatAction.d.ts +63 -0
  41. package/modules/CombatAddon/CombatTypes.d.ts +4 -0
  42. package/modules/DoL/Config.d.ts +50 -0
  43. package/modules/DoL/Dynamic.d.ts +23 -0
  44. package/modules/DoL/Integration.d.ts +13 -0
  45. package/modules/DoL/Patches/Antiques.d.ts +17 -0
  46. package/modules/DoL/Patches/Bodywriting.d.ts +33 -0
  47. package/modules/DoL/Patches/Fishing.d.ts +32 -0
  48. package/modules/DoL/Patches/Foodstuff.d.ts +64 -0
  49. package/modules/DoL/Patches/Location.d.ts +36 -0
  50. package/modules/DoL/Patches/Tips.d.ts +7 -0
  51. package/modules/DoL/Patches/Traits.d.ts +24 -0
  52. package/modules/DoL/Patches/config.d.ts +2 -0
  53. package/modules/DoL/Patches/index.d.ts +86 -0
  54. package/modules/DoL/Replacements.d.ts +189 -0
  55. package/modules/DoL/ToolCollection.d.ts +17 -0
  56. package/modules/DoL/index.d.ts +1 -0
  57. package/modules/DoL/types.d.ts +20 -0
  58. package/modules/Dynamic.d.ts +10 -0
  59. package/modules/Event.d.ts +16 -0
  60. package/modules/Frameworks/ApplyLinkZone.d.ts +40 -0
  61. package/modules/Frameworks/ConsoleCheat.d.ts +43 -0
  62. package/modules/Frameworks/DoLConsole.d.ts +8 -0
  63. package/modules/Frameworks/DoLMacros.d.ts +6 -0
  64. package/modules/Frameworks/HtmlTools.d.ts +49 -0
  65. package/modules/Frameworks/ImageLoader.d.ts +6 -0
  66. package/modules/Frameworks/OptionEvents.d.ts +15 -0
  67. package/modules/Frameworks/Patch.d.ts +24 -0
  68. package/modules/Frameworks/RandSystem.d.ts +27 -0
  69. package/modules/Frameworks/TextStore.d.ts +7 -0
  70. package/modules/Frameworks/TimeTravelCheat.d.ts +17 -0
  71. package/modules/Frameworks/ZonesManager.d.ts +69 -0
  72. package/modules/Frameworks/macros.d.ts +27 -0
  73. package/modules/Frameworks/migration.d.ts +33 -0
  74. package/modules/NamedNPC.d.ts +164 -0
  75. package/modules/NamedNPCAddon/NPCClothes/Condition.d.ts +3 -0
  76. package/modules/NamedNPCAddon/NPCClothes/NPCOutfitSets.d.ts +38 -0
  77. package/modules/NamedNPCAddon/NPCClothes/NPCSidebarArt.d.ts +25 -0
  78. package/modules/NamedNPCAddon/NPCClothes/NPCSidebarWardrobe.d.ts +60 -0
  79. package/modules/NamedNPCAddon/NPCClothes.d.ts +12 -0
  80. package/modules/NamedNPCAddon/NPCFluids.d.ts +17 -0
  81. package/modules/NamedNPCAddon/NPCPregnancy.d.ts +127 -0
  82. package/modules/NamedNPCAddon/NPCSchedules.d.ts +77 -0
  83. package/modules/NamedNPCAddon/NPCSidebar.d.ts +28 -0
  84. package/modules/NamedNPCAddon/NPCSidebarConfig/base_layers.d.ts +212 -0
  85. package/modules/NamedNPCAddon/NPCSidebarConfig/face_layers.d.ts +220 -0
  86. package/modules/NamedNPCAddon/NPCSidebarConfig/feet_layers.d.ts +274 -0
  87. package/modules/NamedNPCAddon/NPCSidebarConfig/fluids_layers.d.ts +109 -0
  88. package/modules/NamedNPCAddon/NPCSidebarConfig/functions.d.ts +509 -0
  89. package/modules/NamedNPCAddon/NPCSidebarConfig/handheld_layers.d.ts +292 -0
  90. package/modules/NamedNPCAddon/NPCSidebarConfig/hands_layers.d.ts +381 -0
  91. package/modules/NamedNPCAddon/NPCSidebarConfig/head_layers.d.ts +490 -0
  92. package/modules/NamedNPCAddon/NPCSidebarConfig/legs_layers.d.ts +274 -0
  93. package/modules/NamedNPCAddon/NPCSidebarConfig/lower_layers.d.ts +800 -0
  94. package/modules/NamedNPCAddon/NPCSidebarConfig/neck_layers.d.ts +112 -0
  95. package/modules/NamedNPCAddon/NPCSidebarConfig/transformation_layers.d.ts +1672 -0
  96. package/modules/NamedNPCAddon/NPCSidebarConfig/types.d.ts +130 -0
  97. package/modules/NamedNPCAddon/NPCSidebarConfig/upper_layers.d.ts +1516 -0
  98. package/modules/NamedNPCAddon/NPCTransformation.d.ts +51 -0
  99. package/modules/NamedNPCAddon/NPCUtils.d.ts +8 -0
  100. package/modules/State.d.ts +46 -0
  101. package/modules/TimeStateWeather/DateTime.d.ts +4 -0
  102. package/modules/TimeStateWeather/Time.d.ts +14 -0
  103. package/modules/TimeStateWeather/TimeEvents.d.ts +130 -0
  104. package/modules/TimeStateWeather/WeatherEvents.d.ts +56 -0
  105. package/modules/ToolCollection.d.ts +33 -0
  106. package/modules/Variables.d.ts +32 -0
  107. package/package.d.ts +30 -0
  108. package/package.json +5 -7
  109. package/services/AddonPlugin.d.ts +92 -0
  110. package/services/CloudSave.d.ts +124 -0
  111. package/services/CredentialVault.d.ts +80 -0
  112. package/services/GUIControl.d.ts +54 -0
  113. package/services/IndexedDB.d.ts +28 -0
  114. package/services/Modules.d.ts +75 -0
  115. package/services/Translator.d.ts +60 -0
  116. package/types/global.d.ts +123 -0
  117. package/types/twine-sugarcube.d.ts +456 -0
  118. package/utils/array.d.ts +10 -0
  119. package/utils/binary.d.ts +8 -0
  120. package/utils/condition.d.ts +1 -0
  121. package/utils/index.d.ts +22 -0
  122. package/utils/object.d.ts +16 -0
  123. package/utils/selector.d.ts +20 -0
  124. package/utils/string.d.ts +8 -0
@@ -0,0 +1,24 @@
1
+ export type PatchPhase = 'init' | 'state';
2
+ export interface PatchDefinition<T extends object = object, Flat extends object = T> {
3
+ api: T;
4
+ legacy?: Flat;
5
+ available?: () => boolean;
6
+ init?: () => void;
7
+ state?: () => void;
8
+ }
9
+ declare class Patch<Extensions extends Record<string, object> = Record<never, never>> {
10
+ private readonly report;
11
+ private readonly definitions;
12
+ constructor(report: (name: string, error: unknown) => void);
13
+ add<T extends object, Flat extends object = T>(name: string, definition: PatchDefinition<T, Flat>): this & Flat;
14
+ get<Name extends keyof Extensions>(name: Name): Extensions[Name] | undefined;
15
+ get<T extends object = object>(name: string): T | undefined;
16
+ require<Name extends keyof Extensions>(name: Name): Extensions[Name];
17
+ require<T extends object = object>(name: string): T;
18
+ has(name: string): boolean;
19
+ names(): string[];
20
+ private available;
21
+ private run;
22
+ apply(phase: PatchPhase): void;
23
+ }
24
+ export default Patch;
@@ -0,0 +1,27 @@
1
+ import type { ScopedLog } from '../../infra/Diagnostics.js';
2
+ export interface RandState {
3
+ seed: number | null;
4
+ history: number[];
5
+ index: number;
6
+ }
7
+ declare class randSystem {
8
+ static readonly log: ScopedLog;
9
+ static create(state?: Partial<RandState>): randSystem;
10
+ readonly log: ScopedLog;
11
+ readonly state: RandState;
12
+ private readonly maxHistory;
13
+ private readonly modulus;
14
+ constructor(state?: Partial<RandState>);
15
+ reset(seed?: number): void;
16
+ int(max: number): number;
17
+ percent(): number;
18
+ back(steps?: number): void;
19
+ forward(steps?: number): void;
20
+ get seed(): number | null;
21
+ set seed(value: number);
22
+ get history(): number[];
23
+ get index(): number;
24
+ private next;
25
+ private normalize;
26
+ }
27
+ export default randSystem;
@@ -0,0 +1,7 @@
1
+ type TextItem = string | number | boolean | null | undefined;
2
+ declare class TextStore {
3
+ private readonly items;
4
+ push(...items: TextItem[]): void;
5
+ get play(): string;
6
+ }
7
+ export default TextStore;
@@ -0,0 +1,17 @@
1
+ import type { MaplebirchCore } from '../../core.js';
2
+ declare class TimeTravelCheat {
3
+ private readonly core;
4
+ private readonly ids;
5
+ constructor(core: MaplebirchCore);
6
+ fragment(): DocumentFragment;
7
+ private createRoot;
8
+ private bind;
9
+ private render;
10
+ private fieldInput;
11
+ private setFields;
12
+ private readFields;
13
+ private syncDayLimit;
14
+ private travel;
15
+ private status;
16
+ }
17
+ export default TimeTravelCheat;
@@ -0,0 +1,69 @@
1
+ import type { MaplebirchCore } from '../../core.js';
2
+ import type { ScopedLog } from '../../infra/Diagnostics.js';
3
+ import type AddonPlugin from '../../services/AddonPlugin.js';
4
+ import { type SourcePatch } from '../../host/ModLoader.js';
5
+ export interface ZoneWidgetConfig {
6
+ exclude?: string[];
7
+ match?: RegExp;
8
+ passage?: string | string[];
9
+ widget: string;
10
+ type?: 'function';
11
+ func?: () => unknown;
12
+ }
13
+ interface CustomLinkZoneItem {
14
+ position: number;
15
+ widget: string | ZoneWidgetConfig;
16
+ }
17
+ type PatchSet = SourcePatch;
18
+ type ZoneItem = string | ZoneWidgetConfig | CustomLinkZoneItem;
19
+ export type ZoneFunction = () => unknown;
20
+ type InitObject = {
21
+ init: ZoneFunction;
22
+ } | {
23
+ name: string;
24
+ func: ZoneFunction;
25
+ };
26
+ export type PositionedZoneWidgetConfig = Omit<ZoneWidgetConfig, 'widget'> & {
27
+ widget: [number, string];
28
+ };
29
+ export type ZoneWidget = string | ZoneFunction | ZoneWidgetConfig | PositionedZoneWidgetConfig | [number, string | ZoneWidgetConfig];
30
+ export interface CustomLinkGroup {
31
+ position: number;
32
+ macro: string;
33
+ }
34
+ export type InitFunction = string | ZoneFunction | InitObject;
35
+ export declare class zonesManager {
36
+ readonly log: ScopedLog;
37
+ readonly core: MaplebirchCore;
38
+ data: Record<string, ZoneItem[]>;
39
+ initFunction: InitFunction[];
40
+ specialWidget: (string | ZoneFunction)[];
41
+ defaultData: Record<string, string | ZoneFunction>;
42
+ locationPassage: Record<string, PatchSet[]>;
43
+ widgetPassage: Record<string, PatchSet[]>;
44
+ widgethtml: string;
45
+ private readonly functions;
46
+ private readonly functionNames;
47
+ private nextFunction;
48
+ constructor(core: MaplebirchCore);
49
+ inject(...databases: Partial<Pick<zonesManager, 'specialWidget' | 'defaultData' | 'locationPassage' | 'widgetPassage'>>[]): void;
50
+ onInit(...widgets: InitFunction[]): void;
51
+ addTo(zone: string, ...widgets: ZoneWidget[]): void;
52
+ storyInit(): void;
53
+ call(name: string): unknown;
54
+ play(zone: 'CustomLinkZone', passageTitle?: string): CustomLinkGroup[];
55
+ play(zone: 'State' | 'BeforeLinkZone' | 'AfterLinkZone', passageTitle?: string): string;
56
+ play(zone: string, passageTitle?: string): string | CustomLinkGroup[];
57
+ patchModToGame(manager: AddonPlugin, type: 'before' | 'after'): void;
58
+ private get widgets();
59
+ private get specials();
60
+ private defaultContent;
61
+ private render;
62
+ private shouldRender;
63
+ private customLinkItem;
64
+ private wrapSpecialPassage;
65
+ private applyContentPatches;
66
+ private patchPassage;
67
+ private widgetInit;
68
+ }
69
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { MaplebirchCore } from '../../core.js';
2
+ import type { ScopedLog } from '../../infra/Diagnostics.js';
3
+ import type { MacroContext } from '../../macros/index.js';
4
+ import type ToolCollection from '../ToolCollection.js';
5
+ export type MacroFunction<Args extends unknown[] = unknown[]> = (this: MacroContext, ...args: Args) => unknown;
6
+ export type SimpleMacroFunction<Args extends unknown[]> = (this: MacroContext | null, ...args: Args) => unknown;
7
+ type StatFunction<Args extends unknown[] = unknown[]> = (...args: Args) => DocumentFragment;
8
+ export type MacroTags = string[] | null | undefined;
9
+ export type SkipArgs = string[] | boolean | null | undefined;
10
+ export type MacroPhase = 'sugarcube' | 'storyready';
11
+ declare class defineMacros {
12
+ readonly manager: ToolCollection;
13
+ readonly log: ScopedLog;
14
+ readonly macros: string[];
15
+ readonly statFunctions: Record<string, StatFunction>;
16
+ private readonly definitions;
17
+ private readonly ready;
18
+ constructor(manager: ToolCollection);
19
+ get Macro(): ReturnType<MaplebirchCore['host']['sugarcube']['require']>['Macro'];
20
+ define<Args extends unknown[]>(macroName: string, macroFunction: MacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, isAsync?: boolean, phase?: MacroPhase): void;
21
+ private installAll;
22
+ private install;
23
+ defineS<Args extends unknown[]>(macroName: string, macroFunction: SimpleMacroFunction<Args>, tags?: MacroTags, skipArgs?: SkipArgs, maintainContext?: boolean, phase?: MacroPhase): void;
24
+ create<Args extends unknown[]>(name: string, fn: StatFunction<Args>): void;
25
+ callStatFunction(name: string, ...args: unknown[]): DocumentFragment;
26
+ }
27
+ export default defineMacros;
@@ -0,0 +1,33 @@
1
+ import type { ScopedLog } from '../../infra/Diagnostics.js';
2
+ interface Step {
3
+ from: string;
4
+ to: string;
5
+ apply: (data: Record<string, unknown>, utils: Utils) => void;
6
+ }
7
+ interface PathRef {
8
+ parent: Record<string, unknown>;
9
+ key: string;
10
+ }
11
+ interface Utils {
12
+ readonly log: ScopedLog;
13
+ path: (obj: Record<string, unknown>, path: string, create?: boolean) => PathRef | null;
14
+ move: (data: Record<string, unknown>, from: string, to: string) => boolean;
15
+ remove: (data: Record<string, unknown>, path: string) => boolean;
16
+ transform: (data: Record<string, unknown>, path: string, fn: (value: unknown) => unknown) => boolean;
17
+ fill: (target: Record<string, unknown>, defaults: Record<string, unknown>, mode?: 'merge' | 'cover') => void;
18
+ }
19
+ declare class migration {
20
+ static readonly log: ScopedLog;
21
+ static create(): migration;
22
+ readonly log: ScopedLog;
23
+ readonly utils: Utils;
24
+ steps: Step[];
25
+ private readonly unsafeKeys;
26
+ constructor();
27
+ add(from: string, to: string, apply: Step['apply']): void;
28
+ run(data: Record<string, unknown>, targetVersion: string): void;
29
+ private path;
30
+ private move;
31
+ private compare;
32
+ }
33
+ export default migration;
@@ -0,0 +1,164 @@
1
+ import { MaplebirchCore } from '../core.js';
2
+ import type { ScopedLog } from '../infra/Diagnostics.js';
3
+ import type { Translation } from '../services/Translator.js';
4
+ import NPCSchedules, { ScheduleConfig, ScheduleBuilder } from './NamedNPCAddon/NPCSchedules.js';
5
+ import NPCClothes from './NamedNPCAddon/NPCClothes.js';
6
+ import type { OutfitSetConfig } from './NamedNPCAddon/NPCClothes/NPCOutfitSets.js';
7
+ import NPCSidebar from './NamedNPCAddon/NPCSidebar.js';
8
+ import NPCFluids from './NamedNPCAddon/NPCFluids.js';
9
+ import NPCTransformation from './NamedNPCAddon/NPCTransformation.js';
10
+ import NPCPregnancy, { type NPCPregnancyState } from './NamedNPCAddon/NPCPregnancy.js';
11
+ type PronounCode = 'm' | 'f' | 'i' | 'n' | 't';
12
+ type TranslationInput = Map<string, Translation> | Record<string, Translation>;
13
+ export interface NPCData {
14
+ nam: string;
15
+ gender?: 'm' | 'f' | 'h' | 'n' | 'none';
16
+ pronoun?: PronounCode;
17
+ title?: string;
18
+ description?: string;
19
+ type?: string;
20
+ adult?: number;
21
+ teen?: number;
22
+ age?: number;
23
+ insecurity?: string;
24
+ chastity?: {
25
+ penis: string;
26
+ vagina: string;
27
+ anus: string;
28
+ };
29
+ virginity?: Record<string, boolean>;
30
+ hair_side_type?: string;
31
+ hair_fringe_type?: string;
32
+ hair_position?: string;
33
+ hair_sides_length?: number;
34
+ hair_fringe_length?: number;
35
+ eyeColour?: string;
36
+ hairColour?: string;
37
+ bottomsize?: number;
38
+ skincolour?: number;
39
+ init?: number;
40
+ intro?: number;
41
+ penis?: string;
42
+ penissize?: number;
43
+ penisdesc?: string;
44
+ vagina?: string;
45
+ breastsize?: number;
46
+ breastdesc?: string;
47
+ ballssize?: number;
48
+ outfits?: string[];
49
+ pregnancy?: NPCPregnancyState | null;
50
+ pregnancyAvoidance?: number;
51
+ [key: string]: any;
52
+ }
53
+ export interface NPCConfig {
54
+ love?: {
55
+ maxValue: number;
56
+ };
57
+ loveAlias?: [string, string] | (() => string | [string, string]);
58
+ important?: boolean | (() => boolean);
59
+ special?: boolean | (() => boolean);
60
+ loveInterest?: boolean | (() => boolean);
61
+ romance?: (() => boolean)[];
62
+ [key: string]: unknown;
63
+ }
64
+ export interface NPCStatConfig {
65
+ min?: number;
66
+ max?: number;
67
+ default?: number;
68
+ position?: number | 'first' | 'last' | false;
69
+ [key: string]: unknown;
70
+ }
71
+ export declare const NamedNPC: {
72
+ new (manager: NPCManager, data: NPCData): {
73
+ nam: string;
74
+ gender: 'm' | 'f' | 'h' | 'n' | 'none';
75
+ title: string;
76
+ description: string;
77
+ type: string;
78
+ adult: number;
79
+ teen: number;
80
+ age: number;
81
+ insecurity: string;
82
+ chastity: {
83
+ penis: string;
84
+ vagina: string;
85
+ anus: string;
86
+ };
87
+ virginity: Record<string, boolean>;
88
+ hair_side_type: string;
89
+ hair_fringe_type: string;
90
+ hair_position: string;
91
+ hair_sides_length: number;
92
+ hair_fringe_length: number;
93
+ eyeColour: string;
94
+ hairColour: string;
95
+ pronoun: PronounCode;
96
+ pronouns: Record<string, string>;
97
+ bottomsize: number;
98
+ skincolour: number;
99
+ init: number;
100
+ intro: number;
101
+ penis: string;
102
+ penissize: number;
103
+ penisdesc: string;
104
+ vagina: string;
105
+ breastsize: number;
106
+ breastdesc: string;
107
+ breastsdesc: string;
108
+ bottomdesc: string;
109
+ ballsdesc: string;
110
+ ballssize: number;
111
+ outfits: string[];
112
+ pregnancy: NPCPregnancyState;
113
+ pregnancyAvoidance?: number;
114
+ descCache: Record<string, string>;
115
+ setPronouns(): void;
116
+ setBodyTraits(data: NPCData): void;
117
+ bodyPartdescription(): void;
118
+ };
119
+ } & {
120
+ add: (manager: NPCManager, npcData: NPCData, config?: NPCConfig, translationsData?: TranslationInput) => boolean;
121
+ get: (manager: NPCManager) => string[];
122
+ clear: (manager: NPCManager) => boolean;
123
+ update: (manager: NPCManager) => boolean;
124
+ setup: (manager: NPCManager) => void;
125
+ proxy: (manager: NPCManager) => void;
126
+ convert: (manager: NPCManager) => void;
127
+ };
128
+ declare class NPCManager {
129
+ readonly core: MaplebirchCore;
130
+ readonly log: ScopedLog;
131
+ readonly data: Map<string, {
132
+ Data: InstanceType<typeof NamedNPC>;
133
+ Config: NPCConfig;
134
+ }>;
135
+ NPCNameList: string[];
136
+ readonly Transformation: NPCTransformation;
137
+ readonly Pregnancy: NPCPregnancy;
138
+ readonly type: Record<'loveInterestNpcs' | 'importantNPCs' | 'specialNPCs', string[]>;
139
+ readonly customStats: Record<string, NPCStatConfig>;
140
+ readonly romanceConditions: {
141
+ [key: string]: (() => boolean)[];
142
+ };
143
+ readonly NamedNPC: typeof NamedNPC;
144
+ readonly Schedule: typeof NPCSchedules;
145
+ readonly Clothes: NPCClothes;
146
+ readonly Sidebar: typeof NPCSidebar;
147
+ readonly fluids: NPCFluids;
148
+ constructor(core: MaplebirchCore);
149
+ add(npcData: NPCData, config?: NPCConfig, translationsData?: TranslationInput): boolean;
150
+ addSchedule(npcName: string, config: ScheduleConfig | ScheduleBuilder): import("./NamedNPCAddon/NPCSchedules.js").Schedule;
151
+ addStats(statsObject: Record<string, NPCStatConfig>): void;
152
+ addClothes(...configs: OutfitSetConfig[]): void;
153
+ injectModNPCs(): void;
154
+ vanillaNPCConfig(npcConfig: Record<string, NPCConfig>): Record<string, NPCConfig>;
155
+ applyStatDefaults(statDefaults: Record<string, NPCStatConfig>): Record<string, NPCStatConfig>;
156
+ vanillaInit(npcName: string): void;
157
+ vanillaInject(npcName: string, npcno: number): void;
158
+ private config;
159
+ preInit(): void;
160
+ Init(): void;
161
+ loadInit(): void;
162
+ postInit(): void;
163
+ }
164
+ export default NPCManager;
@@ -0,0 +1,3 @@
1
+ import type { MaplebirchCore } from '../../../core.js';
2
+ export type Condition = boolean | string | (() => boolean) | Condition[];
3
+ export declare function evaluate(core: MaplebirchCore, condition?: Condition): boolean;
@@ -0,0 +1,38 @@
1
+ import type NPCManager from '../../NamedNPC.js';
2
+ interface OutfitPartConfig {
3
+ name: string;
4
+ integrity_max?: number;
5
+ word?: string;
6
+ action?: string;
7
+ readonly desc?: string;
8
+ }
9
+ export interface OutfitSetConfig {
10
+ name: string;
11
+ type?: string;
12
+ gender?: string;
13
+ outfit?: number;
14
+ upper: string | OutfitPartConfig;
15
+ lower: string | OutfitPartConfig;
16
+ desc?: string;
17
+ }
18
+ interface OutfitSet {
19
+ name: string;
20
+ type: string;
21
+ gender: string;
22
+ outfit: number;
23
+ clothes: {
24
+ upper: Required<OutfitPartConfig>;
25
+ lower: Required<OutfitPartConfig>;
26
+ };
27
+ desc: string;
28
+ }
29
+ declare class NPCOutfitSets {
30
+ private readonly manager;
31
+ constructor(manager: NPCManager);
32
+ init(): void;
33
+ add(...configs: OutfitSetConfig[]): void;
34
+ get data(): OutfitSet[];
35
+ private create;
36
+ private createPart;
37
+ }
38
+ export default NPCOutfitSets;
@@ -0,0 +1,25 @@
1
+ import type { ModZipReader } from '@scml/types/sugarcube-2-ModLoader/ModZipReader';
2
+ import NPCManager from '../../NamedNPC.js';
3
+ interface ResolvedArtLayer {
4
+ zIndex: number | string;
5
+ img: string;
6
+ }
7
+ type ArtPart = 'head' | 'face' | 'neck' | 'upper' | 'lower' | 'legs' | 'feet' | 'hands';
8
+ export interface ResolvedArt {
9
+ key: string;
10
+ body: string;
11
+ parts: Partial<Record<ArtPart, ResolvedArtLayer>>;
12
+ }
13
+ declare class NPCSidebarArt {
14
+ private readonly manager;
15
+ private readonly configs;
16
+ constructor(manager: NPCManager);
17
+ import(modName: string, modZip: ModZipReader, filePaths: string | string[]): Promise<string[]>;
18
+ has(npcName: string, key: string): boolean;
19
+ keys(npcName: string): string[];
20
+ get(npcName: string, key: string): ResolvedArt | undefined;
21
+ get layers(): Map<string, Map<string, ResolvedArt>>;
22
+ private setConfig;
23
+ private resolve;
24
+ }
25
+ export default NPCSidebarArt;
@@ -0,0 +1,60 @@
1
+ import { type Condition } from './Condition.js';
2
+ import type NPCManager from '../../NamedNPC.js';
3
+ import type { NPCClothesSlot, NPCSidebarClothing } from '../NPCSidebarConfig/types.js';
4
+ type WardrobeClothing = Partial<NPCSidebarClothing>;
5
+ type WardrobeItem = Partial<Record<NPCClothesSlot, WardrobeClothing>>;
6
+ type WardrobeWetness = 'dry' | 'damp' | 'wet' | 'soaked';
7
+ type WardrobeWetnessResolver = WardrobeWetness | (() => WardrobeWetness);
8
+ interface WardrobeWearOptions {
9
+ when?: Condition;
10
+ wetness?: WardrobeWetnessResolver;
11
+ }
12
+ interface WardrobeConditionGroup {
13
+ location?: string | readonly string[];
14
+ passage?: string | readonly string[];
15
+ hours?: readonly [from: number, to: number];
16
+ }
17
+ type WardrobeWeightedChoice = readonly [key: string, weight: number];
18
+ type WardrobeChoice = string | readonly WardrobeWeightedChoice[];
19
+ type WardrobeLayerResolver = string | (() => string);
20
+ interface WardrobeContext {
21
+ npcName: string;
22
+ location: string;
23
+ key: string;
24
+ wetness: WardrobeWetness;
25
+ }
26
+ type WardrobeModifier = (clothes: WardrobeItem, context: WardrobeContext) => void;
27
+ declare class NPCSidebarWardrobe {
28
+ private readonly manager;
29
+ private readonly templates;
30
+ private readonly profiles;
31
+ private readonly conditions;
32
+ constructor(manager: NPCManager);
33
+ init(): void;
34
+ load(modName: string, filePath: string): Promise<void>;
35
+ get(key: string): WardrobeItem | undefined;
36
+ set(key: string, template: WardrobeItem): void;
37
+ has(key: string): boolean;
38
+ when(name: string, group?: WardrobeConditionGroup, condition?: Condition): () => boolean;
39
+ wear(npcName: string, location: string | readonly string[], choice: WardrobeChoice, options?: Condition | WardrobeWearOptions): void;
40
+ wet(npcName: string, wetness: WardrobeWetnessResolver, cond?: Condition): void;
41
+ layer(npcName: string, source: WardrobeLayerResolver, cond?: Condition): void;
42
+ apply(clothes: WardrobeItem, slot: NPCClothesSlot, item: WardrobeClothing): void;
43
+ put(clothes: WardrobeItem, key: string, slots?: NPCClothesSlot | readonly NPCClothesSlot[]): void;
44
+ strip(clothes: WardrobeItem, slot: NPCClothesSlot | readonly NPCClothesSlot[]): void;
45
+ base(npcName: string, modifier: WardrobeModifier): void;
46
+ modify(npcName: string, modifier: WardrobeModifier): void;
47
+ worn(npcName: string): WardrobeItem;
48
+ private run;
49
+ private add;
50
+ private merge;
51
+ private select;
52
+ private find;
53
+ private choose;
54
+ private findWet;
55
+ private resolveWet;
56
+ private applyWet;
57
+ private profile;
58
+ private location;
59
+ }
60
+ export default NPCSidebarWardrobe;
@@ -0,0 +1,12 @@
1
+ import type NPCManager from '../NamedNPC.js';
2
+ import NPCOutfitSets from './NPCClothes/NPCOutfitSets.js';
3
+ import NPCSidebarArt from './NPCClothes/NPCSidebarArt.js';
4
+ import NPCSidebarWardrobe from './NPCClothes/NPCSidebarWardrobe.js';
5
+ declare class NPCClothes {
6
+ readonly outfitSets: NPCOutfitSets;
7
+ readonly art: NPCSidebarArt;
8
+ readonly wardrobe: NPCSidebarWardrobe;
9
+ constructor(manager: NPCManager);
10
+ init(): void;
11
+ }
12
+ export default NPCClothes;
@@ -0,0 +1,17 @@
1
+ export type NPCFluidPart = 'vagina' | 'vaginaoutside' | 'anus' | 'mouth' | 'penis' | 'chest' | 'face' | 'hair' | 'bottom' | 'feet' | 'leftarm' | 'rightarm' | 'neck' | 'thigh' | 'tummy';
2
+ export type NPCFluidType = 'goo' | 'semen';
3
+ export type NPCFluidAmount = [goo: number, semen: number];
4
+ export type NPCFluidData = Record<NPCFluidPart, NPCFluidAmount>;
5
+ declare class NPCFluids {
6
+ readonly parts: NPCFluidPart[];
7
+ ensure(npcName: string): NPCFluidData;
8
+ get(npcName: string): NPCFluidData;
9
+ combined(npcName: string, part: NPCFluidPart): number;
10
+ set(npcName: string, part: NPCFluidPart, value: number, type?: NPCFluidType): NPCFluidData;
11
+ add(npcName: string, part: NPCFluidPart, value?: number, type?: NPCFluidType): NPCFluidData;
12
+ reduce(npcName: string, part: NPCFluidPart, value?: number, type?: NPCFluidType): NPCFluidData;
13
+ clear(npcName: string, part?: NPCFluidPart, type?: NPCFluidType): NPCFluidData;
14
+ decay(value?: number): void;
15
+ apply(nnpc: Record<string, any>, npcData: any): void;
16
+ }
17
+ export default NPCFluids;
@@ -0,0 +1,127 @@
1
+ import type NPCManager from '../NamedNPC.js';
2
+ export type NPCPregnancySpecies = 'human' | 'wolf' | 'wolfboy' | 'wolfgirl' | 'hawk' | 'harpy';
3
+ export type NPCPregnancyOrifice = 'vagina' | 'anus';
4
+ export type NPCPregnancyRange = number | readonly [min: number, max: number];
5
+ export interface NPCPregnancyState {
6
+ enabled?: boolean;
7
+ analEnabled?: boolean;
8
+ cycleDaysTotal?: number;
9
+ cycleDay?: number;
10
+ cycleDangerousDay?: number;
11
+ fertileLeadDays?: number;
12
+ pills?: 'contraceptive' | 'fertility' | null;
13
+ [key: string]: unknown;
14
+ }
15
+ export interface NPCPregnancyRecord {
16
+ pregnancyId: number;
17
+ carrier: string;
18
+ carrierSpecies: string;
19
+ donor: string;
20
+ donorSpecies: NPCPregnancySpecies;
21
+ possibleDonors: {
22
+ name: string;
23
+ species: NPCPregnancySpecies;
24
+ }[];
25
+ conceivedDate: number;
26
+ conceivedLocation: string;
27
+ gestationVariance: number;
28
+ orifice: NPCPregnancyOrifice;
29
+ deliveredDate: number | null;
30
+ deliveredLocation: string | null;
31
+ awareOfPregnancy: string[];
32
+ awareOfCarrier: string[];
33
+ awareOfDonor: string[];
34
+ talkedAbout: Record<string, boolean>;
35
+ playerLearnedFrom: string | null;
36
+ hatchDelay?: number;
37
+ layCare?: number;
38
+ waterBreaking?: boolean;
39
+ }
40
+ export interface NPCChildRecord {
41
+ childId: number;
42
+ pregnancyId: number;
43
+ species: 'human' | 'wolf' | 'hawk';
44
+ features: {
45
+ beastTransform: string | null;
46
+ divineTransform: string | null;
47
+ hairColour: string;
48
+ eyeColour: string;
49
+ skinColour: string | number;
50
+ size: 'tiny' | 'small' | 'normal' | 'large';
51
+ monster?: 'monster';
52
+ };
53
+ gender: 'm' | 'f' | 'h';
54
+ identical: number | null;
55
+ development: Record<string, unknown>;
56
+ bornDate: number | null;
57
+ name: string | null;
58
+ coParents: string[];
59
+ awareOfChild: string[];
60
+ awareOfGender: string[];
61
+ }
62
+ export interface NPCPregnancyCycleConfig {
63
+ days?: NPCPregnancyRange;
64
+ dangerousDay?: number;
65
+ fertileLeadDays?: NPCPregnancyRange;
66
+ pills?: 'contraceptive' | 'fertility' | null;
67
+ analEnabled?: boolean;
68
+ avoidance?: number;
69
+ }
70
+ export interface NPCPregnancyConfig {
71
+ canBePregnant?: boolean;
72
+ canImpregnatePlayer?: boolean;
73
+ cycle?: NPCPregnancyCycleConfig;
74
+ }
75
+ export interface NPCTryConceiveOptions {
76
+ donor?: string;
77
+ donorSpecies?: NPCPregnancySpecies;
78
+ orifice?: NPCPregnancyOrifice;
79
+ depth?: 'outside' | 'imminent' | 'deep';
80
+ location?: string;
81
+ fertility?: number;
82
+ aware?: boolean;
83
+ donorKnown?: boolean;
84
+ }
85
+ export interface NPCPregnancySnapshot {
86
+ cycle: {
87
+ enabled: boolean;
88
+ day: number | null;
89
+ days: number | null;
90
+ dangerousDay: number | null;
91
+ fertileLeadDays: number | null;
92
+ fertility: number;
93
+ pills: NPCPregnancyState['pills'];
94
+ analEnabled: boolean;
95
+ avoidance: number | null;
96
+ };
97
+ pregnancies: NPCPregnancyRecord[];
98
+ progress: number | null;
99
+ dueDate: number | null;
100
+ belly: number;
101
+ }
102
+ export declare function isPregnancySpecies(value: unknown): value is NPCPregnancySpecies;
103
+ declare class NPCPregnancy {
104
+ private readonly manager;
105
+ private readonly configs;
106
+ private initialized;
107
+ constructor(manager: NPCManager);
108
+ get available(): boolean;
109
+ add(npcName: string, config?: NPCPregnancyConfig): this;
110
+ init(): void;
111
+ inject(): void;
112
+ get(npcName: string): NPCPregnancySnapshot;
113
+ tryConceive(npcName: string, options?: NPCTryConceiveOptions): NPCPregnancyRecord | null;
114
+ private applyRegistration;
115
+ private applyCycle;
116
+ private validateCycle;
117
+ private validateRange;
118
+ private cycleConfigured;
119
+ private markCycleConfigured;
120
+ private species;
121
+ private name;
122
+ private npc;
123
+ private requireRuntime;
124
+ private range;
125
+ private random;
126
+ }
127
+ export default NPCPregnancy;