summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-06-05 15:39:55 +0200
committerGitHub <noreply@github.com>2024-06-05 15:39:55 +0200
commit5a04ad230cc4fb94884b34f795124d3b65af07ea (patch)
treecace8dcaad1c989be42a52bff4a6da233642279f /src/main/java/at/hannibal2/skyhanni/config
parenteb4ab6eaafa17581df58a53fb4111fa96933d230 (diff)
downloadskyhanni-5a04ad230cc4fb94884b34f795124d3b65af07ea.tar.gz
skyhanni-5a04ad230cc4fb94884b34f795124d3b65af07ea.tar.bz2
skyhanni-5a04ad230cc4fb94884b34f795124d3b65af07ea.zip
Improvement: Refactor of /ff for Improved Modularity and Code Reusability (#873)
Co-authored-by: Cal <cwolfson58@gmail.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt16
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java8
3 files changed, 7 insertions, 19 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
index 4f5f0aa50..fdedfdbab 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
@@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {
val logger = LorenzLogger("ConfigMigration")
- const val CONFIG_VERSION = 47
+ const val CONFIG_VERSION = 48
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
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 bd6cc8efe..89980d349 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -371,17 +371,11 @@ object Commands {
"Disables/enables the rendering of all skyhanni guis."
) { SkyHanniDebugsAndTests.toggleRender() }
registerCommand(
- "shcarrot",
- "Toggles receiving the 12 fortune from carrots"
- ) { CaptureFarmingGear.reverseCarrotFortune() }
- registerCommand(
- "shpumpkin",
- "Toggles receiving the 12 fortune from pumpkins"
- ) { CaptureFarmingGear.reversePumpkinFortune() }
- registerCommand(
- "shcocoabeans",
- "Toggles receiving the 12 fortune from cocoa beans"
- ) { CaptureFarmingGear.reverseCocoaBeansFortune() }
+ "shcarrolyn",
+ "Toggels if the specified crops effect is active from carrolyn"
+ ) {
+ CaptureFarmingGear.handelCarrolyn(it)
+ }
registerCommand(
"shrepostatus",
"Shows the status of all the mods constants"
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 d88ccb315..cbdc90978 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java
@@ -373,13 +373,7 @@ public class ProfileSpecificStorage {
public long cakeExpiring = -1L;
@Expose
- public boolean carrotFortune = false;
-
- @Expose
- public boolean pumpkinFortune = false;
-
- @Expose
- public boolean cocoaBeansFortune = false;
+ public Map<CropType, Boolean> carrolyn = new HashMap<>();
@Expose
public Map<FarmingItems, ItemStack> farmingItems = new HashMap<>();