Fossil Gen
This commit is contained in:
parent
61d55362a6
commit
f1c142af76
|
@ -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>{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FOSSIL__GEN_</RootNamespace>
|
||||
<AssemblyName>FOSSIL %28GEN%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</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=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -0,0 +1,71 @@
|
|||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FOSSIL__GEN_
|
||||
{
|
||||
public class RootFossil
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string category { get; set; }
|
||||
public string group { get; set; }
|
||||
public int frame { get; set; }
|
||||
public List<object> influences { get; set; }
|
||||
public int stackSize { get; set; }
|
||||
public string icon { get; set; }
|
||||
public double mean { get; set; }
|
||||
public double median { get; set; }
|
||||
public double mode { get; set; }
|
||||
public double min { get; set; }
|
||||
public double max { get; set; }
|
||||
public double exalted { get; set; }
|
||||
public int total { get; set; }
|
||||
public int daily { get; set; }
|
||||
public int current { get; set; }
|
||||
public int accepted { get; set; }
|
||||
public double change { get; set; }
|
||||
public List<object> history { get; set; }
|
||||
public string type { get; set; }
|
||||
}
|
||||
|
||||
public class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue)
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
|
||||
var RootFossil = JsonConvert.DeserializeObject<List<RootFossil>>(File.ReadAllText("data/poew.currency.json", Encoding.UTF8));
|
||||
|
||||
foreach (var ln in RootFossil)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.min >= 10 && ln.group == "fossil")
|
||||
{
|
||||
if (!itemBase.Contains(ln.name))
|
||||
{
|
||||
itemBase.Add(ln.name);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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, @" Class ""Stackable Currency""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_fossil.mp3""", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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("FOSSIL (GEN)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FOSSIL (GEN)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[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("ce0e31e0-be67-4cdb-8873-b959edad733c")]
|
||||
|
||||
// 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")]
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
|
||||
</packages>
|
|
@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXPENSIVE UNIQUE (GEN) (Acc
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tiers (DATA)", "Tiers (DATA)\Tiers (DATA).csproj", "{428B5A68-922A-4651-88FC-A6C194C10BD8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FOSSIL (GEN)", "FOSSIL (GEN)\FOSSIL (GEN).csproj", "{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -39,6 +41,10 @@ Global
|
|||
{428B5A68-922A-4651-88FC-A6C194C10BD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{428B5A68-922A-4651-88FC-A6C194C10BD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{428B5A68-922A-4651-88FC-A6C194C10BD8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CE0E31E0-BE67-4CDB-8873-B959EDAD733C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Loading…
Reference in New Issue