Skip to content

Commit

Permalink
Add Lumina Compatibility project
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenari committed Oct 26, 2024
1 parent f540365 commit 52ca34b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions XIVCalc.Lumina/LuminaJobModifiers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Lumina.Excel.GeneratedSheets;
using XIVCalc.Interfaces;

namespace XIVCalc.Lumina;

public class LuminaJobModifiers(ClassJob source) : IJobModifiers
{
public Job Job => (Job)source.RowId;
public int ModifierHitPoints => source.ModifierHitPoints;
public int ModifierManaPoints => source.ModifierManaPoints;
public int ModifierStrength => source.ModifierStrength;
public int ModifierVitality => source.ModifierVitality;
public int ModifierDexterity => source.ModifierDexterity;
public int ModifierIntelligence => source.ModifierIntelligence;
public int ModifierMind => source.ModifierMind;
public int ModifierPiety => source.ModifierMind;
public bool IsTank => Job.IsTank();
public StatType PrimaryStat => (StatType)source.PrimaryStat;
public bool IsCaster => Job.IsCaster();

public static implicit operator LuminaJobModifiers(ClassJob job) => new(job);
}
16 changes: 16 additions & 0 deletions XIVCalc.Lumina/XIVCalc.Lumina.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lumina.Excel" Version="7.0.0">
<PrivateAssets>contentfiles;analyzers;build;runtime</PrivateAssets>
</PackageReference>
<PackageReference Include="XIVCalc" Version="0.3.0-alpha2" />
</ItemGroup>

</Project>
6 changes: 6 additions & 0 deletions XIVCalc.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XIVCalc", "XIVCalc\XIVCalc.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XIVCalc.Tests", "XIVCalc.Tests\XIVCalc.Tests.csproj", "{576C4195-146C-4058-B5E4-3A1F1FD04D24}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XIVCalc.Lumina", "XIVCalc.Lumina\XIVCalc.Lumina.csproj", "{253C77E3-F143-4F04-997D-68BC55C0805C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{576C4195-146C-4058-B5E4-3A1F1FD04D24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{576C4195-146C-4058-B5E4-3A1F1FD04D24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{576C4195-146C-4058-B5E4-3A1F1FD04D24}.Release|Any CPU.Build.0 = Release|Any CPU
{253C77E3-F143-4F04-997D-68BC55C0805C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{253C77E3-F143-4F04-997D-68BC55C0805C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{253C77E3-F143-4F04-997D-68BC55C0805C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{253C77E3-F143-4F04-997D-68BC55C0805C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 52ca34b

Please sign in to comment.