fixed dynamic pak locres files not added in the dictionary

This commit is contained in:
iAmAsval 2020-03-15 13:04:12 +01:00
parent d762918baa
commit ac05ef0997
3 changed files with 24 additions and 21 deletions

View File

@ -53,21 +53,25 @@ namespace FModel.Forms
foreach (PAKInfosEntry Pak in PAKEntries.PAKEntriesList.Where(x => x.bTheDynamicPAK))
{
Label PakLabel = new Label();
PakLabel.Content = Path.GetFileNameWithoutExtension(Pak.ThePAKPath);
PakLabel.HorizontalAlignment = HorizontalAlignment.Left;
PakLabel.Margin = new Thickness(2, yPos - 2, 0, 0);
PakLabel.VerticalAlignment = VerticalAlignment.Top;
PakLabel.Foreground = new SolidColorBrush(Color.FromRgb(239, 239, 239));
Label PakLabel = new Label
{
Content = Path.GetFileNameWithoutExtension(Pak.ThePAKPath),
HorizontalAlignment = HorizontalAlignment.Left,
Margin = new Thickness(2, yPos - 2, 0, 0),
VerticalAlignment = VerticalAlignment.Top,
Foreground = new SolidColorBrush(Color.FromRgb(239, 239, 239))
};
TextBox PakTextBox = new TextBox();
PakTextBox.Height = 19;
PakTextBox.TextWrapping = TextWrapping.NoWrap;
PakTextBox.AcceptsReturn = false;
PakTextBox.Margin = new Thickness(160, yPos, 5, 0);
PakTextBox.VerticalAlignment = VerticalAlignment.Top;
PakTextBox.Foreground = new SolidColorBrush(Color.FromRgb(239, 239, 239));
PakTextBox.Name = $"TxtBox_{Regex.Match(Path.GetFileNameWithoutExtension(Pak.ThePAKPath), @"\d+").Value}";
TextBox PakTextBox = new TextBox
{
Height = 19,
TextWrapping = TextWrapping.NoWrap,
AcceptsReturn = false,
Margin = new Thickness(160, yPos, 5, 0),
VerticalAlignment = VerticalAlignment.Top,
Foreground = new SolidColorBrush(Color.FromRgb(239, 239, 239)),
Name = $"TxtBox_{Regex.Match(Path.GetFileNameWithoutExtension(Pak.ThePAKPath), @"\d+").Value}"
};
string PAKKeyFromXML = string.Empty;
if (AESEntries.AESEntriesList != null && AESEntries.AESEntriesList.Any())

View File

@ -119,7 +119,6 @@ namespace FModel.Methods.PAKs
{
AssetEntries.ArraySearcher = new Dictionary<string, FPakEntry[]>();
AssetEntries.AssetEntriesDict = new Dictionary<string, PakReader.PakReader>();
bool isMainKeyWorking = false;
//MAIN PAKs LOOP
foreach (PAKInfosEntry Pak in PAKEntries.PAKEntriesList.Where(x => !x.bTheDynamicPAK))
@ -145,7 +144,6 @@ namespace FModel.Methods.PAKs
if (reader != null)
{
isMainKeyWorking = true;
PAKEntries.PAKToDisplay.Add(Path.GetFileName(Pak.ThePAKPath), reader.FileInfos);
if (bAllPAKs) { new UpdateMyProcessEvents($"{Path.GetFileNameWithoutExtension(Pak.ThePAKPath)} mount point: {reader.MountPoint}", "Loading").Update(); }
@ -157,7 +155,6 @@ namespace FModel.Methods.PAKs
}
}
}
if (isMainKeyWorking) { AssetTranslations.SetAssetTranslation(FProp.Default.FLanguage); }
//DYNAMIC PAKs LOOP
foreach (PAKInfosEntry Pak in PAKEntries.PAKEntriesList.Where(x => x.bTheDynamicPAK))
@ -205,6 +202,8 @@ namespace FModel.Methods.PAKs
else
DebugHelper.WriteLine($".PAKs: No key found for {Pak.ThePAKPath}");
}
AssetTranslations.SetAssetTranslation(FProp.Default.FLanguage);
}
}

View File

@ -132,11 +132,11 @@ For x32 users, you just have to clone or download the repository and build FMode
<a href="https://twitter.com/MaikyMOficial" title="Twitter">🐦</a>
</td>
<td align="center">
<a href="https://github.com/FunGamesLeaks">
<img src="https://avatars2.githubusercontent.com/u/32957190?s=200&v=4" width="100px;" alt="FunGames"/><br>
<sub><b>FunGames</b></sub>
<a href="https://github.com/FabianFG">
<img src="https://avatars2.githubusercontent.com/u/32957190?s=200&v=4" width="100px;" alt="Fabian"/><br>
<sub><b>Fabian</b></sub>
</a><br>
<a href="https://github.com/FunGamesLeaks" title="Github">🔧</a>
<a href="https://github.com/FabianFG" title="Github">🔧</a>
<a href="https://twitter.com/FunGamesLeaks" title="Twitter">🐦</a>
</td>
<td align="center">