mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-10-27 12:36:24 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e01bc2eeab | ||
|
|
f6f3070b8e | ||
|
|
0f2301e668 |
@@ -797,6 +797,7 @@
|
||||
- Fixed Magnitude battle messages.
|
||||
- Moves that are disabled or out of PP now show transparently in the battle GUI instead of being hidden completely.
|
||||
- Statuses like sleep and frozen no longer last forever if it was carried over from a previous battle.
|
||||
- Fixed a formatting error that affected Pokemon nicknames when the storage type is JSON.
|
||||
|
||||
### Localization
|
||||
- Added species, ability, and move translations for `ko_ko`, `jp_jp`, `fr_fr`, `es_es`, `it_it`, and `zh_cn`.
|
||||
|
||||
@@ -753,7 +753,7 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
json.addProperty(DataKeys.POKEMON_LAST_SAVED_VERSION, Cobblemon.VERSION)
|
||||
json.addProperty(DataKeys.POKEMON_UUID, uuid.toString())
|
||||
json.addProperty(DataKeys.POKEMON_SPECIES_IDENTIFIER, species.resourceIdentifier.toString())
|
||||
nickname?.let { json.addProperty(DataKeys.POKEMON_NICKNAME, Text.Serializer.toJson(it)) }
|
||||
nickname?.let { json.add(DataKeys.POKEMON_NICKNAME, Text.Serializer.toJsonTree(it)) }
|
||||
json.addProperty(DataKeys.POKEMON_FORM_ID, form.formOnlyShowdownId())
|
||||
json.addProperty(DataKeys.POKEMON_EXPERIENCE, experience)
|
||||
json.addProperty(DataKeys.POKEMON_LEVEL, level)
|
||||
@@ -803,7 +803,7 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
} catch (e: InvalidIdentifierException) {
|
||||
throw IllegalStateException("Failed to deserialize a species identifier")
|
||||
}
|
||||
nickname = json.get(DataKeys.POKEMON_NICKNAME)?.asString?.takeIf { it.isNotBlank() }?.let { Text.Serializer.fromJson(it) }
|
||||
nickname = json.get(DataKeys.POKEMON_NICKNAME)?.let { Text.Serializer.fromJson(it) }
|
||||
form = species.forms.find { it.formOnlyShowdownId() == json.get(DataKeys.POKEMON_FORM_ID).asString } ?: species.standardForm
|
||||
level = json.get(DataKeys.POKEMON_LEVEL).asInt
|
||||
experience = json.get(DataKeys.POKEMON_EXPERIENCE).asInt.takeIf { experienceGroup.getLevel(it) == level } ?: experienceGroup.getExperience(level)
|
||||
|
||||
Reference in New Issue
Block a user