From bdbda6456c421e6ff5e69fd7d49d41fbe42c2132 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Tue, 28 Jan 2025 16:32:16 +0100 Subject: [PATCH] CharHair work --- src/components/game/character/Character.vue | 61 +++++++++++-------- .../game/character/partials/CharacterHair.vue | 33 ++++++---- src/storage/storages.ts | 5 ++ 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/components/game/character/Character.vue b/src/components/game/character/Character.vue index 2c0807f..a1ecb00 100644 --- a/src/components/game/character/Character.vue +++ b/src/components/game/character/Character.vue @@ -1,12 +1,14 @@ diff --git a/src/storage/storages.ts b/src/storage/storages.ts index 96bf41b..396f6ac 100644 --- a/src/storage/storages.ts +++ b/src/storage/storages.ts @@ -40,4 +40,9 @@ export class CharacterHairStorage extends BaseStorage { constructor() { super('characterHairs', 'id, name, createdAt, updatedAt') } + + async getSpriteId(characterTypeId: string) { + const characterType = await this.get(characterTypeId) + return characterType?.sprite + } }