diff options
author | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
commit | 43d07fc791e63bba61695e0d4b766b78eb699132 (patch) | |
tree | 69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt | |
parent | 71af70d22e9a55a58c36642a745e81aa91851375 (diff) | |
download | DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2 DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip |
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt index 8bcd145..0bf6bbe 100644 --- a/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt +++ b/src/main/kotlin/dulkirmod/features/GardenVisitorAlert.kt @@ -1,7 +1,7 @@ package dulkirmod.features import dulkirmod.DulkirMod -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TabListUtils import dulkirmod.utils.TitleUtils import dulkirmod.utils.Utils @@ -11,7 +11,7 @@ object GardenVisitorAlert { private var lastAlert = 0 fun alert() { - if (!Config.notifyMaxVisitors) return + if (!DulkirConfig.notifyMaxVisitors) return if (!Utils.isInSkyblock()) return if (TabListUtils.area != "Garden") { @@ -19,24 +19,24 @@ object GardenVisitorAlert { } if (TabListUtils.maxVisitors && !hasSentAlert) { - val color = Utils.getColorString(Config.bestiaryNotifColor) + val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor) TitleUtils.drawStringForTime("${color}Max Visitors", 5000) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f) hasSentAlert = true lastAlert = System.currentTimeMillis().toInt() } else if (!TabListUtils.maxVisitors) hasSentAlert = false val timeSinceLastAlert = System.currentTimeMillis().toInt() - lastAlert - if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && Config.persistentAlert) { + if (TabListUtils.maxVisitors && hasSentAlert && timeSinceLastAlert > 5000 && DulkirConfig.persistentAlert) { lastAlert = System.currentTimeMillis().toInt() - val color = Utils.getColorString(Config.bestiaryNotifColor) + val color = Utils.getColorString(DulkirConfig.bestiaryNotifColor) TitleUtils.drawStringForTime("${color}Max Visitors", 5000) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .3f) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .6f) - DulkirMod.mc.thePlayer.playSound("note.pling", 1f * Config.bestiaryNotifVol, .9f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .3f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .6f) + DulkirMod.mc.thePlayer.playSound("note.pling", 1f * DulkirConfig.bestiaryNotifVol, .9f) } } |