Sound Tweaks
This commit is contained in:
95
Tiers (DATA)/Generator.cs
Normal file
95
Tiers (DATA)/Generator.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tiers__DATA_
|
||||
{
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public class SETTINGS
|
||||
{
|
||||
public string git { get; set; }
|
||||
public string api { get; set; }
|
||||
public string league { get; set; }
|
||||
public int confidence { get; set; }
|
||||
public int minimumValue { get; set; }
|
||||
public int chancingMinValue { get; set; }
|
||||
public bool verbose { get; set; }
|
||||
public bool strict { get; set; }
|
||||
public string section { get; set; }
|
||||
}
|
||||
|
||||
public class DATA
|
||||
{
|
||||
public string tiers { get; set; }
|
||||
}
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
string giturl = settings.GetGIT();
|
||||
var js = Web.ReadString($@"{giturl}/PoE-MxFilter-Structure/master/Tiers.txt");
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = @"gen\" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Tiers (DATA)/Properties/AssemblyInfo.cs
Normal file
36
Tiers (DATA)/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("Tiers (DATA)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Tiers (DATA)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("428b5a68-922a-4651-88fc-a6c194c10bd8")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
80
Tiers (DATA)/Settings.cs
Normal file
80
Tiers (DATA)/Settings.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tiers__DATA_
|
||||
{
|
||||
public class SETTINGS
|
||||
{
|
||||
public string git { get; set; }
|
||||
public string api { get; set; }
|
||||
public string league { get; set; }
|
||||
public int confidence { get; set; }
|
||||
public int minimumValue { get; set; }
|
||||
public int chancingMinValue { get; set; }
|
||||
public bool verbose { get; set; }
|
||||
public bool strict { get; set; }
|
||||
public string section { get; set; }
|
||||
}
|
||||
|
||||
class settings
|
||||
{
|
||||
public static string GetGIT()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.git;
|
||||
}
|
||||
|
||||
public static string GetAPI()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.api;
|
||||
}
|
||||
|
||||
public static string GetLeague()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.league;
|
||||
}
|
||||
|
||||
public static int GetConfidence()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.confidence;
|
||||
}
|
||||
|
||||
public static int GetMinimumValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.minimumValue;
|
||||
}
|
||||
|
||||
public static int GetChancingMinValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.chancingMinValue;
|
||||
}
|
||||
|
||||
public static bool GetVerbose()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.verbose;
|
||||
}
|
||||
|
||||
public static string GetSection()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.section;
|
||||
}
|
||||
|
||||
public static bool GetStrict()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.strict;
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Tiers (DATA)/Tiers (DATA).csproj
Normal file
55
Tiers (DATA)/Tiers (DATA).csproj
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{428B5A68-922A-4651-88FC-A6C194C10BD8}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Tiers__DATA_</RootNamespace>
|
||||
<AssemblyName>Tiers %28DATA%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<Compile Include="Web.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
83
Tiers (DATA)/Web.cs
Normal file
83
Tiers (DATA)/Web.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tiers__DATA_
|
||||
{
|
||||
class Web
|
||||
{
|
||||
public static void SaveString(string url, string path)
|
||||
{
|
||||
WebClient wb = new WebClient();
|
||||
wb.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
var str = wb.DownloadString(uri);
|
||||
File.AppendAllText(path, str, Encoding.UTF8);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadString(string url)
|
||||
{
|
||||
WebClient wb = new WebClient();
|
||||
wb.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
var str = "";
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
str = wb.DownloadString(uri);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
public static void DownloadFile(string url, string path)
|
||||
{
|
||||
WebClient wb = new WebClient();
|
||||
wb.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
var str = "";
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
wb.DownloadFile(uri, path);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
4
Tiers (DATA)/packages.config
Normal file
4
Tiers (DATA)/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user