mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-10 13:44:13 +00:00
Merge branch 'master' of https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
This commit is contained in:
commit
25a5ca7d90
1 changed files with 35 additions and 0 deletions
|
@ -2129,7 +2129,42 @@ namespace UWUVCI_AIO_WPF
|
||||||
}
|
}
|
||||||
KeyFile.ExportFile(temp, console);
|
KeyFile.ExportFile(temp, console);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FixupKeys(l, console);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void FixupKeys(List<GameBases> l, GameConsoles console)
|
||||||
|
{
|
||||||
|
string file = $@"bin\keys\{console.ToString().ToLower()}.vck";
|
||||||
|
var save = KeyFile.ReadBasesFromKeyFile(file);
|
||||||
|
List<TKeys> temp = new List<TKeys>();
|
||||||
|
foreach(TKeys a in save)
|
||||||
|
{
|
||||||
|
temp.Add(a);
|
||||||
|
}
|
||||||
|
foreach (GameBases gb in l)
|
||||||
|
{
|
||||||
|
TKeys tempkey = new TKeys();
|
||||||
|
bool check = false;
|
||||||
|
foreach(TKeys a in save)
|
||||||
|
{
|
||||||
|
if(a.Base.Name == gb.Name && a.Base.Region == gb.Region)
|
||||||
|
{
|
||||||
|
check = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!check)
|
||||||
|
{
|
||||||
|
tempkey.Base = gb;
|
||||||
|
temp.Add(tempkey);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
File.Delete(file);
|
||||||
|
KeyFile.ExportFile(temp, console);
|
||||||
}
|
}
|
||||||
private void UpdateKeyFile(List<GameBases> l, GameConsoles console)
|
private void UpdateKeyFile(List<GameBases> l, GameConsoles console)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue