Add skins overview for champions

This commit is contained in:
BlossomiShymae
2024-09-14 17:35:32 -05:00
parent c51a215720
commit 58dd774cd4
4 changed files with 124 additions and 4 deletions

View File

@@ -74,6 +74,12 @@ export class Skin extends CommunityDragonObject {
rarity: string;
isLegacy: boolean;
loadScreenPath: string;
splashPath: string;
uncenteredSplashPath: string;
tilePath: string;
description?: string;
skinLines?: Array<SkinLine>;
constructor(json: any) {
super();
@@ -84,11 +90,38 @@ export class Skin extends CommunityDragonObject {
this.rarity = json.rarity;
this.isLegacy = json.isLegacy;
this.loadScreenPath = json.loadScreenPath;
this.splashPath = json.splashPath;
this.uncenteredSplashPath = json.uncenteredSplashPath;
this.tilePath = json.tilePath;
this.description = json.description;
this.skinLines = json.skinLines?.map((x: any) => new SkinLine(x)) ?? null;
}
getLoadScreen(version: string): string {
return this.resolveGamePath({path: this.loadScreenPath, version: version});
}
getSplash(args: LocaleVersionArgs): string {
return this.resolveClientPath({path: this.splashPath, args: args});
}
getUncenteredSplash(args: LocaleVersionArgs): string {
return this.resolveClientPath({path: this.uncenteredSplashPath, args: args});
}
getTile(args: LocaleVersionArgs): string {
return this.resolveClientPath({path: this.tilePath, args: args});
}
}
export class SkinLine extends CommunityDragonObject {
id: number;
constructor(json: any) {
super();
this.id = json.id;
}
}
export class Passive extends CommunityDragonObject {