diff --git a/.gitignore b/.gitignore index 8823493..8151d8f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ src/ExileLootDropTester/obj/* src/packages/* .hgignore @ExileLootDrop.zip +src/ExileLootDropTester/ExileLootDropTester.csproj.user diff --git a/build.bat b/build.bat index d7aa39d..37f5889 100644 --- a/build.bat +++ b/build.bat @@ -1,4 +1,4 @@ -set MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MsBuild.exe" +set MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MsBuild.exe" set MAKEPBO="C:\Program Files (x86)\Mikero\DePboTools\bin\MakePbo.exe" rd /s /q @ExileLootDrop diff --git a/src/ExileLootDrop/Loot.cs b/src/ExileLootDrop/Loot.cs index 89c2383..57b9cb3 100644 --- a/src/ExileLootDrop/Loot.cs +++ b/src/ExileLootDrop/Loot.cs @@ -56,7 +56,7 @@ namespace ExileLootDrop } private readonly List _cfgGroups; - private Dictionary Table { get; } = new Dictionary(); + public Dictionary Table { get; } = new Dictionary(); /// /// Loot constructor diff --git a/src/ExileLootDropTester/Program.cs b/src/ExileLootDropTester/Program.cs index 2359751..2a6b2ac 100644 --- a/src/ExileLootDropTester/Program.cs +++ b/src/ExileLootDropTester/Program.cs @@ -1,21 +1,30 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using ExileLootDrop; namespace ExileLootDropTester { - class Program + internal class Program { - const int Loops = 50000; + private const int Loops = 50000; - static void Main(string[] args) + private static void Main(string[] args) { Console.WriteLine("Loading Loot"); //Loot.LootTable Console.WriteLine(); var tables = Loot.LootTable.GetTables(); + if (args.Length > 0 && args[0] == "dump") + { + File.WriteAllText( + Path.Combine(Environment.CurrentDirectory, "dump.txt"), + $"[\"{string.Join("\",\"", tables.Select(table => string.Join("\",\"", Loot.LootTable.Table[table].LootItems.Select(l => l.Item))))}\"]" + ); + return; + } for (var i = 0; i < tables.Length; i++) { var table = tables[i]; @@ -25,8 +34,7 @@ namespace ExileLootDropTester Console.WriteLine("Select a table: "); var input = Console.ReadLine(); Console.WriteLine(); - int index; - if (!int.TryParse(input, out index)) + if (!int.TryParse(input, out int index)) { Console.WriteLine("input error"); return;