From ed493ed013e30897ce08506ebec1949fa8f814db Mon Sep 17 00:00:00 2001 From: Lorenz Date: Sat, 23 Jul 2022 12:20:59 +0200 Subject: code cleanup --- .../java/at/hannibal2/skyhanni/fishing/SeaCreatureManager.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main/java/at') diff --git a/src/main/java/at/hannibal2/skyhanni/fishing/SeaCreatureManager.kt b/src/main/java/at/hannibal2/skyhanni/fishing/SeaCreatureManager.kt index d26c999bd..eec0dd781 100644 --- a/src/main/java/at/hannibal2/skyhanni/fishing/SeaCreatureManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/fishing/SeaCreatureManager.kt @@ -16,13 +16,13 @@ class SeaCreatureManager { for (variant in data.entrySet().map { it.value.asJsonObject }) { val chatColor = variant["chat_color"].asString - for ((displayName, v) in variant["sea_creatures"].asJsonObject.entrySet()) { - val value = v.asJsonObject - val chatMessage = value["chat_message"].asString - val fishingExperience = value["fishing_experience"].asInt + for ((displayName, value) in variant["sea_creatures"].asJsonObject.entrySet()) { + val seaCreature = value.asJsonObject + val chatMessage = seaCreature["chat_message"].asString + val fishingExperience = seaCreature["fishing_experience"].asInt - val rare = if (value.has("rare")) { - value["rare"].asBoolean + val rare = if (seaCreature.has("rare")) { + seaCreature["rare"].asBoolean } else false seaCreatureMap[chatMessage] = SeaCreature(displayName, fishingExperience, chatColor, rare) -- cgit