diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-04-18 22:33:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 22:33:59 +0200 |
commit | 3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d (patch) | |
tree | 293e81a8cf29314b508999975f1507b279284bc8 /src/main/java/at/hannibal2/skyhanni/features/nether | |
parent | 9ed4a9462f0e494001cbe470477624c3dd73053a (diff) | |
download | skyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.tar.gz skyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.tar.bz2 skyhanni-3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d.zip |
Cleanup (#1485)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt | 1 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt | 25 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt index 7b73d1fd4..9066df502 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt @@ -100,7 +100,6 @@ class SulphurSkitterBox { fun isEnabled() = IslandType.CRIMSON_ISLE.isInIsland() && config.enabled && (!config.onlyWithRods || FishingAPI.holdingLavaRod) - @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(24, "crimsonIsle.sulphurSkitterBoxConfig", "fishing.trophyFishing.sulphurSkitterBox") diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt index f06a997ec..c656cc726 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt @@ -175,19 +175,20 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { } private fun renderTownBoard(event: LorenzRenderWorldEvent) { - if (quests.any { - it.state == QuestState.READY_TO_COLLECT || - it.state == QuestState.NOT_ACCEPTED || - (it is RescueMissionQuest && it.state == QuestState.ACCEPTED) }) { - val location = when (reputationHelper.factionType) { - FactionType.BARBARIAN -> townBoardBarbarian - FactionType.MAGE -> townBoardMage - - FactionType.NONE -> return - } - event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) - event.drawDynamicText(location, "Town Board", 1.5) + if (!quests.any { it.needsTownBoardLocation() }) return + val location = when (reputationHelper.factionType) { + FactionType.BARBARIAN -> townBoardBarbarian + FactionType.MAGE -> townBoardMage + + FactionType.NONE -> return } + event.drawWaypointFilled(location, LorenzColor.WHITE.toColor()) + event.drawDynamicText(location, "Town Board", 1.5) + } + + private fun Quest.needsTownBoardLocation(): Boolean = state.let { state -> + state == QuestState.READY_TO_COLLECT || state == QuestState.NOT_ACCEPTED || + (this is RescueMissionQuest && state == QuestState.ACCEPTED) } fun render(display: MutableList<List<Any>>) { |