manueldidonna / pokemon-save-editor-android

A work-in-progress pokémon save editor for Android
GNU General Public License v3.0
0 stars 0 forks source link

Add Pokemon.isNicknamed property #33

Open manueldidonna opened 3 years ago

manueldidonna commented 3 years ago

This issue depends on #32

Gen 1 & 2 don't save that information in the Pokemon data structure, we must infer it from the translated species name and the actual Pokemon nickname

// in pokemon:resources
fun getTranslatedSpeciesName(language: Language): String?

// gen 1 & 2
val Pokemon.isNicknamed: Boolean
    /// the result of this computation should be memorised for performance reasons
    get() = getTranslatedSpeciesName(language).uppercase() != nickname