Skip to content

Commit

Permalink
version bump, add extension method to get icons
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAdam committed Sep 9, 2020
1 parent 697e0a3 commit dd5878e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/Lumina/Extensions/LuminaExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Lumina.Data.Files;

namespace Lumina.Extensions
{
public static class LuminaExtensions
{
public static TexFile GetIcon( this Lumina lumina, int iconId )
{
var path = $"ui/icon/{iconId / 1000 * 1000:000000}/{iconId:000000}.tex";

return lumina.GetFile< TexFile >( path );
}
}
}
16 changes: 8 additions & 8 deletions src/Lumina/Lumina.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<LangVersion>latestmajor</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>NotAdam</Authors>
<PackageProjectUrl>https://github.com/NotAdam/Lumina</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<RepositoryUrl>https://github.com/NotAdam/Lumina</RepositoryUrl>
<PackageVersion>2.2.0</PackageVersion>
<FileVersion>2.2.0</FileVersion>
<PackageVersion>2.3.0</PackageVersion>
<FileVersion>2.3.0</FileVersion>
<Description>Lumina is a small, performant and simple library for interacting with FINAL FANTASY XIV game data.</Description>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
<None Include="../../LICENSE" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Memory" Version="4.5.3"/>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0"/>
<PackageReference Include="IndexRange" Version="1.0.0"/>
<PackageReference Include="System.Memory" Version="4.5.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="IndexRange" Version="1.0.0" />
</ItemGroup>

<PropertyGroup>
Expand All @@ -31,7 +31,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

</Project>

0 comments on commit dd5878e

Please sign in to comment.