Fix @Config.Comment not working on subcategory Objects. Closes #3593

This commit is contained in:
LexManos committed 2017-02-23 17:25:09 -08:00
commit 9d71b667b6
2 files changed
+9

No files matched your search

@@ -249,6 +249,7 @@ public class ConfigManager
else if (ftype.getSuperclass() == Object.class) //Only support classes that are one level below Object.
{
String sub = (category.isEmpty() ? "" : category + ".") + getName(f).toLowerCase(Locale.ENGLISH);
cfg.getCategory(sub).setComment(comment);
Object sinst = get(instance, f);
for (Field sf : ftype.getDeclaredFields())
{
@@ -70,6 +70,14 @@ public class ConfigTest
@LangKey("this.is.not.a.good.key")
@Comment({"This is a really long", "Multi-line comment"})
public static String Comments = "Hi Tv!";
@Comment("Category Comment Test")
public static NestedType Inner = new NestedType();
public static class NestedType
{
public String HeyLook = "Go in!";
}
}
@Config(modid = MODID, name = MODID + "_subcats", category = "")
public static class CONFIG_SUBCATS