aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-29 22:27:01 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-02-29 22:27:01 +0100
commit2d7f707c2c7ee59ef76f39171f91d7872e83f028 (patch)
treeb5d0474fca0fcf253ffd2b790b79310e2c4dad8e
parentbc1a28285226db06109b0d39ec4242db1edb8a6d (diff)
downloadskyhanni-2d7f707c2c7ee59ef76f39171f91d7872e83f028.tar.gz
skyhanni-2d7f707c2c7ee59ef76f39171f91d7872e83f028.tar.bz2
skyhanni-2d7f707c2c7ee59ef76f39171f91d7872e83f028.zip
Moved "max items with purse" into bazaar config
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java9
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/inventory/InventoryConfig.java11
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/inventory/MaxPurseItems.kt4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java
index 515255e4b..cdac05e02 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/bazaar/BazaarConfig.java
@@ -40,4 +40,13 @@ public class BazaarConfig {
@ConfigEditorBoolean
@FeatureToggle
public boolean openPriceWebsite = false;
+
+ @Expose
+ @ConfigOption(name = "Max Items With Purse", desc = "Calculates the maximum amount of items that can be purchased from the Bazaar with the amount of coins in your purse.")
+ @ConfigEditorBoolean
+ @FeatureToggle
+ public boolean maxPurseItems = false;
+
+ @Expose
+ public Position maxPurseItemsPosition = new Position(346, 90, true, false);
}
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 6c905889f..82235a828 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
@@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.config.features.inventory;
import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.HasLegacyId;
-import at.hannibal2.skyhanni.config.core.config.Position;
import at.hannibal2.skyhanni.config.features.inventory.helper.HelperConfig;
import com.google.gson.annotations.Expose;
import io.github.moulberry.moulconfig.annotations.Accordion;
@@ -10,6 +9,7 @@ import io.github.moulberry.moulconfig.annotations.Category;
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean;
import io.github.moulberry.moulconfig.annotations.ConfigEditorDraggableList;
import io.github.moulberry.moulconfig.annotations.ConfigOption;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -199,15 +199,6 @@ public class InventoryConfig {
@ConfigEditorBoolean
@FeatureToggle
public boolean shiftClickForEquipment = false;
-
- @Expose
- @ConfigOption(name = "Max Items With Purse", desc = "Calculates the maximum amount of items that can be purchased from the Bazaar for the amount of coins in your purse.")
- @ConfigEditorBoolean
- @FeatureToggle
- public boolean maxPurseItems = false;
-
- @Expose
- public Position purseItemsPos = new Position(346, 90, true, false);
@Expose
@ConfigOption(name = "Shift Click NPC sell", desc = "Makes normal clicks to shift clicks in npc inventory for selling.")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/MaxPurseItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/MaxPurseItems.kt
index f3ca86a34..b0cb8d68a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/inventory/MaxPurseItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/MaxPurseItems.kt
@@ -15,6 +15,7 @@ import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class MaxPurseItems {
+ private val config get() = SkyHanniMod.feature.bazaar
private val patternGroup = RepoPattern.group("inventory.maxpurse")
private val orderPattern by patternGroup.pattern(
@@ -36,7 +37,6 @@ class MaxPurseItems {
private var buyOrderPrice: Double? = null
private var instantBuyPrice: Double? = null
- private val config get() = SkyHanniMod.feature.inventory
private fun getPrices() {
for (item in Minecraft.getMinecraft().thePlayer.openContainer.inventory) {
@@ -84,7 +84,7 @@ class MaxPurseItems {
(currentPurse / it).toInt()
} ?: 0
- config.purseItemsPos.renderStrings(
+ config.maxPurseItemsPosition.renderStrings(
listOf(
"§eWith your current purse, you can buy order",
"§e${buyOrders.addSeparators()}x of this item with your purse (at top order +0.1)",