mirror of
https://github.com/4sval/FModel.git
synced 2026-04-21 17:17:49 -05:00
Add The Cycle Game to auto-detect
This commit is contained in:
parent
cabae55b4d
commit
2498593cea
|
|
@ -10,7 +10,8 @@
|
|||
MinecraftDungeons,
|
||||
BattleBreakers,
|
||||
Spellbreak,
|
||||
StateOfDecay2 // WIP
|
||||
StateOfDecay2, // WIP
|
||||
TheCycleEA // TODO: Early Access version, change when game is released
|
||||
}
|
||||
|
||||
public enum EFModel
|
||||
|
|
|
|||
|
|
@ -100,6 +100,7 @@
|
|||
<None Remove="Resources\sod2.ico" />
|
||||
<None Remove="Resources\T-Icon-Pets-64.png" />
|
||||
<None Remove="Resources\T-Icon-Quests-64.png" />
|
||||
<None Remove="Resources\thecycle.ico" />
|
||||
<None Remove="Resources\trello.png" />
|
||||
<None Remove="Resources\T_ClipSize_Weapon_Stats.png" />
|
||||
<None Remove="Resources\T_DamagePerBullet_Weapon_Stats.png" />
|
||||
|
|
@ -211,6 +212,7 @@
|
|||
<Resource Include="Resources\T-Icon-Pets-64.png" />
|
||||
<Resource Include="Resources\T-Icon-Quests-64.png" />
|
||||
<Resource Include="Resources\trello.png" />
|
||||
<Resource Include="Resources\thecycle.ico" />
|
||||
<Resource Include="Resources\T_ClipSize_Weapon_Stats.png" />
|
||||
<Resource Include="Resources\T_DamagePerBullet_Weapon_Stats.png" />
|
||||
<Resource Include="Resources\T_Placeholder_Challenge_Image.png" />
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
};
|
||||
|
|
|
|||
BIN
FModel/Resources/thecycle.ico
Normal file
BIN
FModel/Resources/thecycle.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 149 KiB |
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ 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.TheCycleEA)
|
||||
m = Regex.Match(mount + KvP.Value.Name, $"{gameName}/Content/Localization/ProspectGame/{langCode}/ProspectGame.locres", RegexOptions.IgnoreCase);
|
||||
|
||||
if (m != null && m.Success)
|
||||
{
|
||||
|
|
@ -244,6 +246,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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user