Odyssey compatibility

fixes #14
This commit is contained in:
alterNERDtive 2021-05-19 12:13:14 +02:00
parent 0736d29682
commit c8b76472bb
3 changed files with 61 additions and 1 deletions

View file

@ -1,3 +1,37 @@
# devel
**Note**: If you do not own Odyssey, everything will work just as before!
I, too, do not own Odyssey. So while I have tried testing various things with
mock Odyssey binds files, please keep an eye out for bugs and [file an
issue](https://github.com/alterNERDtive/bindED/issues/new/) if you
encounter any. And check back for a potential 4.0.1 soon. TYVM!
**IMPORTANT**: Please backup your binds files before installing this release,
just in case. You can find them in
`%localappdata%\Frontier Developments\Elite Dangerous\Options\Bindings`.
Sadly for the time being Odyssey and Horizons will basically be separate games.
That also means they have separate binds files.
BindED will by default always use the last edited file, be that the base preset,
Horizons or Odyssey.
To keep hassle to a minimum, the recommended way to change binds is to do it
from Odyssey. When a change to the Odyssey file is detected, the plugin will
by default overwrite Horizons binds with it. To prevent that and keep entirely
separate binds, you can set `bindED.disableHorizonsSync#` (yes, including the
pound sign) to `true` in your VoiceAttack profile.
## Added
* Odyssey binds file support (`*.4.0.binds`). (#14)
* `bindED.disableHorizonsSync#` configuration option: Set this (to `true`) in
your VoiceAttack profile to disable automatically syncing Odyssey binds
changes to Horizons binds.
-----
# 3.1 (2021-01-29)
## Changed

View file

@ -37,6 +37,22 @@ context to force a refresh.
If you are not using a US QWERTY keyboard layout, see below.
### Horizons vs. Odyssey
**Note**: If you do not own Odyssey, everything will work just as before!
Sadly for the time being Odyssey and Horizons will basically be separate games.
That also means they have separate binds files.
BindED will by default always use the last edited file, be that the base preset,
Horizons or Odyssey.
To keep hassle to a minimum, the recommended way to change binds is to do it
from Odyssey. When a change to the Odyssey file is detected, the plugin will
by default overwrite Horizons binds with it. To prevent that and keep entirely
separate binds, you can set `bindED.disableHorizonsSync#` (yes, including the
pound sign) to `true` in your VoiceAttack profile.
## Support for non-US Keyboard Layouts
Shipped layouts:

View file

@ -379,11 +379,21 @@ namespace bindEDplugin
Preset = null;
LoadBinds(Binds);
}
else if (Regex.Match(name, $@"{_preset}(\.3\.0)?\.binds$").Success)
else if (Regex.Match(name, $@"{Preset}(\.[34]\.0)?\.binds$").Success)
{
LogInfo($"Bindings file '{name}' has changed, reloading …");
Binds = null;
LoadBinds(Binds);
// copy Odyssey -> Horizons
if (name == $"{Preset}.4.0.binds" && !_VA!.GetBoolean("bindED.disableHorizonsSync#"))
{
File.WriteAllText(
Path.Combine(_bindingsDir, $"{Preset}.3.0.binds"),
File.ReadAllText(Path.Combine(_bindingsDir, name))
.Replace("MajorVersion=\"4\" MinorVersion=\"0\">", "MajorVersion=\"3\" MinorVersion=\"0\">")
);
}
}
}
catch (Exception e)