EssentialGG / Vigilance

Configuration Utility using Elementa
GNU Lesser General Public License v3.0
54 stars 13 forks source link

Profiles Proposition #14

Open 1fxe opened 3 years ago

1fxe commented 3 years ago

Goals

Below I have a constructed a possibility of how this can be achieved however feel free to alter it.

File structure

./minecraft
    /config
        /Vigilance
         Vigilance-global.toml
               /{modname}
                   default.toml
                   profile1.toml
               /{modname2}
                  default.toml

Vigilance-global.toml examle

patcher = "profile1.toml"
hytilies = "default.toml"

This would allow for reset of settings as we know the default config is {modname}-default.toml, the default should be read only and any changes made in the GUI would generate {modname}-profile1.toml if it does not exist.

Vigilance-global should store the current config. If no config exists for the current mod add the mod default config to the file.

https://github.com/Sk1erLLC/Vigilance/blob/f9e04504c3b2e2ed4365f4015d65e5253c61dd8f/src/main/kotlin/club/sk1er/vigilance/gui/SettingsGui.kt#L161