@scml-dol-maplebirch/types 5.4.12 → 5.4.14
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/DoLP.d.ts
CHANGED
|
@@ -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;
|
|
@@ -19,6 +20,7 @@ interface TransformationPatch {
|
|
|
19
20
|
traits?: TransformationPart[];
|
|
20
21
|
}
|
|
21
22
|
declare class DoLPTransformations {
|
|
23
|
+
static install(transformation: Transformation): void;
|
|
22
24
|
static active(name: string, part: string): boolean;
|
|
23
25
|
static readonly PreservedTraits: readonly ['fangs', 'sharpEyes', 'dragonEyes', 'mateForLife', 'chase', 'flaunting', 'preyAnimal', 'strongFeet', 'predatoryAnimal', 'tempTolerance', 'aquatic', 'wdgrace', 'activeTF'];
|
|
24
26
|
static readonly AnimalTransforms: NativeTransformState[];
|
package/compat/DoLX.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
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
|
+
}
|
|
2
11
|
declare class DoLX {
|
|
3
12
|
static get isDoLX(): boolean;
|
|
4
13
|
static readonly PreservedTraits: readonly ['dragonTongue', 'ironWill', 'leviathan'];
|
|
14
|
+
static readonly Transformations: typeof DoLXTransformations;
|
|
5
15
|
static install(core: MaplebirchCore): void;
|
|
6
16
|
static extend(valid: {
|
|
7
17
|
names: Set<string>;
|
package/compat/NewWorld.d.ts
CHANGED
|
@@ -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;
|
|
@@ -15,6 +16,7 @@ interface SetupTransformation {
|
|
|
15
16
|
traits: TransformationPart[];
|
|
16
17
|
}
|
|
17
18
|
declare class NewWorldTransformations {
|
|
19
|
+
static install(transformation: Transformation): void;
|
|
18
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'];
|
|
19
21
|
static readonly AnimalTransforms: NativeTransformState[];
|
|
20
22
|
static readonly AnimalMacros: NativeMacroMap;
|
|
@@ -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,15 +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
|
-
private get isDoLX();
|
|
59
|
-
private get isNewWorld();
|
|
60
87
|
get coexist(): boolean;
|
|
61
|
-
private get animalTransforms();
|
|
62
|
-
private get animalMacros();
|
|
63
|
-
private get historyTransforms();
|
|
64
88
|
wikifier(widget: string, ...args: any[]): any;
|
|
65
89
|
modifyEffect(manager: AddonPlugin): void;
|
|
66
90
|
add(name: string, type: string, options: TransformationOption): this;
|