@scml-dol-maplebirch/types 5.4.11 → 5.4.13
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 → DoLP.d.ts} +11 -9
- package/compat/DoLX.d.ts +21 -0
- package/compat/NewWorld.d.ts +42 -0
- package/index.d.ts +3 -0
- package/maplebirch.d.ts +3 -0
- package/modules/Character.d.ts +1 -1
- package/modules/CharacterAddon/Pet.d.ts +3 -2
- package/modules/CharacterAddon/Transformation.d.ts +30 -4
- package/package.json +1 -1
- package/types/global.d.ts +10 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type Transformation from '../modules/CharacterAddon/Transformation.js';
|
|
2
3
|
import type { BuildUpdater, DecayCondition, NativeHistoryEntry, NativeMacroMap, NativeTransformState, SuppressCondition } from '../modules/CharacterAddon/TransformationConfig.js';
|
|
3
4
|
interface TransformationPart {
|
|
4
5
|
name: string;
|
|
@@ -18,17 +19,18 @@ interface TransformationPatch {
|
|
|
18
19
|
parts?: TransformationPart[];
|
|
19
20
|
traits?: TransformationPart[];
|
|
20
21
|
}
|
|
21
|
-
declare class
|
|
22
|
-
|
|
23
|
-
static
|
|
24
|
-
static readonly
|
|
22
|
+
declare class DoLPTransformations {
|
|
23
|
+
static install(transformation: Transformation): void;
|
|
24
|
+
static active(name: string, part: string): boolean;
|
|
25
|
+
static readonly PreservedTraits: readonly ['fangs', 'sharpEyes', 'dragonEyes', 'mateForLife', 'chase', 'flaunting', 'preyAnimal', 'strongFeet', 'predatoryAnimal', 'tempTolerance', 'aquatic', 'wdgrace', 'activeTF'];
|
|
25
26
|
static readonly AnimalTransforms: NativeTransformState[];
|
|
26
27
|
static readonly AnimalMacros: NativeMacroMap;
|
|
27
28
|
static readonly HistoryTransforms: NativeHistoryEntry[];
|
|
29
|
+
static readonly DecayConditions: Record<string, DecayCondition[]>;
|
|
30
|
+
static readonly SuppressConditions: Record<string, SuppressCondition[]>;
|
|
28
31
|
static readonly BuildUpdaters: Record<string, BuildUpdater>;
|
|
29
32
|
static readonly TransformationPatches: Record<string, TransformationPatch>;
|
|
30
33
|
static readonly Transformations: SetupTransformation[];
|
|
31
|
-
static readonly PreservedTraits: string[];
|
|
32
34
|
static change(change: number): number;
|
|
33
35
|
static composite(): void;
|
|
34
36
|
private static forceAngel;
|
|
@@ -44,12 +46,12 @@ declare class Transformations {
|
|
|
44
46
|
private static mergeProperties;
|
|
45
47
|
private static mergeParts;
|
|
46
48
|
}
|
|
47
|
-
declare class
|
|
49
|
+
declare class DoLP {
|
|
48
50
|
static get isDoLP(): boolean;
|
|
49
51
|
static install(core: MaplebirchCore): void;
|
|
50
|
-
static readonly Transformations: typeof
|
|
52
|
+
static readonly Transformations: typeof DoLPTransformations;
|
|
51
53
|
static nnpc: {
|
|
52
|
-
showfn: (options: Record<string,
|
|
54
|
+
showfn: (options: Record<string, unknown>) => boolean;
|
|
53
55
|
};
|
|
54
56
|
}
|
|
55
|
-
export default
|
|
57
|
+
export default DoLP;
|
package/compat/DoLX.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type Transformation from '../modules/CharacterAddon/Transformation.js';
|
|
3
|
+
import { type DecayCondition, type SuppressCondition } from '../modules/CharacterAddon/TransformationConfig.js';
|
|
4
|
+
declare class DoLXTransformations {
|
|
5
|
+
static install(transformation: Transformation): void;
|
|
6
|
+
static readonly DecayConditions: Record<string, DecayCondition[]>;
|
|
7
|
+
static readonly SuppressConditions: Record<string, SuppressCondition[]>;
|
|
8
|
+
private static bearDecay;
|
|
9
|
+
static divine(): [string, number] | undefined;
|
|
10
|
+
}
|
|
11
|
+
declare class DoLX {
|
|
12
|
+
static get isDoLX(): boolean;
|
|
13
|
+
static readonly PreservedTraits: readonly ['dragonTongue', 'ironWill', 'leviathan'];
|
|
14
|
+
static readonly Transformations: typeof DoLXTransformations;
|
|
15
|
+
static install(core: MaplebirchCore): void;
|
|
16
|
+
static extend(valid: {
|
|
17
|
+
names: Set<string>;
|
|
18
|
+
traits: Set<string>;
|
|
19
|
+
}): void;
|
|
20
|
+
}
|
|
21
|
+
export default DoLX;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { MaplebirchCore } from '../core.js';
|
|
2
|
+
import type Transformation from '../modules/CharacterAddon/Transformation.js';
|
|
3
|
+
import type { BuildUpdater, DecayCondition, NativeHistoryEntry, NativeMacroMap, NativeTransformState, SuppressCondition } from '../modules/CharacterAddon/TransformationConfig.js';
|
|
4
|
+
interface TransformationPart {
|
|
5
|
+
name: string;
|
|
6
|
+
tfRequired: number;
|
|
7
|
+
default?: string;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface SetupTransformation {
|
|
11
|
+
name: string;
|
|
12
|
+
readonly level: number;
|
|
13
|
+
readonly build: number;
|
|
14
|
+
type: string;
|
|
15
|
+
parts: TransformationPart[];
|
|
16
|
+
traits: TransformationPart[];
|
|
17
|
+
}
|
|
18
|
+
declare class NewWorldTransformations {
|
|
19
|
+
static install(transformation: Transformation): void;
|
|
20
|
+
static readonly PreservedTraits: readonly ['fangs', 'sharpEyes', 'dragonEyes', 'dragonTongue', 'mateForLife', 'chase', 'flaunting', 'ironWill', 'preyAnimal', 'strongFeet', 'predatoryAnimal', 'tempTolerance', 'aquatic', 'leviathan', 'incognito', 'kicks', 'strongnose', 'lungs', 'aquatail', 'vigorous', 'longtongue', 'webbedfeet'];
|
|
21
|
+
static readonly AnimalTransforms: NativeTransformState[];
|
|
22
|
+
static readonly AnimalMacros: NativeMacroMap;
|
|
23
|
+
static readonly HistoryTransforms: NativeHistoryEntry[];
|
|
24
|
+
static readonly DecayConditions: Record<string, DecayCondition[]>;
|
|
25
|
+
static readonly SuppressConditions: Record<string, SuppressCondition[]>;
|
|
26
|
+
static readonly BuildUpdaters: Record<string, BuildUpdater>;
|
|
27
|
+
static readonly Transformations: SetupTransformation[];
|
|
28
|
+
static extend(valid: {
|
|
29
|
+
names: Set<string>;
|
|
30
|
+
traits: Set<string>;
|
|
31
|
+
}): void;
|
|
32
|
+
static merge<T extends {
|
|
33
|
+
name?: string;
|
|
34
|
+
}>(base: T[]): Array<T | SetupTransformation>;
|
|
35
|
+
}
|
|
36
|
+
declare class NewWorld {
|
|
37
|
+
static get isNewWorld(): boolean;
|
|
38
|
+
static readonly Transformations: typeof NewWorldTransformations;
|
|
39
|
+
static guard(): void;
|
|
40
|
+
static install(core: MaplebirchCore): void;
|
|
41
|
+
}
|
|
42
|
+
export default NewWorld;
|
package/index.d.ts
CHANGED
|
@@ -9,3 +9,6 @@ export type { CoreModules } from './modules/DoL/types.js';
|
|
|
9
9
|
export { default as DoLDynamic } from './modules/DoL/Dynamic.js';
|
|
10
10
|
export { default as DoLToolCollection } from './modules/DoL/ToolCollection.js';
|
|
11
11
|
export { default as ImageLoader } from './modules/Frameworks/ImageLoader.js';
|
|
12
|
+
export { default as DoLP } from './compat/DoLP.js';
|
|
13
|
+
export { default as DoLX } from './compat/DoLX.js';
|
|
14
|
+
export { default as NewWorld } from './compat/NewWorld.js';
|
package/maplebirch.d.ts
CHANGED
|
@@ -9,3 +9,6 @@ export type { CoreModules } from './modules/DoL/types.js';
|
|
|
9
9
|
export { default as DoLDynamic } from './modules/DoL/Dynamic.js';
|
|
10
10
|
export { default as DoLToolCollection } from './modules/DoL/ToolCollection.js';
|
|
11
11
|
export { default as ImageLoader } from './modules/Frameworks/ImageLoader.js';
|
|
12
|
+
export { default as DoLP } from './compat/DoLP.js';
|
|
13
|
+
export { default as DoLX } from './compat/DoLX.js';
|
|
14
|
+
export { default as NewWorld } from './compat/NewWorld.js';
|
package/modules/Character.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ScopedLog } from '../infra/Diagnostics.js';
|
|
|
3
3
|
import type AddonPlugin from '../services/AddonPlugin.js';
|
|
4
4
|
import Pet from './CharacterAddon/Pet.js';
|
|
5
5
|
import Transformation from './CharacterAddon/Transformation.js';
|
|
6
|
-
export type ProcessType = 'pre' | 'post';
|
|
6
|
+
export type ProcessType = 'before' | 'pre' | 'post';
|
|
7
7
|
export type ModelTarget<TModel = CanvasModel | CanvasModelOptions> = string | string[] | ((modelName: string, model?: TModel) => boolean);
|
|
8
8
|
export type ProcessHandler = (options: any, model?: CanvasModel) => void;
|
|
9
9
|
interface LayerUseOptions {
|
|
@@ -4,6 +4,7 @@ export interface PetOptions {
|
|
|
4
4
|
rotation?: number;
|
|
5
5
|
animated?: boolean;
|
|
6
6
|
floating?: boolean;
|
|
7
|
+
locked?: boolean;
|
|
7
8
|
scale?: number;
|
|
8
9
|
}
|
|
9
10
|
export interface PetSettings extends PetOptions {
|
|
@@ -29,7 +30,7 @@ export declare abstract class FloatingPet {
|
|
|
29
30
|
protected model?: CanvasModel;
|
|
30
31
|
protected container?: HTMLElement;
|
|
31
32
|
protected options: Required<PetOptions>;
|
|
32
|
-
private
|
|
33
|
+
private cleanupFloating?;
|
|
33
34
|
protected constructor(host: PetHost, petConfig: FloatingPetConfig);
|
|
34
35
|
configure(options?: PetOptions): this;
|
|
35
36
|
unmount(): void;
|
|
@@ -39,7 +40,7 @@ export declare abstract class FloatingPet {
|
|
|
39
40
|
protected stopAnimation(): void;
|
|
40
41
|
private get displaySize();
|
|
41
42
|
private clearBox;
|
|
42
|
-
private
|
|
43
|
+
private enableFloating;
|
|
43
44
|
}
|
|
44
45
|
declare class Pet extends FloatingPet {
|
|
45
46
|
private manager;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Hooks from '../../infra/Hooks.js';
|
|
1
2
|
import type { Translation } from '../../services/Translator.js';
|
|
2
3
|
import type AddonPlugin from '../../services/AddonPlugin.js';
|
|
3
4
|
import type Character from '../Character.js';
|
|
@@ -44,6 +45,12 @@ interface TransformationOption extends EntryOptions {
|
|
|
44
45
|
parts: Part[];
|
|
45
46
|
traits?: Part[];
|
|
46
47
|
}
|
|
48
|
+
interface NativeTransformation {
|
|
49
|
+
name?: string;
|
|
50
|
+
parts?: Part[];
|
|
51
|
+
traits?: Part[];
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
}
|
|
47
54
|
declare class Transformation {
|
|
48
55
|
private manager;
|
|
49
56
|
private get log();
|
|
@@ -52,13 +59,32 @@ declare class Transformation {
|
|
|
52
59
|
readonly decayConditions: Record<string, DecayCondition[]>;
|
|
53
60
|
readonly suppressConditions: Record<string, SuppressCondition[]>;
|
|
54
61
|
readonly buildUpdaters: Record<string, BuildUpdater>;
|
|
62
|
+
readonly animalTransforms: import("./TransformationConfig.js").NativeTransformState[];
|
|
63
|
+
readonly animalMacros: {
|
|
64
|
+
[x: string]: [string, () => number];
|
|
65
|
+
};
|
|
66
|
+
readonly historyTransforms: import("./TransformationConfig.js").NativeHistoryEntry[];
|
|
55
67
|
readonly coexistConditions: Array<() => boolean>;
|
|
68
|
+
readonly protectConditions: Array<() => boolean>;
|
|
69
|
+
readonly hooks: {
|
|
70
|
+
change: Hooks<[context: {
|
|
71
|
+
readonly name: string;
|
|
72
|
+
change: number;
|
|
73
|
+
}], void>;
|
|
74
|
+
update: Hooks<[stage: "after" | "alter" | "before", transformation: Transformation], void>;
|
|
75
|
+
divine: Hooks<[context: {
|
|
76
|
+
widget?: [string, number];
|
|
77
|
+
}], void>;
|
|
78
|
+
setup: Hooks<[context: {
|
|
79
|
+
transformations: NativeTransformation[];
|
|
80
|
+
}], void>;
|
|
81
|
+
clear: Hooks<[valid: {
|
|
82
|
+
names: Set<string>;
|
|
83
|
+
traits: Set<string>;
|
|
84
|
+
}], void>;
|
|
85
|
+
};
|
|
56
86
|
constructor(manager: Character);
|
|
57
|
-
private get isDoLP();
|
|
58
87
|
get coexist(): boolean;
|
|
59
|
-
private get animalTransforms();
|
|
60
|
-
private get animalMacros();
|
|
61
|
-
private get historyTransforms();
|
|
62
88
|
wikifier(widget: string, ...args: any[]): any;
|
|
63
89
|
modifyEffect(manager: AddonPlugin): void;
|
|
64
90
|
add(name: string, type: string, options: TransformationOption): this;
|
package/package.json
CHANGED
package/types/global.d.ts
CHANGED
|
@@ -75,6 +75,16 @@ declare global {
|
|
|
75
75
|
};
|
|
76
76
|
pregnancyDaysEta: typeof pregnancyDaysEta;
|
|
77
77
|
getChildDays: typeof getChildDays;
|
|
78
|
+
Transformations?: {
|
|
79
|
+
defaults?: Record<string, {
|
|
80
|
+
colour?: {
|
|
81
|
+
h: number;
|
|
82
|
+
s: number;
|
|
83
|
+
l: number;
|
|
84
|
+
};
|
|
85
|
+
}>;
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
};
|
|
78
88
|
}
|
|
79
89
|
const lanSwitch: typeof _languageSwitch;
|
|
80
90
|
const Links: LinksAPI;
|