summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorThunderblade73 <85900443+Thunderblade73@users.noreply.github.com>2024-06-10 03:11:42 +0200
committerGitHub <noreply@github.com>2024-06-10 03:11:42 +0200
commit1fe45f026afeff9d87107380bf8c4cf58051b29f (patch)
tree362a2d3cf9f0e1c4dbfabb710cd51ab0c7c11ee3 /src/main/java/at/hannibal2/skyhanni/features/misc
parentb1ff611e4f764c5fba338571540f0ad2389994ac (diff)
downloadskyhanni-1fe45f026afeff9d87107380bf8c4cf58051b29f.tar.gz
skyhanni-1fe45f026afeff9d87107380bf8c4cf58051b29f.tar.bz2
skyhanni-1fe45f026afeff9d87107380bf8c4cf58051b29f.zip
Backend: Graph Editor (#1454)
Co-authored-by: Cal <cwolfson58@gmail.com> Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
index 5fa36943a..8a594259e 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt
@@ -40,7 +40,7 @@ object DefaultConfigFeatures {
"Click here to configure default options, or run /shdefaultoptions.",
onClick = {
onCommand("null", "null")
- }
+ },
)
} else if (updated) {
val lastVersion = knownToggles.keys.last { it != SkyHanniMod.version }
@@ -50,11 +50,18 @@ object DefaultConfigFeatures {
"Click here to configure the newly introduced options, or run $command.",
onClick = {
onCommand(lastVersion, SkyHanniMod.version)
- }
+ },
)
}
}
+ fun onCommand(args: Array<String>) {
+ onCommand(
+ args.getOrNull(0) ?: "null",
+ args.getOrNull(1) ?: "null",
+ )
+ }
+
fun onCommand(old: String, new: String) {
val processor = FeatureToggleProcessor()
ConfigProcessorDriver(processor).processConfig(SkyHanniMod.feature)
@@ -108,7 +115,7 @@ object DefaultConfigFeatures {
if (strings.size <= 2)
return CommandBase.getListOfStringsMatchingLastWord(
strings,
- SkyHanniMod.knownFeaturesData.knownFeatures.keys + listOf("null")
+ SkyHanniMod.knownFeaturesData.knownFeatures.keys + listOf("null"),
)
return listOf()
}