aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/config/features
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-11-18 06:06:18 +0100
committerLinnea Gräf <nea@nea.moe>2023-12-04 20:46:40 +0100
commitac14fe8fe04c44e2e08fa90b5cc8fdce293c2ab1 (patch)
tree79a72c3593d4e0304419c259559b371f12bd5249 /src/main/java/at/hannibal2/skyhanni/config/features
parentd9a1a8dda967f40bd4a7a2707bf3ff5411093e7d (diff)
downloadSkyHanni-repopatterns.tar.gz
SkyHanni-repopatterns.tar.bz2
SkyHanni-repopatterns.zip
Add RepoPatternsrepopatterns
RepoPatterns allow us to easily update regexes without creating a new release.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/dev/RepoPatternConfig.java23
2 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
index 0c1fc01ed..6a2ee9708 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/DevConfig.java
@@ -30,6 +30,11 @@ public class DevConfig {
public DebugConfig debug = new DebugConfig();
@Expose
+ @ConfigOption(name = "RepoPattern", desc = "")
+ @Accordion
+ public RepoPatternConfig repoPattern = new RepoPatternConfig();
+
+ @Expose
@ConfigOption(name = "Slot Number", desc = "Show slot number in inventory while pressing this key.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
public int showSlotNumberKey = Keyboard.KEY_NONE;
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/dev/RepoPatternConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/dev/RepoPatternConfig.java
new file mode 100644
index 000000000..d4ac7d4d9
--- /dev/null
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/dev/RepoPatternConfig.java
@@ -0,0 +1,23 @@
+package at.hannibal2.skyhanni.config.features.dev;
+
+import com.google.gson.annotations.Expose;
+import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean;
+import io.github.moulberry.moulconfig.annotations.ConfigOption;
+import io.github.moulberry.moulconfig.observer.Property;
+
+public class RepoPatternConfig {
+ @Expose
+ @ConfigOption(name = "Force Local Loading", desc = "Force loading local patterns.")
+ @ConfigEditorBoolean
+ public Property<Boolean> forceLocal = Property.of(false);
+
+ @Expose
+ @ConfigOption(name = "Tolerate Duplicate Usages", desc = "Don't crash when two or more code locations use the same RepoPattern key")
+ @ConfigEditorBoolean
+ public boolean tolerateDuplicateUsage = false;
+
+ @Expose
+ @ConfigOption(name = "Tolerate Late Registration", desc = "Don't crash when a RepoPattern is obtained after preinitialization.")
+ @ConfigEditorBoolean
+ public boolean tolerateLateRegistration = false;
+}