From deadca74501e95551f5e1665ebbfd1d6fa620b19 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 5 Dec 2023 14:31:11 +0100 Subject: code cleanup --- .../skyhanni/config/features/garden/visitor/RewardWarningConfig.java | 5 +---- .../java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java index 0213e7cd1..ee6ce50b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/garden/visitor/RewardWarningConfig.java @@ -39,13 +39,10 @@ public class RewardWarningConfig { public int bypassKey = Keyboard.KEY_NONE; - /** - * Sync up with {at.hannibal2.skyhanni.features.garden.visitor.VisitorReward} - */ @Expose @ConfigOption( name = "Items", - desc = "Warn for these reward items." + desc = "Warn for these reward item visitor drops." ) @ConfigEditorDraggableList public List drops = new ArrayList<>(Arrays.asList( diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt index 260a9cdb2..a74793fbe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorAPI.kt @@ -121,8 +121,7 @@ object VisitorAPI { fun hasReward(): VisitorReward? { for (internalName in allRewards) { val reward = VisitorReward.getByInternalName(internalName) ?: continue - // TODO, change functionality to use enum rather than ordinals - if (config.rewardWarning.drops.elementAtOrNull(reward.ordinal) != null) { + if (reward in config.rewardWarning.drops) { return reward } } -- cgit