diff options
| author | Brandon <brandon.wamboldt@gmail.com> | 2023-10-15 10:33:55 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-15 15:33:55 +0200 |
| commit | 29904921c5d2c81b8d7cb37dcd57af9fd0761343 (patch) | |
| tree | 27071d1df08073a2356454e6992321cd534dc591 /src/main/java/at/hannibal2/skyhanni/config | |
| parent | 9755df0878023c73ac18ffc7aa07706b6c0a77c0 (diff) | |
| download | skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.tar.gz skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.tar.bz2 skyhanni-29904921c5d2c81b8d7cb37dcd57af9fd0761343.zip | |
Feature: Show alerts when the player catches a legendary sea creature (#530)
dded Alerts when the player catches a legendary sea creature. #530
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
3 files changed, 44 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt index 661728742..a05d2de5d 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.misc.update.UpdateManager import at.hannibal2.skyhanni.utils.LorenzLogger +import at.hannibal2.skyhanni.utils.LorenzRarity import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -86,6 +87,15 @@ class ConfigManager { return reader.nextString().asInternalName() } }.nullSafe()) + .registerTypeAdapter(LorenzRarity::class.java, object : TypeAdapter<LorenzRarity>() { + override fun write(out: JsonWriter, value: LorenzRarity) { + out.value(value.name) + } + + override fun read(reader: JsonReader): LorenzRarity { + return LorenzRarity.valueOf(reader.nextString()) + } + }.nullSafe()) .enableComplexMapKeySerialization() .create() } diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index f7929c46b..1479e5037 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -43,6 +43,7 @@ import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.test.command.TestChatCommand import at.hannibal2.skyhanni.utils.APIUtil import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.SoundUtils import net.minecraft.client.Minecraft import net.minecraft.command.ICommandSender import net.minecraft.event.ClickEvent @@ -266,6 +267,10 @@ object Commands { "shpartydebug", "List persons into the chat SkyHanni thinks are in your party." ) { PartyAPI.listMembers() } + registerCommand( + "shplaysound", + "Play the specified sound effect at the given pitch and volume." + ) { SoundUtils.command(it) } } private fun internalCommands() { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java index 70957e0ea..edca0b432 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/FishingConfig.java @@ -257,10 +257,35 @@ public class FishingConfig { } @Expose - @ConfigOption(name = "Highlight Rare", desc = "Highlight Rare Sea Creatures in blue color.") - @ConfigEditorBoolean - @FeatureToggle - public boolean rareSeaCreatureHighlight = false; + @ConfigOption(name = "Rare Sea Creatures", desc = "") + @Accordion + public RareCatches rareCatches = new RareCatches(); + + public static class RareCatches { + + @Expose + @ConfigOption(name = "Alert (Own Sea Creatures)", desc = "Show an alert on screen when you catch a rare sea creature.") + @ConfigEditorBoolean + @FeatureToggle + public boolean alertOwnCatches = true; + + @Expose + @ConfigOption(name = "Alert (Other Sea Creatures)", desc = "Show an alert on screen when other players nearby catch a rare sea creature.") + @ConfigEditorBoolean + public boolean alertOtherCatches = false; + + @Expose + @ConfigOption(name = "Play Sound Alert", desc = "Play a sound effect when rare sea creature alerts are displayed.") + @ConfigEditorBoolean + public boolean playSound = true; + + @Expose + @ConfigOption(name = "Highlight", desc = "Highlight nearby rare sea creatures.") + @ConfigEditorBoolean + @FeatureToggle + public boolean highlight = false; + + } @Expose @ConfigOption( |
