aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-06 18:20:23 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-06-06 18:20:23 +0200
commit21d31344a151dfe94c79a20b503af55120c63b63 (patch)
tree6bae89e3532b2ed976a493ff8d6b5b7bfed94221 /src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance
parent462d5976f3654f40229ff61391e7e55d0819d82d (diff)
downloadOneConfig-21d31344a151dfe94c79a20b503af55120c63b63.tar.gz
OneConfig-21d31344a151dfe94c79a20b503af55120c63b63.tar.bz2
OneConfig-21d31344a151dfe94c79a20b503af55120c63b63.zip
rewrite config system
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java14
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceName.java16
2 files changed, 23 insertions, 7 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java
index 3b0fcd6..a34b792 100644
--- a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java
+++ b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceConfig.java
@@ -1,6 +1,6 @@
package cc.polyfrost.oneconfig.config.compatibility.vigilance;
-import cc.polyfrost.oneconfig.internal.config.ConfigCore;
+import cc.polyfrost.oneconfig.internal.config.core.ConfigCore;
import cc.polyfrost.oneconfig.config.core.OneColor;
import cc.polyfrost.oneconfig.config.data.Mod;
import cc.polyfrost.oneconfig.config.elements.OptionCategory;
@@ -55,7 +55,7 @@ public class VigilanceConfig extends Config {
}
private void generateOptionsList(OptionPage page) {
- for (PropertyData option : ((VigilantAccessor) vigilant).getPropertyCollector().getProperties()) {
+ /*for (PropertyData option : ((VigilantAccessor) vigilant).getPropertyCollector().getProperties()) {
PropertyAttributesExt attributes = option.getAttributesExt();
if (attributes.getHidden()) continue;
if (!page.categories.containsKey(getCategory(attributes)))
@@ -66,7 +66,7 @@ public class VigilanceConfig extends Config {
ArrayList<BasicOption> options = category.subcategories.get(category.subcategories.size() - 1).options;
switch (attributes.getType()) {
case SWITCH:
- options.add(new ConfigSwitch(getFieldOfProperty(option), option.getInstance(), getName(attributes), 2));
+ options.add(new ConfigSwitch(getFieldOfProperty(option), option.getInstance(), getName(attributes), "", "", 2));
break;
case CHECKBOX:
options.add(new ConfigCheckbox(getFieldOfProperty(option), option.getInstance(), getName(attributes), 2));
@@ -97,7 +97,7 @@ public class VigilanceConfig extends Config {
if (attributes.getType() == PropertyType.SWITCH || attributes.getType() == PropertyType.CHECKBOX) {
optionNames.put(PropertyKt.fullPropertyPath(option.getAttributesExt()), options.get(options.size() - 1));
}
- }
+ }*/
}
private Field getFieldOfProperty(PropertyData data) {
@@ -163,11 +163,11 @@ public class VigilanceConfig extends Config {
public void addDependency(PropertyData property, PropertyData dependency) {
BasicOption option = optionNames.get(PropertyKt.fullPropertyPath(property.getAttributesExt()));
if (option != null) {
- option.setDependency(() -> Objects.equals(dependency.getValue().getValue(vigilant), true));
+ option.addDependency(() -> Objects.equals(dependency.getValue().getValue(vigilant), true));
}
}
- private static class CompatConfigColorElement extends ConfigColorElement {
+ /*private static class CompatConfigColorElement extends ConfigColorElement {
private final Field color;
private Color prevColor = null;
private OneColor cachedColor = null;
@@ -198,5 +198,5 @@ public class VigilanceConfig extends Config {
}
}
}
- }
+ }*/
}
diff --git a/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceName.java b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceName.java
new file mode 100644
index 0000000..8417ad8
--- /dev/null
+++ b/src/main/java/cc/polyfrost/oneconfig/config/compatibility/vigilance/VigilanceName.java
@@ -0,0 +1,16 @@
+package cc.polyfrost.oneconfig.config.compatibility.vigilance;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+public @interface VigilanceName {
+ String name();
+
+ String category();
+
+ String subcategory();
+}