diff --git a/PoE-MxFilterGen/generator/tier.cs b/PoE-MxFilterGen/generator/tier.cs index a172f83..286d9d0 100644 --- a/PoE-MxFilterGen/generator/tier.cs +++ b/PoE-MxFilterGen/generator/tier.cs @@ -261,30 +261,6 @@ namespace PoE_MxFilterGen.generator File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8); File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8); File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " HasExplicitMod \"Veiled\"" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8); - File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " FracturedItem True" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8); - File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8); - File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8); File.AppendAllText(path, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8); File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); diff --git a/PoE-MxFilterGen/json/settings.cs b/PoE-MxFilterGen/json/settings.cs index b015e49..00cade8 100644 --- a/PoE-MxFilterGen/json/settings.cs +++ b/PoE-MxFilterGen/json/settings.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Security.Policy; using System.Text; using System.Threading.Tasks; @@ -11,6 +12,7 @@ namespace PoE_MxFilterGen.json public class SETTINGS { public string league { get; set; } + public List Structures { get; set; } public int tierValue { get; set; } public bool tier1HAxe { get; set; } public bool tier2HAxe { get; set; } @@ -38,6 +40,12 @@ namespace PoE_MxFilterGen.json public bool install { get; set; } public string path { get; set; } public string structure { get; set; } + public List Sizes { get; set; } + public List Colors { get; set; } + public List Shapes { get; set; } + public List Actions { get; set; } + public List Conditions { get; set; } + public List Operators { get; set; } } @@ -204,6 +212,12 @@ namespace PoE_MxFilterGen.json return j.tierBaseExclude; } + internal static List GetStructure() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.Structures; + } + public static void WriteSection(string structure) { SETTINGS js = JsonConvert.DeserializeObject(File.ReadAllText($@"settings.json")); @@ -236,7 +250,14 @@ namespace PoE_MxFilterGen.json cardValue = js.cardValue, install = js.install, path = js.path, - structure = structure + structure = structure, + Structures = js.Structures, + Sizes = js.Sizes, + Colors = js.Colors, + Shapes = js.Shapes, + Actions = js.Actions, + Conditions = js.Conditions, + Operators = js.Operators }; var raw = JsonConvert.SerializeObject(se, Formatting.Indented); File.WriteAllText($@"settings.json", raw); diff --git a/PoE-MxFilterGen/main.cs b/PoE-MxFilterGen/main.cs index aafa6df..56f7514 100644 --- a/PoE-MxFilterGen/main.cs +++ b/PoE-MxFilterGen/main.cs @@ -12,7 +12,7 @@ namespace PoE_MxFilterGen internal class main { private static DateTime dt = DateTime.Now; - public static string version = "11.0.1"; + public static string version = "11.1.0"; public static string fDate = string.Format("{0}-{1}-{2}", (object)main.dt.Day, (object)main.dt.Month, (object)main.dt.Year); public static string api = ""; public static string giturl = "https://mxgit.ovh/mikx"; @@ -97,10 +97,11 @@ namespace PoE_MxFilterGen } } string str = "MxFilter"; - int sc = structures.Structures().Length; + List struc = settings.GetStructure(); + int sc = struc.Count; msg.CMW(string.Format("Generating the {0} filter using {1} source(s)...", filter, sc), true, 1); main.ftotal = sc; - foreach (var structure in structures.Structures()) + foreach (var structure in settings.GetStructure()) { ++main.fprog; msg.drawProgress(main.fprog, main.ftotal); @@ -173,12 +174,12 @@ namespace PoE_MxFilterGen File.AppendAllText(outp, $"#### Contact: mikx@mxpoe.ovh / http://discord.mxg.ovh{Environment.NewLine}"); File.AppendAllText(outp, $"{Environment.NewLine}"); File.AppendAllText(outp, $"#### SECTIONS{Environment.NewLine}"); - foreach (var s in structures.Structures()) + foreach (var s in settings.GetStructure()) { File.AppendAllText(outp, $"# {s}{Environment.NewLine}"); } File.AppendAllText(outp, $"{Environment.NewLine}"); - foreach (var structure in structures.Structures()) + foreach (var structure in settings.GetStructure()) { switch (structure) { diff --git a/PoE-MxFilterGen/obj/Debug/mxfiltergen.exe b/PoE-MxFilterGen/obj/Debug/mxfiltergen.exe index 9a2fcd0..4bce461 100644 Binary files a/PoE-MxFilterGen/obj/Debug/mxfiltergen.exe and b/PoE-MxFilterGen/obj/Debug/mxfiltergen.exe differ diff --git a/PoE-MxFilterGen/obj/Debug/mxfiltergen.pdb b/PoE-MxFilterGen/obj/Debug/mxfiltergen.pdb index 613f070..eadae5b 100644 Binary files a/PoE-MxFilterGen/obj/Debug/mxfiltergen.pdb and b/PoE-MxFilterGen/obj/Debug/mxfiltergen.pdb differ