@scml/addon-modded-clothes 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 +9 -0
- package/package.json +31 -0
- package/type-dist/ModdedClothesAddon.d.ts +37 -0
- package/type-dist/ModdedClothesAddonParams.d.ts +22 -0
- package/type-dist/global.ts +6 -0
- package/type-dist/init.d.ts +1 -0
- package/type-dist/winDef.d.ts +1550 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scml/addon-modded-clothes",
|
|
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
|
+
"./ModdedClothesAddon": "./type-dist/ModdedClothesAddon.d.ts",
|
|
20
|
+
"./ModdedClothesAddonParams": "./type-dist/ModdedClothesAddonParams.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,37 @@
|
|
|
1
|
+
import { a as LogWrapper, i as LifeTimeCircleHook, n as ModUtils, o as ModInfo, r as AddonPluginHookPointEx, s as ModZipReader, t as SC2DataManager } from "./winDef.js";
|
|
2
|
+
import { ClothesPatchInfo } from "./ModdedClothesAddonParams.js";
|
|
3
|
+
import JSZip from "jszip";
|
|
4
|
+
|
|
5
|
+
//#region remote/ModdedClothesAddon.d.ts
|
|
6
|
+
interface ClothesInfo {
|
|
7
|
+
key: string;
|
|
8
|
+
data: ClothesItem[];
|
|
9
|
+
}
|
|
10
|
+
interface ClothesAddInfo {
|
|
11
|
+
modName: string;
|
|
12
|
+
clothes: ClothesInfo[];
|
|
13
|
+
patch: ClothesPatchInfo[];
|
|
14
|
+
}
|
|
15
|
+
declare class ModdedClothesAddon implements LifeTimeCircleHook, AddonPluginHookPointEx {
|
|
16
|
+
gSC2DataManager: SC2DataManager;
|
|
17
|
+
gModUtils: ModUtils;
|
|
18
|
+
logger: LogWrapper;
|
|
19
|
+
constructor(gSC2DataManager: SC2DataManager, gModUtils: ModUtils);
|
|
20
|
+
isInit: boolean;
|
|
21
|
+
changedPaths: Set<string>;
|
|
22
|
+
clothesAddInfo: Map<string, ClothesAddInfo>;
|
|
23
|
+
registerMod(addonName: string, mod: ModInfo, modZip: ModZipReader): Promise<void>;
|
|
24
|
+
exportDataZip(zip: JSZip): Promise<JSZip>;
|
|
25
|
+
addClothes(info: ClothesAddInfo): void;
|
|
26
|
+
init(): void;
|
|
27
|
+
}
|
|
28
|
+
declare function searchClothesByName(name: string): {
|
|
29
|
+
c: ClothesItem;
|
|
30
|
+
t: string;
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* do the check for `window.getTrueWarmth()`
|
|
34
|
+
*/
|
|
35
|
+
declare function checkForOutfitWarmth(logger: LogWrapper): void;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ClothesAddInfo, ClothesInfo, ModdedClothesAddon, checkForOutfitWarmth, searchClothesByName };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./winDef.js";
|
|
2
|
+
|
|
3
|
+
//#region remote/ModdedClothesAddonParams.d.ts
|
|
4
|
+
interface AddClothesItem {
|
|
5
|
+
key: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
data?: ClothesItem[];
|
|
8
|
+
}
|
|
9
|
+
interface ModdedClothesAddonParams {
|
|
10
|
+
clothes: AddClothesItem[];
|
|
11
|
+
patch?: string[];
|
|
12
|
+
}
|
|
13
|
+
type ClothesPatchUpdateType = { [key in keyof (Partial<ClothesItem> & Pick<ClothesItem, 'name'>)]: (ClothesItem)[key] | null };
|
|
14
|
+
interface ClothesPatchInfo {
|
|
15
|
+
key: string;
|
|
16
|
+
data: ClothesPatchUpdateType[];
|
|
17
|
+
}
|
|
18
|
+
declare function checkAddClothesItem(a: any): a is AddClothesItem;
|
|
19
|
+
declare function checkClothesPatchInfo(a: any): a is ClothesPatchInfo;
|
|
20
|
+
declare function checkParams(a: any): a is ModdedClothesAddonParams;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { AddClothesItem, ClothesPatchInfo, ClothesPatchUpdateType, ModdedClothesAddonParams, checkAddClothesItem, checkClothesPatchInfo, checkParams };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|