diff --git a/FModel/Enums.cs b/FModel/Enums.cs index 0c616607..afadfe54 100644 --- a/FModel/Enums.cs +++ b/FModel/Enums.cs @@ -7,7 +7,8 @@ Valorant, DeadByDaylight, Borderlands3, - MinecraftDungeons + MinecraftDungeons, + BattleBreakers } public enum EFModel diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index 91e9d8fa..72e95aa4 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -38,6 +38,7 @@ + @@ -144,6 +145,7 @@ + diff --git a/FModel/Resources/battlebreakers.ico b/FModel/Resources/battlebreakers.ico new file mode 100644 index 00000000..f517efdd Binary files /dev/null and b/FModel/Resources/battlebreakers.ico differ diff --git a/FModel/Utils/Folders.cs b/FModel/Utils/Folders.cs index 95616dff..2713a554 100644 --- a/FModel/Utils/Folders.cs +++ b/FModel/Utils/Folders.cs @@ -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, }; diff --git a/FModel/Utils/Localizations.cs b/FModel/Utils/Localizations.cs index e6f73b41..860a25aa 100644 --- a/FModel/Utils/Localizations.cs +++ b/FModel/Utils/Localizations.cs @@ -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"; } diff --git a/FModel/Utils/Paks.cs b/FModel/Utils/Paks.cs index 61b37e16..3bd027da 100644 --- a/FModel/Utils/Paks.cs +++ b/FModel/Utils/Paks.cs @@ -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 tempFiles, out Dictionary files, string mount) { files = new Dictionary(); diff --git a/FModel/Windows/Launcher/FLauncher.xaml.cs b/FModel/Windows/Launcher/FLauncher.xaml.cs index 750fd035..1828e3b9 100644 --- a/FModel/Windows/Launcher/FLauncher.xaml.cs +++ b/FModel/Windows/Launcher/FLauncher.xaml.cs @@ -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(); }