diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-24 18:48:52 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-02-24 18:48:52 +0100 |
commit | 0c313d2c988e6d2a39560db1733beb993f0f4f39 (patch) | |
tree | be0c725b34e2112e55edf33302503be3e38bb373 /src/main/java/at/hannibal2/skyhanni | |
parent | 997ddcfb21d0c59f504becd5ee281aa54202eeeb (diff) | |
download | skyhanni-0c313d2c988e6d2a39560db1733beb993f0f4f39.tar.gz skyhanni-0c313d2c988e6d2a39560db1733beb993f0f4f39.tar.bz2 skyhanni-0c313d2c988e6d2a39560db1733beb993f0f4f39.zip |
Fixed Garden plot edit mode copies stack size.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt index db5cec5a5..b1ae273fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenPlotIcon.kt @@ -23,6 +23,8 @@ object GardenPlotIcon { private val plotList get() = GardenAPI.storage?.plotIcon?.plotList private var inInventory = false private var copyStack: ItemStack? = null + + // TODO replace with enum private var editMode = 0 // 0 = off, 1 = on, 2 = reset private var lastClickedSlotId = -1 private var originalStack = mutableMapOf<Int, ItemStack>() @@ -103,7 +105,9 @@ object GardenPlotIcon { if (editMode != 0) { if (event.slotId in 54..89) { event.isCanceled = true - copyStack = event.slot.stack ?: return + copyStack = event.slot.stack?.copy()?.also { + it.stackSize = 1 + } ?: return // TODO different format, not bold or show not in chat at all. ChatUtils.chat("§6§lClick an item in the desk menu to replace it with that item!") return |