From 3cbb6b8b640d0f78cb3c316de1af92a9a0d8fed4 Mon Sep 17 00:00:00 2001 From: Phoebe <77941535+catgirlseraid@users.noreply.github.com> Date: Fri, 26 Jul 2024 23:04:12 +1200 Subject: Feature: Item Pickup Log (#1937) Co-authored-by: SeRaid <77941535+SeRaid743@users.noreply.github.com> Co-authored-by: blahajenjoyer7 <171753706+blahajenjoyer7@users.noreply.github.com> --- .../config/features/inventory/InventoryConfig.java | 5 ++ .../features/inventory/ItemPickupLogConfig.java | 80 ++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/inventory/ItemPickupLogConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config/features') 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 684e2bb79..a3f88fca6 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 @@ -58,6 +58,11 @@ public class InventoryConfig { @Category(name = "Chocolate Factory", desc = "Features to help you master the Chocolate Factory idle game.") public ChocolateFactoryConfig chocolateFactory = new ChocolateFactoryConfig(); + @Expose + @ConfigOption(name = "Item Pickup Log", desc = "Logs all the picked up and dropped items") + @Accordion + public ItemPickupLogConfig itemPickupLogConfig = new ItemPickupLogConfig(); + @Expose @Category(name = "Craftable Item List", desc = "") @Accordion diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ItemPickupLogConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ItemPickupLogConfig.java new file mode 100644 index 000000000..24dc1dc11 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/inventory/ItemPickupLogConfig.java @@ -0,0 +1,80 @@ +package at.hannibal2.skyhanni.config.features.inventory; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.config.core.config.Position; +import at.hannibal2.skyhanni.features.inventory.ItemPickupLog; +import at.hannibal2.skyhanni.utils.RenderUtils; +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.ConfigEditorDropdown; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +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 ItemPickupLogConfig { + + @Expose + @ConfigOption(name = "Item Pickup Log", desc = "Show a log of what items you pick up/drop and their amounts.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption(name = "Compact Lines", desc = "Combine the §a+ §7and §c- §7lines into a single line.") + @ConfigEditorBoolean + public boolean compactLines = true; + + @Expose + @ConfigOption(name = "Compact Numbers", desc = "Compact the amounts added and removed.") + @ConfigEditorBoolean + public boolean shorten = false; + + @Expose + @ConfigOption(name = "Sacks", desc = "Show items added and removed from stacks.") + @ConfigEditorBoolean + public boolean sack = false; + + @Expose + @ConfigOption(name = "Coins", desc = "Show coins added and removed from purse.") + @ConfigEditorBoolean + public boolean coins = false; + + @Expose + @ConfigOption( + name = "Alignment", + desc = "How the item pickup log should be aligned. §d:3" + ) + @ConfigEditorDropdown + public RenderUtils.VerticalAlignment alignment = RenderUtils.VerticalAlignment.TOP; + + @Expose + @ConfigOption( + name = "Layout", + desc = "Drag text to change the layout. List will be rendered horizontally" + ) + @ConfigEditorDraggableList(requireNonEmpty = true) + public List displayLayout = new ArrayList<>(Arrays.asList( + ItemPickupLog.DisplayLayout.CHANGE_AMOUNT, + ItemPickupLog.DisplayLayout.ICON, + ItemPickupLog.DisplayLayout.ITEM_NAME + )); + + @Expose + @ConfigOption( + name = "Expire After", + desc = "How long items show for after being picked up or dropped, in seconds." + ) + @ConfigEditorSlider(minValue = 1, maxValue = 20, minStep = 1) + public int expireAfter = 10; + + @Expose + @ConfigLink(owner = ItemPickupLogConfig.class, field = "enabled") + public Position pos = new Position(-256, 140, false, true); +} + + -- cgit