diff options
author | Empa <42304516+ItsEmpa@users.noreply.github.com> | 2024-06-15 22:12:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-15 22:12:24 +0200 |
commit | bfe43b7ebffab551740d32cf919db27504d27ffb (patch) | |
tree | 7fb570635c88d98f122d2752be78f135868a9843 /src/main/java/at/hannibal2/skyhanni/config | |
parent | 8c91a9b8bf63059e1a8a099ccbdadea8a3676948 (diff) | |
download | skyhanni-bfe43b7ebffab551740d32cf919db27504d27ffb.tar.gz skyhanni-bfe43b7ebffab551740d32cf919db27504d27ffb.tar.bz2 skyhanni-bfe43b7ebffab551740d32cf919db27504d27ffb.zip |
Feature: Mineshaft Pity Display + OreMinedEvent (#1655)
Co-authored-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com>
Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
Co-authored-by: Thunderblade73 <gaidermarkus@gmail.com>
Co-authored-by: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com>
Co-authored-by: Cal <cwolfson58@gmail.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
6 files changed, 84 insertions, 0 deletions
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 de4bc2585..22f7e2d28 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -52,6 +52,7 @@ import at.hannibal2.skyhanni.features.garden.pests.PestFinder import at.hannibal2.skyhanni.features.garden.pests.PestProfitTracker import at.hannibal2.skyhanni.features.garden.visitor.GardenVisitorDropStatistics import at.hannibal2.skyhanni.features.mining.KingTalismanHelper +import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker import at.hannibal2.skyhanni.features.minion.MinionFeatures import at.hannibal2.skyhanni.features.misc.CollectionTracker @@ -547,6 +548,10 @@ object Commands { "shtoggleegglocationdebug", "Shows Hoppity egg locations with their internal API names and status.", ) { HoppityEggLocations.toggleDebug() } + registerCommand( + "shresetmineshaftpitystats", + "Resets the mineshaft pity display stats" + ) { MineshaftPityDisplay.fullResetCounter() } } private fun internalCommands() { diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java index db2aa868b..9612ac3b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DebugConfig.java @@ -127,6 +127,16 @@ public class DebugConfig { public boolean currentAreaDebug = true; @Expose + @ConfigOption(name = "Oreblock Name", desc = "Show the OreBlock you are currently looking at.") + @ConfigEditorBoolean + public boolean raytracedOreblock = true; + + @Expose + @ConfigOption(name = "Ore Event Messages", desc = "Shows debug messages every time the Ore Event happens.") + @ConfigEditorBoolean + public boolean oreEventMessages = false; + + @Expose @ConfigOption(name = "Assume Mayor", desc = "Select a mayor to assume.") @ConfigEditorDropdown public Property<Mayor> assumeMayor = Property.of(Mayor.DISABLED); diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java index 041134e41..a42da18c1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java @@ -8,6 +8,7 @@ import io.github.notenoughupdates.moulconfig.annotations.Category; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind; import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; import org.lwjgl.input.Keyboard; @@ -61,6 +62,10 @@ public class DevConfig { public Position debugItemPos = new Position(90, 70); @Expose + @ConfigLink(owner = DebugConfig.class, field = "raytracedOreblock") + public Position debugOrePos = new Position(1, 200, false, true); + + @Expose @ConfigOption( name = "Fancy Contributors", desc = "Marks §cSkyHanni's contributors §7fancy in the tab list. " + diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MineshaftPityDisplayConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MineshaftPityDisplayConfig.java new file mode 100644 index 000000000..ab73f060d --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MineshaftPityDisplayConfig.java @@ -0,0 +1,43 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay.MineshaftPityLines; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.notenoughupdates.moulconfig.annotations.ConfigLink; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class MineshaftPityDisplayConfig { + @Expose + @ConfigOption(name = "Enable Display", desc = "Enable the Mineshaft Pity Display.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Stats List", desc = "Drag text to change the appearance of the display.") + @ConfigEditorDraggableList + public List<MineshaftPityLines> mineshaftPityLines = new ArrayList<>(Arrays.asList( + MineshaftPityLines.TITLE, + MineshaftPityLines.COUNTER, + MineshaftPityLines.CHANCE, + MineshaftPityLines.NEEDED_TO_PITY, + MineshaftPityLines.TIME_SINCE_MINESHAFT + )); + + @Expose + @ConfigOption(name = "Modify Spawn Message", desc = "Modify the Mineshaft spawn message with more stats.") + @ConfigEditorBoolean + @FeatureToggle + public boolean modifyChatMessage = true; + + @Expose + @ConfigLink(owner = MineshaftPityDisplayConfig.class, field = "enabled") + public Position position = new Position(16, 192, false, true); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java index 870c31929..adbfb32b7 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java @@ -69,6 +69,11 @@ public class MiningConfig { public MineshaftConfig mineshaft = new MineshaftConfig(); @Expose + @ConfigOption(name = "Mineshaft Pity Display", desc = "") + @Accordion + public MineshaftPityDisplayConfig mineshaftPityDisplay = new MineshaftPityDisplayConfig(); + + @Expose @ConfigOption(name = "Highlight Commission Mobs", desc = "Highlight Mobs that are part of active commissions.") @ConfigEditorBoolean @FeatureToggle diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java index fe0cd58fb..2887d0230 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java @@ -29,6 +29,7 @@ import at.hannibal2.skyhanni.features.garden.pests.PestProfitTracker; import at.hannibal2.skyhanni.features.garden.pests.VinylType; import at.hannibal2.skyhanni.features.garden.visitor.VisitorReward; import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI; +import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay; import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTracker; import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker; import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker; @@ -540,6 +541,21 @@ public class ProfileSpecificStorage { @Expose public int availableTokens; + + @Expose + public MineshaftStorage mineshaft = new MineshaftStorage(); + + public static class MineshaftStorage { + + @Expose + public long mineshaftTotalBlocks = 0L; + + @Expose + public int mineshaftTotalCount = 0; + + @Expose + public List<MineshaftPityDisplay.PityData> blocksBroken = new ArrayList<>(); + } } @Expose |