Since people want to skid, here's official Spellbreak support since I have the beta

This commit is contained in:
GMatrixGames 2020-07-06 15:07:20 -04:00
parent ec51b7dd14
commit 06acf26777
8 changed files with 39 additions and 1 deletions

View File

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

View File

@ -95,6 +95,7 @@
<None Remove="Resources\sign-direction-plus.png" />
<None Remove="Resources\sign-direction-remove.png" />
<None Remove="Resources\sign-direction.png" />
<None Remove="Resources\spellbreak.ico" />
<None Remove="Resources\stop.png" />
<None Remove="Resources\T-Icon-Pets-64.png" />
<None Remove="Resources\T-Icon-Quests-64.png" />
@ -200,6 +201,7 @@
<Resource Include="Resources\sign-direction-plus.png" />
<Resource Include="Resources\sign-direction-remove.png" />
<Resource Include="Resources\sign-direction.png" />
<Resource Include="Resources\spellbreak.ico" />
<Resource Include="Resources\stop.png" />
<Resource Include="Resources\T-Icon-Pets-64.png" />
<Resource Include="Resources\T-Icon-Quests-64.png" />

View File

@ -56,6 +56,7 @@ namespace FModel
EGame.Borderlands3 => "Borderlands 3",
EGame.MinecraftDungeons => "Minecraft Dungeons",
EGame.BattleBreakers => "Battle Breakers",
EGame.Spellbreak => "Spellbreak",
EGame.Unknown => "Unknown",
_ => "Unknown",
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -30,6 +30,7 @@ namespace FModel.Utils
"OakGame" => EGame.Borderlands3,
"Dungeons" => EGame.MinecraftDungeons,
"WorldExplorers" => EGame.BattleBreakers,
"g3" => EGame.Spellbreak,
_ => EGame.Unknown,
};
}
@ -46,6 +47,7 @@ namespace FModel.Utils
EGame.Borderlands3 => "OakGame",
EGame.MinecraftDungeons => "Dungeons",
EGame.BattleBreakers => "WorldExplorers",
EGame.Spellbreak => "g3",
_ => string.Empty,
};

View File

@ -55,6 +55,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.BattleBreakers)
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);
if (m != null && m.Success)
{
@ -215,6 +217,20 @@ namespace FModel.Utils
ELanguage.Chinese => "zh-Hans",
_ => "en"
};
else if (Globals.Game.ActualGame == EGame.Spellbreak)
return lang switch
{
ELanguage.English => "en",
ELanguage.Russian => "ru",
ELanguage.French => "fr",
ELanguage.German => "de",
ELanguage.Spanish => "es",
ELanguage.Italian => "it",
ELanguage.Japanese => "ja",
ELanguage.PortugueseBrazil => "pt-BR",
ELanguage.Chinese => "zh-Hans",
_ => "en"
};
else
return "en";
}

View File

@ -111,6 +111,15 @@ namespace FModel.Utils
return string.Empty;
}
public static string GetSpellbreakPakFilesPath()
{
(_, string _, string spellbreakFilesPath) = GetUEGameFilesPath("Newt");
if (!string.IsNullOrEmpty(spellbreakFilesPath))
return $"{spellbreakFilesPath}\\g3\\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

@ -79,6 +79,13 @@ namespace FModel.Windows.Launcher
ComboBoxVm.gamesCbViewModel.Add(new ComboBoxViewModel { Id = i++, Content = "Battle Breakers", Property = battlebreakersFilesPath });
}
string spellbreakerFilesPath = Paks.GetSpellbreakPakFilesPath();
if (!string.IsNullOrEmpty(battlebreakersFilesPath))
{
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();
}