Add code to show default values of options (currently unused)

Related: #186
This commit is contained in:
embeddedt 2023-07-26 09:00:28 -04:00
parent 84e27a7c4d
commit 7ad09acec6
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -381,8 +381,19 @@ public class ModernFixEarlyConfig {
.sorted()
.collect(Collectors.toList());
for(String line : keys) {
if(!line.equals("mixin.core"))
if(!line.equals("mixin.core")) {
Option option = this.options.get(line);
String extraContext = "";
if(option != null) {
if(option.isModDefined())
extraContext = " # (overridden for mod compat)";
else {
boolean defaultEnabled = DEFAULT_SETTING_OVERRIDES.getOrDefault(line, true);
extraContext = " # (default: " + defaultEnabled + ")";
}
}
writer.write("# " + line + "\n");
}
}
for (String key : keys) {