diff --git a/FModel/Enums.cs b/FModel/Enums.cs index 537023c6..ec9da5dd 100644 --- a/FModel/Enums.cs +++ b/FModel/Enums.cs @@ -10,7 +10,8 @@ MinecraftDungeons, BattleBreakers, Spellbreak, - StateOfDecay2 // WIP + StateOfDecay2, // WIP + TheCycleEA // TODO: Early Access version, change when game is released } public enum EFModel diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index 3f7d17e8..c42db2ad 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -100,6 +100,7 @@ + @@ -211,6 +212,7 @@ + diff --git a/FModel/Globals.cs b/FModel/Globals.cs index b9c39a7f..8a2394d3 100644 --- a/FModel/Globals.cs +++ b/FModel/Globals.cs @@ -58,6 +58,7 @@ namespace FModel EGame.BattleBreakers => "Battle Breakers", EGame.Spellbreak => "Spellbreak", EGame.StateOfDecay2 => "State of Decay 2", + EGame.TheCycleEA => "The Cycle (Early Access)", EGame.Unknown => "Unknown", _ => "Unknown", }; diff --git a/FModel/Resources/thecycle.ico b/FModel/Resources/thecycle.ico new file mode 100644 index 00000000..33a05f82 Binary files /dev/null and b/FModel/Resources/thecycle.ico differ diff --git a/FModel/Utils/Folders.cs b/FModel/Utils/Folders.cs index 538bad94..1e8492f4 100644 --- a/FModel/Utils/Folders.cs +++ b/FModel/Utils/Folders.cs @@ -32,6 +32,7 @@ namespace FModel.Utils "WorldExplorers" => EGame.BattleBreakers, "g3" => EGame.Spellbreak, "StateOfDecay2" => EGame.StateOfDecay2, + "Prospect" => EGame.TheCycleEA, _ => EGame.Unknown, }; } @@ -50,6 +51,7 @@ namespace FModel.Utils EGame.BattleBreakers => "WorldExplorers", EGame.Spellbreak => "g3", EGame.StateOfDecay2 => "StateOfDecay2", + EGame.TheCycleEA => "Prospect", _ => string.Empty, }; diff --git a/FModel/Utils/Localizations.cs b/FModel/Utils/Localizations.cs index e62858df..55fb70e1 100644 --- a/FModel/Utils/Localizations.cs +++ b/FModel/Utils/Localizations.cs @@ -57,6 +57,10 @@ namespace FModel.Utils m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase); else if (Globals.Game.ActualGame == EGame.Spellbreak) m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase); + else if (Globals.Game.ActualGame == EGame.StateOfDecay2) + m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/Game/{langCode}/Game.locres", RegexOptions.IgnoreCase); + else if (Globals.Game.ActualGame == EGame.TheCycleEA) + m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/ProspectGame/{langCode}/ProspectGame.locres", RegexOptions.IgnoreCase); if (m != null && m.Success) { @@ -244,6 +248,18 @@ namespace FModel.Utils ELanguage.German => "de-DE", _ => "en" }; + else if (Globals.Game.ActualGame == EGame.TheCycleEA) + return lang switch + { + ELanguage.English => "en", + ELanguage.German => "de", + ELanguage.Spanish => "es", + ELanguage.French => "fr", + ELanguage.Polish => "pl", + ELanguage.PortugueseBrazil => "pt-BR", + ELanguage.Russian => "ru", + _ => "en" + }; else return "en"; } diff --git a/FModel/Utils/Paks.cs b/FModel/Utils/Paks.cs index 34f2bdde..02f291bc 100644 --- a/FModel/Utils/Paks.cs +++ b/FModel/Utils/Paks.cs @@ -132,6 +132,15 @@ namespace FModel.Utils return string.Empty; } + public static string GetTheCyclePakFilesPath() + { + (_, string _, string theCycleFilesPath) = GetUEGameFilesPath("AzaleaAlpha"); // TODO: Change when out of alpha + if (!string.IsNullOrEmpty(theCycleFilesPath)) + return $"{theCycleFilesPath}\\Prospect\\Content\\Paks"; + else + return string.Empty; + } + public static string GetMinecraftDungeonsPakFilesPath() { var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); diff --git a/FModel/Windows/Launcher/FLauncher.xaml.cs b/FModel/Windows/Launcher/FLauncher.xaml.cs index 910336e0..d643d3ad 100644 --- a/FModel/Windows/Launcher/FLauncher.xaml.cs +++ b/FModel/Windows/Launcher/FLauncher.xaml.cs @@ -87,6 +87,14 @@ namespace FModel.Windows.Launcher ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakerFilesPath }); } + string theCyclePath = Paks.GetTheCyclePakFilesPath(); + if (!string.IsNullOrEmpty(theCyclePath)) + { + DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"The Cycle found at {theCyclePath}"); + Globals.gNotifier.ShowCustomMessage("The Cycle (EA)", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/thecycle.ico"); + ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "The Cycle (Early Access)", Property = theCyclePath }); + } + string sod2Path = Paks.GetStateOfDecay2PakFilesPath(); if (!string.IsNullOrEmpty(sod2Path)) {