From fce05870c5453334fe5ebb0fb1e575c4a01a74f6 Mon Sep 17 00:00:00 2001 From: Nacho Date: Sat, 26 Jul 2025 14:23:53 +0200 Subject: [PATCH] This should allow the app to build, otherwise it won't or it will crash --- .../github/nacabaro/vbhelper/domain/characters/Character.kt | 3 ++- .../screens/settingsScreen/SettingsScreenControllerImpl.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/nacabaro/vbhelper/domain/characters/Character.kt b/app/src/main/java/com/github/nacabaro/vbhelper/domain/characters/Character.kt index 52f8010..0480b08 100644 --- a/app/src/main/java/com/github/nacabaro/vbhelper/domain/characters/Character.kt +++ b/app/src/main/java/com/github/nacabaro/vbhelper/domain/characters/Character.kt @@ -3,6 +3,7 @@ package com.github.nacabaro.vbhelper.domain.characters import androidx.room.Entity import androidx.room.PrimaryKey import androidx.room.ForeignKey +import com.github.cfogrady.vbnfc.data.NfcCharacter @Entity( foreignKeys = [ @@ -25,7 +26,7 @@ data class Character ( val monIndex: Int, val name: ByteArray, val stage: Int, // These should be replaced with enums - val attribute: Int, // This one too + val attribute: NfcCharacter.Attribute, // This one too val baseHp: Int, val baseBp: Int, val baseAp: Int, diff --git a/app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreenControllerImpl.kt b/app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreenControllerImpl.kt index a9c87cc..6e87c13 100644 --- a/app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreenControllerImpl.kt +++ b/app/src/main/java/com/github/nacabaro/vbhelper/screens/settingsScreen/SettingsScreenControllerImpl.kt @@ -11,6 +11,7 @@ import androidx.activity.result.ActivityResultLauncher import androidx.activity.result.contract.ActivityResultContracts import com.github.cfogrady.vb.dim.card.BemCard import com.github.cfogrady.vb.dim.card.DimReader +import com.github.cfogrady.vbnfc.data.NfcCharacter import com.github.nacabaro.vbhelper.database.AppDatabase import com.github.nacabaro.vbhelper.di.VBHelper import com.github.nacabaro.vbhelper.domain.Sprites @@ -144,7 +145,7 @@ class SettingsScreenControllerImpl( monIndex = index, name = card.spriteData.sprites[spriteCounter].pixelData, stage = characters[index].stage, - attribute = characters[index].attribute, + attribute = NfcCharacter.Attribute.entries[characters[index].attribute], baseHp = characters[index].hp, baseBp = characters[index].dp, baseAp = characters[index].ap,