Scarab Generator
This commit is contained in:
parent
8ca0316e26
commit
5918a3ed4c
|
@ -223,6 +223,7 @@
|
|||
<Compile Include="generator\base.cs" />
|
||||
<Compile Include="generator\card.cs" />
|
||||
<Compile Include="generator\fossil.cs" />
|
||||
<Compile Include="generator\scarab.cs" />
|
||||
<Compile Include="generator\tier.cs" />
|
||||
<Compile Include="generator\weapon.cs" />
|
||||
<Compile Include="generator_classes.cs" />
|
||||
|
|
|
@ -54,7 +54,12 @@ namespace PoE_MxFilterGen.compiler
|
|||
|
||||
//DoSplash(filter, section);
|
||||
|
||||
foreach (Block bl in JsonConvert.DeserializeObject<RootBlocks>(File.ReadAllText($"filson/{section}.json", Encoding.UTF8)).blocks)
|
||||
string filson = $"filson/{section}.json";
|
||||
if (main.profile)
|
||||
{
|
||||
filson = $"profiles/{main.profilename}/filson/{section}.json";
|
||||
}
|
||||
foreach (Block bl in JsonConvert.DeserializeObject<RootBlocks>(File.ReadAllText(filson, Encoding.UTF8)).blocks)
|
||||
{
|
||||
string type = filter;
|
||||
string blocktype = bl.Type;
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
internal class scarab
|
||||
{
|
||||
private static string iBbasic;
|
||||
private static string iB5c;
|
||||
private static string iB10c;
|
||||
private static string iB100c;
|
||||
private static string iBhigh;
|
||||
|
||||
public static void Gen(string section)
|
||||
{
|
||||
List<string> stringList = new List<string>();
|
||||
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.scarab.json", Encoding.UTF8)).lines)
|
||||
{
|
||||
int chaosValue = Convert.ToInt32(line.chaosValue);
|
||||
if (chaosValue <= 1.0)
|
||||
{
|
||||
stringList.Add(line.name);
|
||||
scarab.iBbasic += string.Format(@" ""{0}""", line.name);
|
||||
}
|
||||
if (chaosValue <= 5.0 && chaosValue > 1.0)
|
||||
{
|
||||
stringList.Add(line.name);
|
||||
scarab.iB5c += string.Format(@" ""{0}""", line.name);
|
||||
}
|
||||
if (chaosValue <= 10.0 && chaosValue > 5.0)
|
||||
{
|
||||
stringList.Add(line.name);
|
||||
scarab.iB10c += string.Format(@" ""{0}""", line.name);
|
||||
}
|
||||
if (chaosValue <= 100.0 && chaosValue > 10.0)
|
||||
{
|
||||
stringList.Add(line.name);
|
||||
scarab.iB100c += string.Format(@" ""{0}""", line.name);
|
||||
}
|
||||
if (chaosValue > 100.0)
|
||||
{
|
||||
stringList.Add(line.name);
|
||||
scarab.iBhigh += string.Format(@" ""{0}""", line.name);
|
||||
}
|
||||
}
|
||||
string path = "gen/" + section + ".filter";
|
||||
if (scarab.iBbasic == null)
|
||||
scarab.iBbasic = "\"\"";
|
||||
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
|
||||
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " BaseType" + scarab.iBbasic + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetFontSize 25" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
if (scarab.iB5c == null)
|
||||
scarab.iB5c = "\"\"";
|
||||
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
|
||||
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " BaseType" + scarab.iB5c + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetFontSize 30" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
if (scarab.iB10c == null)
|
||||
scarab.iB10c = "\"\"";
|
||||
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
|
||||
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " BaseType" + scarab.iB10c + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
if (scarab.iB100c == null)
|
||||
scarab.iB100c = "\"\"";
|
||||
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
|
||||
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " BaseType" + scarab.iB100c + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
if (scarab.iBhigh == null)
|
||||
scarab.iBhigh = "\"\"";
|
||||
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
|
||||
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " BaseType" + scarab.iBhigh + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " SetFontSize 42" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
|
||||
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -127,7 +127,11 @@ namespace PoE_MxFilterGen.generator
|
|||
"Shagreen Gloves",
|
||||
"Sharkskin Gloves",
|
||||
"Enameled Buckler",
|
||||
"Corsair Sword"
|
||||
"Corsair Sword",
|
||||
"Slink Boots",
|
||||
"Stealth Boots",
|
||||
"Slink Gloves",
|
||||
"Wolf Pelt"
|
||||
|
||||
};
|
||||
return Dex;
|
||||
|
|
|
@ -11,7 +11,9 @@ namespace PoE_MxFilterGen.json
|
|||
{
|
||||
public class SETTINGS
|
||||
{
|
||||
public string version { get; set; }
|
||||
public string league { get; set; }
|
||||
public string profile { get; set; }
|
||||
public List<string> Structures { get; set; }
|
||||
public int tierValue { get; set; }
|
||||
public bool tier1HAxe { get; set; }
|
||||
|
@ -51,179 +53,193 @@ namespace PoE_MxFilterGen.json
|
|||
|
||||
class settings
|
||||
{
|
||||
internal static string GetVersion()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.version;
|
||||
}
|
||||
internal static string GetLeague()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.league;
|
||||
}
|
||||
|
||||
internal static string GetProfile()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.league;
|
||||
}
|
||||
|
||||
public static int GetTierValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierValue;
|
||||
}
|
||||
|
||||
public static int GetUniqueValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.uniqueValue;
|
||||
}
|
||||
|
||||
public static int GetFossilValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.fossilValue;
|
||||
}
|
||||
|
||||
public static int GetCardValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.cardValue;
|
||||
}
|
||||
|
||||
internal static bool GetTier1HAxe()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier1HAxe;
|
||||
}
|
||||
|
||||
internal static bool GetTier2HAxe()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier2HAxe;
|
||||
}
|
||||
|
||||
internal static bool GetTierBow()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierBow;
|
||||
}
|
||||
|
||||
internal static bool GetTierClaw()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierClaw;
|
||||
}
|
||||
|
||||
internal static bool GetTierDagger()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierDagger;
|
||||
}
|
||||
|
||||
internal static bool GetTier1HMace()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier1HMace;
|
||||
}
|
||||
|
||||
internal static bool GetTier2HMace()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier2HMace;
|
||||
}
|
||||
|
||||
internal static bool GetTierSceptre()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierSceptre;
|
||||
}
|
||||
|
||||
internal static bool GetTierStaff()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierStaff;
|
||||
}
|
||||
|
||||
internal static bool GetTier1HSword()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier1HSword;
|
||||
}
|
||||
|
||||
internal static bool GetTier2HSword()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tier2HSword;
|
||||
}
|
||||
|
||||
internal static bool GetTierWand()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierWand;
|
||||
}
|
||||
|
||||
internal static bool GetTierBody()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierBody;
|
||||
}
|
||||
|
||||
internal static bool GetTierBoots()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierBoots;
|
||||
}
|
||||
|
||||
internal static bool GetTierGloves()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierGloves;
|
||||
}
|
||||
|
||||
internal static bool GetTierHelmet()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierHelmet;
|
||||
}
|
||||
|
||||
internal static bool GetTierShield()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierShield;
|
||||
}
|
||||
|
||||
internal static bool GetTierQuiver()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierQuiver;
|
||||
}
|
||||
|
||||
internal static bool GetInstall()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.install;
|
||||
}
|
||||
|
||||
internal static string GetPath()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.path;
|
||||
}
|
||||
|
||||
internal static List<string> GetTierBaseInclude()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierBaseInclude;
|
||||
}
|
||||
|
||||
internal static List<string> GetTierBaseExclude()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.tierBaseExclude;
|
||||
}
|
||||
|
||||
internal static List<string> GetStructure()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
return j.Structures;
|
||||
}
|
||||
|
||||
public static void WriteSection(string structure)
|
||||
{
|
||||
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($@"settings.json"));
|
||||
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
|
||||
SETTINGS se = new SETTINGS
|
||||
{
|
||||
version = js.version,
|
||||
league = js.league,
|
||||
profile = js.profile,
|
||||
tierValue = js.tierValue,
|
||||
tier1HAxe = js.tier1HAxe,
|
||||
tier2HAxe = js.tier2HAxe,
|
||||
|
@ -260,7 +276,7 @@ namespace PoE_MxFilterGen.json
|
|||
Operators = js.Operators
|
||||
};
|
||||
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
|
||||
File.WriteAllText($@"settings.json", raw);
|
||||
File.WriteAllText($"profiles/{main.profilename}/{main.profilename}.json", raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace PoE_MxFilterGen
|
|||
internal class main
|
||||
{
|
||||
private static DateTime dt = DateTime.Now;
|
||||
public static string version = "11.1.0";
|
||||
public static string version = "11.2.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";
|
||||
|
@ -26,6 +26,8 @@ namespace PoE_MxFilterGen
|
|||
public static bool debug = false;
|
||||
public static bool install;
|
||||
public static bool compile = false;
|
||||
public static bool profile = false;
|
||||
public static string profilename = "";
|
||||
public static string ipath;
|
||||
public static string docpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
|
||||
|
@ -33,10 +35,19 @@ namespace PoE_MxFilterGen
|
|||
{
|
||||
if (args.Count() >= 1)
|
||||
{
|
||||
if (args[0].Contains("--compile"))
|
||||
if (args.Contains("--compile"))
|
||||
{
|
||||
compile = true;
|
||||
}
|
||||
if (args.Contains("--profile"))
|
||||
{
|
||||
profile = true;
|
||||
int proin = Array.IndexOf(args, "--profile");
|
||||
profilename = args[proin + 1];
|
||||
} else
|
||||
{
|
||||
profilename = "Default";
|
||||
}
|
||||
}
|
||||
if (!Directory.Exists("data"))
|
||||
{
|
||||
|
@ -71,6 +82,7 @@ namespace PoE_MxFilterGen
|
|||
msg.CMW("Cleaning the base dirs...", true, 1);
|
||||
main.CleanDirData();
|
||||
msg.CMW("Cleaning the last filter from path...", true, 1);
|
||||
msg.CMW($"Using Profile: {profile.ToString()} ({profilename})", true, 1);
|
||||
foreach (string filter in structures.Filters()) {
|
||||
if (File.Exists("out/MxFilter_" + filter + ".filter"))
|
||||
{
|
||||
|
@ -84,6 +96,7 @@ namespace PoE_MxFilterGen
|
|||
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=DivinationCard&language=en", "data/ninja.card.json");
|
||||
web.SaveString(main.api + "currencyoverview?league=" + main.league + "&type=Currency&language=en", "data/ninja.currency.json");
|
||||
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=Fossil&language=en", "data/ninja.fossil.json");
|
||||
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=Scarab&language=en", "data/ninja.scarab.json");
|
||||
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=BaseType&language=en", "data/ninja.base.json");
|
||||
foreach (string filter in structures.Filters())
|
||||
{
|
||||
|
@ -93,7 +106,7 @@ namespace PoE_MxFilterGen
|
|||
var fout = Directory.GetFiles($@"out\{filter}");
|
||||
foreach (var f in fout)
|
||||
{
|
||||
File.Delete(f);
|
||||
File.Delete(f);
|
||||
}
|
||||
}
|
||||
string str = "MxFilter";
|
||||
|
@ -154,6 +167,9 @@ namespace PoE_MxFilterGen
|
|||
case "FOSSIL(GEN)":
|
||||
fossil.Gen(section, fossilValue);
|
||||
break;
|
||||
case "SCARAB(GEN)":
|
||||
scarab.Gen(section);
|
||||
break;
|
||||
case "Tiers(GEN)":
|
||||
tier.Gen(section, tierValue, tier1HAxe, tier2HAxe, tierBow, tierClaw, tierDagger, tier1HMace, tier2HMace, tierSceptre, tierStaff, tier1HSword, tier2HSword, tierWand, tierBody, tierBoots, tierGloves, tierHelmet, tierShield, tierQuiver, tierBaseInclude, tierBaseExclude);
|
||||
break;
|
||||
|
@ -203,6 +219,10 @@ namespace PoE_MxFilterGen
|
|||
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
break;
|
||||
case "SCARAB(GEN)":
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
break;
|
||||
case "Tiers(GEN)":
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
|
|
Binary file not shown.
|
@ -52,14 +52,12 @@ I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
|
|||
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.AssemblyReference.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.SuggestedBindingRedirects.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\System.Diagnostics.DiagnosticSource.xml
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.Fody.CopyLocal.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
||||
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
|
||||
|
@ -74,3 +72,4 @@ D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
|||
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
|
||||
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
|
||||
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFi.17C09766.Up2Date
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue