From e249c70d1b0f8f543ae2fb63d71672b981cedcc0 Mon Sep 17 00:00:00 2001 From: Obsidian <108832807+Obsidianninja11@users.noreply.github.com> Date: Fri, 1 Mar 2024 01:23:20 -0900 Subject: Added Copy Underbid Keybind. (#1052) --- .../skyhanni/config/ConfigUpdaterMigrator.kt | 2 +- .../features/inventory/AuctionHouseConfig.java | 47 ++++++++++++++++++++++ .../config/features/inventory/InventoryConfig.java | 26 +++--------- 3 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/AuctionHouseConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index f779fb282..2984dcf02 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -10,7 +10,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 24 + const val CONFIG_VERSION = 25 fun JsonElement.at(chain: List, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/AuctionHouseConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/AuctionHouseConfig.java new file mode 100644 index 000000000..8c3d8d385 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/AuctionHouseConfig.java @@ -0,0 +1,47 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import com.google.gson.annotations.Expose; +import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean; +import io.github.moulberry.moulconfig.annotations.ConfigEditorKeybind; +import io.github.moulberry.moulconfig.annotations.ConfigOption; +import org.lwjgl.input.Keyboard; + +public class AuctionHouseConfig { + + + @Expose + @ConfigOption( + name = "Highlight Auctions", + desc = "Highlight own items that are sold in green and that are expired in red." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightAuctions = true; + + @Expose + @ConfigOption( + name = "Highlight Underbid Auctions", + desc = "Highlight underbid own lowest BIN auctions that are outbid." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean highlightAuctionsUnderbid = false; + + @Expose + @ConfigOption( + name = "Auto Copy Underbid", + desc = "Automatically copies the price of an item in the \"Create BIN Auction\" minus 1 coin into the clipboard for faster under-bidding." + ) + @ConfigEditorBoolean + @FeatureToggle + public boolean autoCopyUnderbidPrice = false; + + @Expose + @ConfigOption( + name = "Copy Underbid Keybind", + desc = "Copies the price of the hovered item in Auction House minus 1 coin into the clipboard for easier under-bidding." + ) + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int copyUnderbidKeybind = Keyboard.KEY_NONE; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java index 82235a828..553d58214 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java @@ -65,6 +65,11 @@ public class InventoryConfig { @Accordion public GetFromSackConfig gfs = new GetFromSackConfig(); + @Expose + @ConfigOption(name = "Auctions", desc = "") + @Accordion + public AuctionHouseConfig auctions = new AuctionHouseConfig(); + @Expose @ConfigOption( name = "Item Number", @@ -173,27 +178,6 @@ public class InventoryConfig { @FeatureToggle public boolean powerStoneGuide = true; - @Expose - @ConfigOption(name = "Highlight Auctions", - desc = "Highlight own items that are sold in green and that are expired in red.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightAuctions = true; - - @Expose - @ConfigOption(name = "Highlight Underbid Auctions", - desc = "Highlight underbid own lowest BIN auctions that are outbid.") - @ConfigEditorBoolean - @FeatureToggle - public boolean highlightAuctionsUnderbid = false; - - @Expose - @ConfigOption(name = "Copy Underbid Price", - desc = "Copies the price of an item in the \"Create BIN Auction\" minus 1 coin into the clipboard for faster under-bidding.") - @ConfigEditorBoolean - @FeatureToggle - public boolean copyUnderbidPrice = false; - @Expose @ConfigOption(name = "Shift Click Equipment", desc = "Makes normal clicks to shift clicks in equipment inventory.") @ConfigEditorBoolean -- cgit