This should allow the app to build, otherwise it won't or it will crash

This commit is contained in:
Nacho 2025-07-26 14:23:53 +02:00
parent d749af0a9c
commit fce05870c5
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@ package com.github.nacabaro.vbhelper.domain.characters
import androidx.room.Entity import androidx.room.Entity
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
import androidx.room.ForeignKey import androidx.room.ForeignKey
import com.github.cfogrady.vbnfc.data.NfcCharacter
@Entity( @Entity(
foreignKeys = [ foreignKeys = [
@ -25,7 +26,7 @@ data class Character (
val monIndex: Int, val monIndex: Int,
val name: ByteArray, val name: ByteArray,
val stage: Int, // These should be replaced with enums 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 baseHp: Int,
val baseBp: Int, val baseBp: Int,
val baseAp: Int, val baseAp: Int,

View File

@ -11,6 +11,7 @@ import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts import androidx.activity.result.contract.ActivityResultContracts
import com.github.cfogrady.vb.dim.card.BemCard import com.github.cfogrady.vb.dim.card.BemCard
import com.github.cfogrady.vb.dim.card.DimReader 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.database.AppDatabase
import com.github.nacabaro.vbhelper.di.VBHelper import com.github.nacabaro.vbhelper.di.VBHelper
import com.github.nacabaro.vbhelper.domain.Sprites import com.github.nacabaro.vbhelper.domain.Sprites
@ -144,7 +145,7 @@ class SettingsScreenControllerImpl(
monIndex = index, monIndex = index,
name = card.spriteData.sprites[spriteCounter].pixelData, name = card.spriteData.sprites[spriteCounter].pixelData,
stage = characters[index].stage, stage = characters[index].stage,
attribute = characters[index].attribute, attribute = NfcCharacter.Attribute.entries[characters[index].attribute],
baseHp = characters[index].hp, baseHp = characters[index].hp,
baseBp = characters[index].dp, baseBp = characters[index].dp,
baseAp = characters[index].ap, baseAp = characters[index].ap,