@scml/addon-modded-clothes
TypeScript type definitions for Modded clothes addon, for adding and patching modded clothes data.
Installation
Quick Start
Add type reference
Add triple-slash directive in your project to bring in global types:
Use global instance
addonModdedClothesAddon is mounted on window; you can call its methods directly:
Import types on demand
If you only need to import specific types, use subpaths:
Global Types global
Main entry extends Window via /// <reference types="..." />. global The following property is on window:
Subpath Exports
API Reference
./ModdedClothesAddon
ModdedClothesAddon class
Addon plugin class implementing LifeTimeCircleHook and AddonPluginHookPointEx, manages clothesAddInfo.
Constructor
Properties
Methods
ClothesAddInfo interface
ClothesInfo interface
searchClothesByName() method
- Signature:
searchClothesByName(name: string): { c: ClothesItem; t: string }[] - Parameter:
name- Clothes name - Returns: Matched clothes items with keys
checkForOutfitWarmth() method
- Signature:
checkForOutfitWarmth(logger: LogWrapper): void - Description: Run outfit warmth check for
window.getTrueWarmth()
./ModdedClothesAddonParams
ModdedClothesAddonParams interface
Mod config params for mod.json or similar.
AddClothesItem interface
ClothesPatchInfo interface
ClothesPatchUpdateType type
Partial update type for ClothesItem; keys are ClothesItem properties, values are new value or null.
checkParams() / checkAddClothesItem() / checkClothesPatchInfo() type guard
checkParams(a: any): a is ModdedClothesAddonParamscheckAddClothesItem(a: any): a is AddClothesItemcheckClothesPatchInfo(a: any): a is ClothesPatchInfo
Type Definition Source
INFO
- Upstream: https://github.com/Lyoko-Jeremie/DoL_ModdedClothesAddon
- Default branch: master
- Build:
pnpm run download && pnpm run build
