Add WIP State Of Decay 2 UWP support

And add Aus English since SOD2 Supports it
This commit is contained in:
GMatrixGames 2020-07-10 15:30:27 -04:00
parent 6a77dfd67d
commit 896c5480d0
6 changed files with 46 additions and 1 deletions

View File

@ -9,7 +9,8 @@
Borderlands3, Borderlands3,
MinecraftDungeons, MinecraftDungeons,
BattleBreakers, BattleBreakers,
Spellbreak Spellbreak,
StateOfDecay2 // WIP
} }
public enum EFModel public enum EFModel
@ -41,6 +42,7 @@
{ {
English, English,
French, French,
AustralianEnglish,
German, German,
Italian, Italian,
Spanish, Spanish,

View File

@ -57,6 +57,7 @@ namespace FModel
EGame.MinecraftDungeons => "Minecraft Dungeons", EGame.MinecraftDungeons => "Minecraft Dungeons",
EGame.BattleBreakers => "Battle Breakers", EGame.BattleBreakers => "Battle Breakers",
EGame.Spellbreak => "Spellbreak", EGame.Spellbreak => "Spellbreak",
EGame.StateOfDecay2 => "State of Decay 2",
EGame.Unknown => "Unknown", EGame.Unknown => "Unknown",
_ => "Unknown", _ => "Unknown",
}; };

View File

@ -31,6 +31,7 @@ namespace FModel.Utils
"Dungeons" => EGame.MinecraftDungeons, "Dungeons" => EGame.MinecraftDungeons,
"WorldExplorers" => EGame.BattleBreakers, "WorldExplorers" => EGame.BattleBreakers,
"g3" => EGame.Spellbreak, "g3" => EGame.Spellbreak,
"StateOfDecay2" => EGame.StateOfDecay2,
_ => EGame.Unknown, _ => EGame.Unknown,
}; };
} }
@ -48,6 +49,7 @@ namespace FModel.Utils
EGame.MinecraftDungeons => "Dungeons", EGame.MinecraftDungeons => "Dungeons",
EGame.BattleBreakers => "WorldExplorers", EGame.BattleBreakers => "WorldExplorers",
EGame.Spellbreak => "g3", EGame.Spellbreak => "g3",
EGame.StateOfDecay2 => "StateOfDecay2",
_ => string.Empty, _ => string.Empty,
}; };

View File

@ -231,6 +231,19 @@ namespace FModel.Utils
ELanguage.Chinese => "zh-Hans", ELanguage.Chinese => "zh-Hans",
_ => "en" _ => "en"
}; };
else if (Globals.Game.ActualGame == EGame.StateOfDecay2)
return lang switch
{
ELanguage.English => "en-US",
ELanguage.AustralianEnglish => "en-AU",
ELanguage.Russian => "ru-RU",
ELanguage.PortugueseBrazil => "pt-BR",
ELanguage.Italian => "it-IT",
ELanguage.French => "fr-FR",
ELanguage.SpanishLatin => "es-MX",
ELanguage.German => "de-DE",
_ => "en"
};
else else
return "en"; return "en";
} }

View File

@ -76,6 +76,24 @@ namespace FModel.Utils
return string.Empty; return string.Empty;
} }
public static (string, string, string) GetUWPPakFilesPath(string game)
{
// WIP
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[]", "File not found");
return (string.Empty, string.Empty, string.Empty);
}
public static string GetStateOfDecay2PakFilesPath()
{
// WIP - DO NOT USE
(_, string _, string sod2PakFilesPath) = GetUWPPakFilesPath("Microsoft.Dayton_1.3544.68.2_x64__8wekyb3d8bbwe");
if (!string.IsNullOrEmpty(sod2PakFilesPath))
return $"{sod2PakFilesPath}\\StateOfDecay2\\Content\\Paks";
else
return string.Empty;
}
public static string GetBorderlands3PakFilesPath() public static string GetBorderlands3PakFilesPath()
{ {
(_, string _, string borderlands3FilesPath) = GetUEGameFilesPath("Catnip"); (_, string _, string borderlands3FilesPath) = GetUEGameFilesPath("Catnip");

View File

@ -87,6 +87,15 @@ namespace FModel.Windows.Launcher
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakerFilesPath }); ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakerFilesPath });
} }
string sod2Path = Paks.GetStateOfDecay2PakFilesPath();
if (!string.IsNullOrEmpty(sod2Path))
{
// WIP - DO NOT USE
//DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[LauncherInstalled.dat]", $"Spellbreak found at {spellbreakerFilesPath}");
//Globals.gNotifier.ShowCustomMessage("Spellbreak", Properties.Resources.PathAutoDetected, "/FModel;component/Resources/spellbreak.ico");
//ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Spellbreak", Property = spellbreakerFilesPath });
}
Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.Where(x => x.Property.ToString() == Properties.Settings.Default.PakPath).FirstOrDefault(); Games_CbBox.SelectedItem = ComboBoxVm.gamesCbViewModel.Where(x => x.Property.ToString() == Properties.Settings.Default.PakPath).FirstOrDefault();
} }