-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBodySlot.cs
35 lines (31 loc) · 937 Bytes
/
BodySlot.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.ComponentModel;
namespace PathMapper;
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 Names {
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 },
};
}