@scml/addon-modded-feats 1.0.0

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/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # DoL_ModdedFeatsAddon
2
+
3
+ ## Type definition source
4
+
5
+ Type definitions are from the repository:
6
+
7
+ - https://github.com/Lyoko-Jeremie/DoL_ModdedFeatsAddon
8
+
9
+ Fetched from the `master` branch by default. Build: `pnpm run download && pnpm run build`.
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@scml/addon-modded-feats",
3
+ "version": "1.0.0",
4
+ "private": false,
5
+ "description": "SugarCube 2 Mod Loader Workspace",
6
+ "license": "MIT",
7
+ "author": {
8
+ "name": "Rikka",
9
+ "email": "admin@rikka.cc",
10
+ "url": "https://github.com/Muromi-Rikka"
11
+ },
12
+ "files": [
13
+ "type-dist",
14
+ "README.md"
15
+ ],
16
+ "type": "module",
17
+ "types": "./type-dist/global.ts",
18
+ "exports": {
19
+ "./ModdedFeatsAddon": "./type-dist/ModdedFeatsAddon.d.ts",
20
+ "./ModdedFeatsAddonParams": "./type-dist/ModdedFeatsAddonParams.d.ts"
21
+ },
22
+ "dependencies": {
23
+ "@scml/sc2-modloader": "1.0.0",
24
+ "@scml/utils": "1.0.0"
25
+ },
26
+ "scripts": {
27
+ "download": "tsx src/download.ts",
28
+ "build": "tsdown && tsx src/after-build.ts",
29
+ "typecheck": "tsc --noEmit"
30
+ }
31
+ }
@@ -0,0 +1,23 @@
1
+ import { a as LogWrapper, i as LifeTimeCircleHook, n as ModUtils, o as ModInfo, r as AddonPluginHookPointEx, s as ModZipReader, t as SC2DataManager } from "./SC2DataManager-B_DJOxR6.js";
2
+ import { FeatsObject } from "./winDef.js";
3
+ import JSZip from "jszip";
4
+
5
+ //#region remote/ModdedFeatsAddon.d.ts
6
+ declare class ModdedFeatsAddon implements LifeTimeCircleHook, AddonPluginHookPointEx {
7
+ gSC2DataManager: SC2DataManager;
8
+ gModUtils: ModUtils;
9
+ logger: LogWrapper;
10
+ isInit: boolean;
11
+ constructor(gSC2DataManager: SC2DataManager, gModUtils: ModUtils);
12
+ featsData: Map<string, FeatsObject>;
13
+ registerMod(addonName: string, mod: ModInfo, modZip: ModZipReader): Promise<void>;
14
+ exportDataZip(zip: JSZip): Promise<JSZip>;
15
+ init(): void;
16
+ }
17
+ /**
18
+ * Merge feats object o and b, create new one. check same key and error it.
19
+ */
20
+ declare function mergeFeatsObject(b: FeatsObject, o: FeatsObject, modName: string, logger: LogWrapper): any;
21
+ declare function appendFeatsObject(b: FeatsObject, o: FeatsObject, logger: LogWrapper): void;
22
+ //#endregion
23
+ export { ModdedFeatsAddon, appendFeatsObject, mergeFeatsObject };
@@ -0,0 +1,11 @@
1
+ import "./SC2DataManager-B_DJOxR6.js";
2
+ import { FeatsObject } from "./winDef.js";
3
+
4
+ //#region remote/ModdedFeatsAddonParams.d.ts
5
+ interface ModdedClothesFeatsParams {
6
+ feats: string[];
7
+ }
8
+ declare function checkParams(a: any): a is ModdedClothesFeatsParams;
9
+ declare function checkFeatsItem(a: any): a is FeatsObject;
10
+ //#endregion
11
+ export { ModdedClothesFeatsParams, checkFeatsItem, checkParams };