From 3fdbf7a2b943fd5fe95ffa9766ef631ca75c090d Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Thu, 18 Apr 2024 22:33:59 +0200 Subject: Cleanup (#1485) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/nether/SulphurSkitterBox.kt | 1 - .../dailyquest/DailyQuestHelper.kt | 25 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether') 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>) { -- cgit