-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from ME3Tweaks/Beta
Merge 6.4 Beta to 6.4 Master (Stable)
- Loading branch information
Showing
803 changed files
with
36,454 additions
and
16,120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "LegendaryExplorer/submodules/WwiseTools"] | ||
path = LegendaryExplorer/submodules/WwiseTools | ||
url = https://github.com/ME3Tweaks/WwiseTools.git | ||
url = https://github.com/ME3Tweaks/WwiseTools.git | ||
[submodule "LegendaryExplorer/submodules/WwiseParser"] | ||
path = LegendaryExplorer/submodules/WwiseParser | ||
url = https://github.com/ME3Tweaks/WwiseParser.git |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 16 additions & 8 deletions
24
LegendaryExplorer/LegendaryExplorer.Tests/LegendaryExplorer.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.IO; | ||
using System.Linq; | ||
using System.Reflection; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace LegendaryExplorer.Tests; | ||
|
||
public static class TestData | ||
{ | ||
public static Stream GetTestDataStream(params string[] args) | ||
{ | ||
var file = GetTestDataFilePath(args); | ||
if (!File.Exists(file)) | ||
{ | ||
throw new FileNotFoundException(); | ||
} | ||
|
||
return File.OpenRead(file); | ||
} | ||
|
||
public static byte[] GetTestDataBytes(params string[] args) | ||
{ | ||
var file = GetTestDataFilePath(args); | ||
if (!File.Exists(file)) | ||
{ | ||
throw new FileNotFoundException(); | ||
} | ||
|
||
return File.ReadAllBytes(file); | ||
} | ||
|
||
public static string GetTestDataFilePath(params string[] args) | ||
{ | ||
var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | ||
string[] pathPart = { assemblyDir, "TestData" }; | ||
return Path.Combine(pathPart.Concat(args).ToArray()); | ||
} | ||
} |
Binary file added
BIN
+15.4 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1ConsequenceMap.bin
Binary file not shown.
Binary file added
BIN
+264 Bytes
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1DataCodexMap.bin
Binary file not shown.
Binary file added
BIN
+1.25 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1QuestMap.bin
Binary file not shown.
Binary file added
BIN
+40.5 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1QuestMap2.bin
Binary file not shown.
Binary file added
BIN
+4.84 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1StateTransitionMap.bin
Binary file not shown.
Binary file added
BIN
+145 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE1StateTransitionMap2.bin
Binary file not shown.
Binary file added
BIN
+10.8 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE2ConsequenceMap.bin
Binary file not shown.
Binary file added
BIN
+6.21 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE2DataCodexMap.bin
Binary file not shown.
Binary file added
BIN
+92 Bytes
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE2DataCodexMap2.bin
Binary file not shown.
Binary file added
BIN
+1.42 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE2QuestMap.bin
Binary file not shown.
Binary file added
BIN
+1.72 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE2StateTransitionMap.bin
Binary file not shown.
Binary file added
BIN
+13.4 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE3DataCodexMap.bin
Binary file not shown.
Binary file added
BIN
+11.3 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE3QuestMap.bin
Binary file not shown.
Binary file added
BIN
+9.82 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/LE3StateTransitionMap.bin
Binary file not shown.
Binary file added
BIN
+13.4 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/ME3DataCodexMap.bin
Binary file not shown.
Binary file added
BIN
+11.3 KB
LegendaryExplorer/LegendaryExplorer.Tests/TestData/PlotEditor/ME3QuestMap.bin
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,6 @@ public void TestActionSpecification() | |
|
||
spec.IsSelected = true; | ||
Assert.AreEqual(2, timesInvoked); | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,5 @@ public void TestMeshSearch() | |
Assert.IsFalse(AssetFilters.MeshSearch(("bones:5000", r1))); | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
LegendaryExplorer/LegendaryExplorer.Tests/Tools/PlotEditor/BinaryBioCodexMapTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.IO; | ||
using Gammtek.Conduit.MassEffect3.SFXGame.CodexMap; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Encoding = System.Text.Encoding; | ||
|
||
namespace LegendaryExplorer.Tests.Tools.PlotEditor; | ||
|
||
[TestClass] | ||
public class BinaryBioCodexMapTests | ||
{ | ||
[TestMethod] | ||
[DataRow("ME3DataCodexMap.bin")] | ||
[DataRow("LE1DataCodexMap.bin")] | ||
[DataRow("LE2DataCodexMap.bin")] | ||
[DataRow("LE2DataCodexMap2.bin")] | ||
[DataRow("LE3DataCodexMap.bin")] | ||
public void BioCodexMap_Reserializes(string filename) | ||
{ | ||
var fileStream = TestData.GetTestDataStream("PlotEditor", filename); | ||
var codexMap = BinaryBioCodexMap.Load(fileStream, Encoding.UTF8); | ||
|
||
var outputData = new MemoryStream(); | ||
var binaryCodexMap = new BinaryBioCodexMap(codexMap.Sections, codexMap.Pages); | ||
binaryCodexMap.Save(outputData); | ||
|
||
var bin = TestData.GetTestDataBytes("PlotEditor", filename); | ||
CollectionAssert.AreEquivalent(bin, outputData.ToArray()); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
LegendaryExplorer/LegendaryExplorer.Tests/Tools/PlotEditor/BinaryBioQuestMapTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.IO; | ||
using Gammtek.Conduit.MassEffect3.SFXGame.QuestMap; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using Encoding = System.Text.Encoding; | ||
|
||
namespace LegendaryExplorer.Tests.Tools.PlotEditor; | ||
|
||
[TestClass] | ||
public class BinaryBioQuestMapTests | ||
{ | ||
[TestMethod] | ||
[DataRow("ME3QuestMap.bin")] | ||
[DataRow("LE1QuestMap.bin")] | ||
[DataRow("LE1QuestMap2.bin")] | ||
[DataRow("LE2QuestMap.bin")] | ||
[DataRow("LE3QuestMap.bin")] | ||
public void BioQuestMap_Reserializes(string filename) | ||
{ | ||
var fileStream = TestData.GetTestDataStream("PlotEditor", filename); | ||
var questMap = BinaryBioQuestMap.Load(fileStream); | ||
|
||
var outputData = new MemoryStream(); | ||
var binaryQuestMap = new BinaryBioQuestMap(questMap.Quests, questMap.BoolTaskEvals, questMap.IntTaskEvals, questMap.FloatTaskEvals); | ||
binaryQuestMap.Save(outputData); | ||
|
||
var bin = TestData.GetTestDataBytes("PlotEditor", filename); | ||
CollectionAssert.AreEquivalent(bin, outputData.ToArray()); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
LegendaryExplorer/LegendaryExplorer.Tests/Tools/PlotEditor/BinaryBioStateEventMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.IO; | ||
using Gammtek.Conduit.MassEffect3.SFXGame.QuestMap; | ||
using Gammtek.Conduit.MassEffect3.SFXGame.StateEventMap; | ||
using LegendaryExplorerCore.Packages; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace LegendaryExplorer.Tests.Tools.PlotEditor; | ||
|
||
[TestClass] | ||
public class BinaryBioStateEventMapTests | ||
{ | ||
[TestMethod] | ||
[DataRow("LE1ConsequenceMap.bin", MEGame.LE1)] | ||
[DataRow("LE1StateTransitionMap.bin", MEGame.LE1)] | ||
[DataRow("LE1StateTransitionMap2.bin", MEGame.LE1)] | ||
[DataRow("LE2StateTransitionMap.bin", MEGame.LE2)] | ||
[DataRow("LE2ConsequenceMap.bin", MEGame.LE2)] | ||
[DataRow("LE3StateTransitionMap.bin", MEGame.LE3)] | ||
public void BioStateEventMap_Reserializes(string filename, MEGame game) | ||
{ | ||
var fileStream = TestData.GetTestDataStream("PlotEditor", filename); | ||
var stateEventMap = BinaryBioStateEventMap.Load(fileStream, game); | ||
|
||
var outputData = new MemoryStream(); | ||
var binaryStateEventMap = new BinaryBioStateEventMap(stateEventMap.StateEvents); | ||
binaryStateEventMap.Save(outputData, game); | ||
|
||
var bin = TestData.GetTestDataBytes("PlotEditor", filename); | ||
CollectionAssert.AreEquivalent(bin, outputData.ToArray()); | ||
} | ||
} |
Oops, something went wrong.