mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Move Enums to GameData.
This commit is contained in:
parent
fce9ec5659
commit
4cfd7f56c0
24 changed files with 40 additions and 49 deletions
43
Penumbra.GameData/Enums/BodySlot.cs
Normal file
43
Penumbra.GameData/Enums/BodySlot.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Penumbra.GameData.Enums
|
||||
{
|
||||
public enum BodySlot : byte
|
||||
{
|
||||
Unknown,
|
||||
Hair,
|
||||
Face,
|
||||
Tail,
|
||||
Body,
|
||||
Zear,
|
||||
}
|
||||
|
||||
public static class BodySlotEnumExtension
|
||||
{
|
||||
public static string ToSuffix( this BodySlot value )
|
||||
{
|
||||
return value switch
|
||||
{
|
||||
BodySlot.Zear => "zear",
|
||||
BodySlot.Face => "face",
|
||||
BodySlot.Hair => "hair",
|
||||
BodySlot.Body => "body",
|
||||
BodySlot.Tail => "tail",
|
||||
_ => throw new InvalidEnumArgumentException(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static partial class GameData
|
||||
{
|
||||
public static readonly Dictionary< string, BodySlot > StringToBodySlot = new()
|
||||
{
|
||||
{ BodySlot.Zear.ToSuffix(), BodySlot.Zear },
|
||||
{ BodySlot.Face.ToSuffix(), BodySlot.Face },
|
||||
{ BodySlot.Hair.ToSuffix(), BodySlot.Hair },
|
||||
{ BodySlot.Body.ToSuffix(), BodySlot.Body },
|
||||
{ BodySlot.Tail.ToSuffix(), BodySlot.Tail },
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue