Add Battle Breakers native support

This commit is contained in:
GMatrixGames 2020-06-18 12:34:37 -04:00
parent 808a8fc9ba
commit 4e3f76dde7
7 changed files with 39 additions and 1 deletions

View File

@ -7,7 +7,8 @@
Valorant,
DeadByDaylight,
Borderlands3,
MinecraftDungeons
MinecraftDungeons,
BattleBreakers
}
public enum EFModel

View File

@ -38,6 +38,7 @@
<None Remove="Resources\api-off.ico" />
<None Remove="Resources\api.ico" />
<None Remove="Resources\backup-restore.png" />
<None Remove="Resources\battlebreakers.ico" />
<None Remove="Resources\borderlands3.ico" />
<None Remove="Resources\bug.png" />
<None Remove="Resources\BurbankBigCondensed-Bold.ttf" />
@ -144,6 +145,7 @@
<Resource Include="Resources\api-off.ico" />
<Resource Include="Resources\api.ico" />
<Resource Include="Resources\backup-restore.png" />
<Resource Include="Resources\battlebreakers.ico" />
<Resource Include="Resources\borderlands3.ico" />
<Resource Include="Resources\bug.png" />
<Resource Include="Resources\BurbankBigCondensed-Bold.ttf" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -29,6 +29,7 @@ namespace FModel.Utils
"DeadByDaylight" => EGame.DeadByDaylight,
"OakGame" => EGame.Borderlands3,
"Dungeons" => EGame.MinecraftDungeons,
"WorldExplorers" => EGame.BattleBreakers,
_ => EGame.Unknown,
};
}
@ -44,6 +45,7 @@ namespace FModel.Utils
EGame.DeadByDaylight => "DeadByDaylight",
EGame.Borderlands3 => "OakGame",
EGame.MinecraftDungeons => "Dungeons",
EGame.BattleBreakers => "WorldExplorers",
_ => string.Empty,
};

View File

@ -53,6 +53,8 @@ namespace FModel.Utils
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/{gameName}/{langCode}/{gameName}.locres", RegexOptions.IgnoreCase);
else if (Globals.Game.ActualGame == EGame.MinecraftDungeons)
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase);
else if (Globals.Game.ActualGame == EGame.BattleBreakers)
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase);
if (m != null && m.Success)
{
@ -200,6 +202,20 @@ namespace FModel.Utils
ELanguage.Russian => "ru-RU",
_ => "en"
};
else if (Globals.Game.ActualGame == EGame.BattleBreakers)
return lang switch
{
ELanguage.English => "en",
ELanguage.Russian => "ru",
ELanguage.French => "fr",
ELanguage.Spanish => "es",
ELanguage.Italian => "it",
ELanguage.Japanese => "ja",
ELanguage.Korean => "ko",
ELanguage.PortugueseBrazil => "pt-BR",
ELanguage.Chinese => "zh-Hans",
_ => "en"
};
else
return "en";
}

View File

@ -101,6 +101,15 @@ namespace FModel.Utils
return string.Empty;
}
public static string GetBattleBreakersPakFilesPath()
{
(_, string _, string battlebreakersFilesPath) = GetUEGameFilesPath("WorldExplorersLive");
if (!string.IsNullOrEmpty(battlebreakersFilesPath))
return $"{battlebreakersFilesPath}\\WorldExplorers\\Content\\Paks";
else
return string.Empty;
}
public static void Merge(Dictionary<string, FPakEntry> tempFiles, out Dictionary<string, FPakEntry> files, string mount)
{
files = new Dictionary<string, FPakEntry>();

View File

@ -71,6 +71,14 @@ namespace FModel.Windows.Launcher
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Minecraft Dungeons", Property = minecraftdungeonsFilesPath });
}
string battlebreakersFilesPath = Paks.GetBattleBreakersPakFilesPath();
if (!string.IsNullOrEmpty(battlebreakersFilesPath))
{
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Battle Breakers found at {battlebreakersFilesPath}");
Globals.gNotifier.ShowCustomMessage("Battle Breakers", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/battlebreakers.ico");
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Battle Breakers", Property = battlebreakersFilesPath });
}
Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.Where(x => x.Property.ToString() == Properties.Settings.Default.PakPath).FirstOrDefault();
}