BGS-Tally icon indicating copy to clipboard operation
BGS-Tally copied to clipboard

Implement unique prefix on config values

Open aussig opened this issue 3 years ago • 0 comments

Currently all config values are prefixed with X with isn't particularly unique or identifiable.

EDMC docs recommend that all plug-in config values are prefixed with a unique identifier, so implement a one-off migration to store all config values prefixed with BGST_.

On load logic:

  1. Check for existence of BGST_ value first.
  2. If present, use it. If not present, look for equivalent X value.
  3. If X value present, use it and delete it. If not present, use default value.

On save logic:

  1. Save to new BGST_ value.

Config entries to handle:

  • [ ] XShowZeroActivity
  • [ ] XAbbreviate
  • [ ] XSecondaryInf
  • [ ] XDiscordUsername
  • [ ] XEnableOverlay
  • [ ] XDiscordWebhook
  • [ ] XDiscordTWWebhook
  • [ ] XCurrentSystemID
  • [ ] XStationFaction
  • [ ] XStationType

aussig avatar Dec 30 '22 16:12 aussig