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
+2 -2
View File
@@ -10,7 +10,7 @@
"@takumi-rs/image-response": "^0.71.7",
"@types/react": "^19.2.14",
"elysia": "latest",
"enka.ts": "^1.1.4",
"enka.ts": "^1.1.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tw-to-css": "^0.0.12",
@@ -155,7 +155,7 @@
"elysia": ["[email protected]", "", { "dependencies": { "cookie": "^1.1.1", "exact-mirror": "^0.2.7", "fast-decode-uri-component": "^1.0.1", "memoirist": "^0.4.0" }, "peerDependencies": { "@sinclair/typebox": ">= 0.34.0 < 1", "@types/bun": ">= 1.2.0", "file-type": ">= 20.0.0", "openapi-types": ">= 12.0.0", "typescript": ">= 5.0.0" }, "optionalPeers": ["@types/bun", "typescript"] }, "sha512-2UlmNEjPJVA/WZVPYKy+KdsrfFwwNlqSBW1lHz6i2AHc75k7gV4Rhm01kFeotH7PDiHIX2G8X3KnRPc33SGVIg=="],
"enka.ts": ["[email protected].4", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-whRbg1zjGAN2AGp/grBwdrj5kcy7F2ULL2L+vQhpsOBZaFvu2aQWTNxLXvCGRQinrLlu1LBiWvjJ2PHtgF7grQ=="],
"enka.ts": ["[email protected].6", "", { "peerDependencies": { "typescript": "^5" } }, "sha512-zVSZeERdw7cdczH2BBLoU7cJdXOojeVaWAIscID4q6ZvqXZjsc3mdSEr/vlYVJVoas4htF0IrDndpA4IoaYNVQ=="],
"escape-string-regexp": ["[email protected]", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],
+1 -1
View File
@@ -12,7 +12,7 @@
"@takumi-rs/image-response": "^0.71.7",
"@types/react": "^19.2.14",
"elysia": "latest",
"enka.ts": "^1.1.4",
"enka.ts": "^1.1.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"tw-to-css": "^0.0.12"
+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) => ({