Skip to content

Overhaul settings #70

Closed
Closed

Description

@Avasam

I want to overhaul the settings system.

First order of business is using a key-value system. TOML, JSON, XML, YAML, etc. This will future-proof any settings being added / removed and make different versions compatible with each-other without loosing any settings. As a nice bonus it will this make the settings human-readable.

The code will see a massive cleanup from this.

As mentioned above, by not overriding keys we don't use in the save file, we keep compatibility and settings for all versions after this change. It's also a lot less likely to get corrupted or break.

I'd also use this opportunity to fix any and all save and load issues we're having.

I'm fully willing to break settings from any previous version before this change. The cost is very minor for the end user (it takes less than a minute to redo one's settings). And we'll finally get rid of all the overly-complicated settings code.

Activity

  1. changed the title [-]Overhaul settings[/-] [+]Overhaul settings and remove legacy code[/+] on Nov 15, 2021
  2. changed the title [-]Overhaul settings and remove legacy code[/-] [+]Overhaul settings[/+] on Dec 7, 2021
  3. Avasam commented on Dec 7, 2021

    @Avasam
    CollaboratorAuthor

    Edits: Legacy code already removed from other PRs and issues

    I was naturally gravitating towards TOML, which is basically a better .ini format. It turns out this is what the Python community is going toward as well (see pyproject.toml)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions