fix: support custom costume

This commit is contained in:
2026-03-20 13:52:39 +07:00 Unverified
parent b497eac249
commit f3b0beb9f9
4 changed files with 10 additions and 7 deletions
+1
View File
@@ -22,6 +22,7 @@ export class AssetManager {
...Object.values(avatars).flatMap((a) => [
...a.Consts,
...Object.values(a.Skills),
...Object.values(a.Costumes ?? {}).map((c) => c.Art),
a.SideIconName.replace("AvatarIcon_Side", "Gacha_AvatarImg"),
]),
...Object.values(weapons).flatMap((w) => [w.Icon, w.AwakenIcon]),
+6 -4
View File
@@ -157,10 +157,12 @@ export function card(app: App) {
),
assets
.hook(
avatar.SideIconName.replace(
"AvatarIcon_Side",
"Gacha_AvatarImg",
),
char.costumeId
? avatar.Costumes![char.costumeId].Art
: avatar.SideIconName.replace(
"AvatarIcon_Side",
"Gacha_AvatarImg",
),
(buf) => featherImage(buf, [0, 0.3, 0, 0]),
)
.then(async (data) => ({