Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
odtheking committed Nov 1, 2024
2 parents 55e3d35 + a64340c commit be6b507
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package me.odinmain.features.impl.nether

import me.odinmain.features.Category
import me.odinmain.features.Module
import me.odinmain.features.impl.nether.KuudraReminders.buildBallista
import me.odinmain.features.impl.nether.KuudraReminders.freshTools
import me.odinmain.features.impl.nether.KuudraReminders.pickUpSupplies
import me.odinmain.features.settings.Setting.Companion.withDependency
import me.odinmain.features.settings.impl.BooleanSetting
import me.odinmain.utils.isOtherPlayer
import me.odinmain.utils.skyblock.KuudraUtils
import me.odinmain.utils.skyblock.PlayerUtils
import me.odinmain.utils.skyblock.partyMessage

Expand All @@ -23,6 +22,7 @@ object KuudraReminders : Module(
private val buildBallista by BooleanSetting("Build Ballista", true, description = "Reminds you to build the ballista.")
private val freshTools by BooleanSetting("Fresh Tools", true, description = "Reminds you to use fresh tools.")
private val manaDrain by BooleanSetting("Mana Drain", true, description = "Notifies your party when you use mana on them.")
private val onlyKuudra by BooleanSetting("Notify in Kuudra Only", true, description = "Notify of mana drain only when in Kuudra.").withDependency { manaDrain }

init {
onMessage(Regex("WARNING: You do not have a key for this tier in your inventory, you will not be able to claim rewards."), { keyReminder && enabled }) {
Expand All @@ -45,7 +45,7 @@ object KuudraReminders : Module(
PlayerUtils.alert("Fresh Tools", displayText = displayText, playSound = playSound)
}

onMessage(Regex("Used Extreme Focus! \\((\\d+) Mana\\)"), { manaDrain && enabled }) {
onMessage(Regex("Used Extreme Focus! \\((\\d+) Mana\\)"), { manaDrain && enabled && (!onlyKuudra || (onlyKuudra && KuudraUtils.inKuudra))}) {
val mana = Regex("Used Extreme Focus! \\((\\d+) Mana\\)").find(it)?.groupValues?.get(1)?.toIntOrNull() ?: return@onMessage
val amount = mc.theWorld?.playerEntities?.filter { entity -> entity.isOtherPlayer() && entity.getDistanceSqToEntity(mc.thePlayer) < 49 }?.size?.coerceAtLeast(0)
partyMessage("Used $mana mana on $amount people.")
Expand Down

0 comments on commit be6b507

Please sign in to comment.