Show the "current" value of options in config files
This commit is contained in:
parent
b623b3fa96
commit
b4aac03f09
|
|
@ -193,11 +193,13 @@ public class ModernFixEarlyConfig {
|
||||||
writer.write("# This is the configuration file for ModernFix.\n");
|
writer.write("# This is the configuration file for ModernFix.\n");
|
||||||
writer.write("#\n");
|
writer.write("#\n");
|
||||||
writer.write("# The following options can be enabled or disabled if there is a compatibility issue.\n");
|
writer.write("# The following options can be enabled or disabled if there is a compatibility issue.\n");
|
||||||
|
writer.write("# Their values are values that ModernFix finally use, based on your mod setup and options you set.\n");
|
||||||
writer.write("# Add a line mixin.example_name=true/false without the # sign to enable/disable a rule.\n");
|
writer.write("# Add a line mixin.example_name=true/false without the # sign to enable/disable a rule.\n");
|
||||||
|
writer.write("# This file will be refreshed at each game launch to update the current values.\n");
|
||||||
List<String> lines = this.options.keySet().stream()
|
List<String> lines = this.options.keySet().stream()
|
||||||
.filter(key -> !key.equals("mixin.core"))
|
.filter(key -> !key.equals("mixin.core"))
|
||||||
.sorted()
|
.sorted()
|
||||||
.map(key -> "# " + key + "\n")
|
.map(key -> "# " + key + " = " + this.options.get(key).isEnabled() + "\n")
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
for(String line : lines) {
|
for(String line : lines) {
|
||||||
writer.write(line);
|
writer.write(line);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user