diff options
| author | Luna <luna@alexia.lol> | 2024-07-15 17:04:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-15 17:04:32 +0200 |
| commit | 9e0ffecc8cbc7aadc99cbc916fca64f5e2e2c122 (patch) | |
| tree | 7cd9401813698c9e1b4eca8c243ac0613885a387 /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 73f2443fc869127db948234a5fe8de277faacfba (diff) | |
| download | skyhanni-9e0ffecc8cbc7aadc99cbc916fca64f5e2e2c122.tar.gz skyhanni-9e0ffecc8cbc7aadc99cbc916fca64f5e2e2c122.tar.bz2 skyhanni-9e0ffecc8cbc7aadc99cbc916fca64f5e2e2c122.zip | |
Backend: Cleaner visitor rarity handling (#2220)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/GardenJson.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/GardenJson.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/GardenJson.kt index a6c7b84a2..8f442681e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/GardenJson.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/GardenJson.kt @@ -17,10 +17,13 @@ data class GardenJson( ) data class GardenVisitor( - @Expose val rarity: LorenzRarity, - @Expose @SerializedName("new_rarity") val newRarity: LorenzRarity?, + @Expose @SerializedName("rarity") private val _rarity: LorenzRarity, + @Expose @SerializedName("new_rarity") private val _newRarity: LorenzRarity?, @Expose val position: LorenzVec?, @Expose var skinOrType: String?, @Expose val mode: String, @Expose @SerializedName("need_items") val needItems: List<String>, -) +) { + val rarity: LorenzRarity + get() = _newRarity ?: _rarity +} |
