mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Using MO2Name instead of MO2ArchiveName for GameFileSourceDownloader
This commit is contained in:
parent
4a32fc1415
commit
d9902746d0
21
Wabbajack.Common.Test/GameTests.cs
Normal file
21
Wabbajack.Common.Test/GameTests.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace Wabbajack.Common.Test
|
||||
{
|
||||
public class GameTests
|
||||
{
|
||||
[Fact]
|
||||
public void TestGetGameFromMO2ArchiveName()
|
||||
{
|
||||
var games = GameRegistry.Games.Select(x => (name: x.Value.MO2Name, game: x.Key));
|
||||
foreach (var (name, game) in games)
|
||||
{
|
||||
if (name == null) continue;
|
||||
var result = GameRegistry.TryGetByFuzzyName(name);
|
||||
Assert.NotNull(result);
|
||||
Assert.Equal(game, result.Game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -99,7 +99,9 @@ namespace Wabbajack.Lib.Downloaders
|
||||
public override string[] GetMetaIni()
|
||||
{
|
||||
var meta = Game.MetaData();
|
||||
return new[] {"[General]", $"gameName={meta.MO2ArchiveName ?? meta.Game.ToString()}", $"gameFile={GameFile}"};
|
||||
//using MO2Name instead of MO2ArchiveName because Skyrim VR and Fallout 4 VR have the same archive name
|
||||
//as their non-vr counterpart.
|
||||
return new[] {"[General]", $"gameName={meta.MO2Name ?? meta.Game.ToString()}", $"gameFile={GameFile}"};
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user