-
Notifications
You must be signed in to change notification settings - Fork 2
/
CustomizationType.cs
59 lines (56 loc) · 2.23 KB
/
CustomizationType.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System.ComponentModel;
namespace PathMapper {
public enum CustomizationType : byte {
Unknown,
Helmet,
Body,
Legs,
Gloves,
Shoes,
Tail,
Face,
Iris,
Accessory,
Hair,
Zear,
DecalFace,
DecalEquip,
Skin,
Etc,
}
public static class CustomizationTypeEnumExtension {
public static string ToSuffix(this CustomizationType value) {
return value switch {
CustomizationType.Helmet => "met",
CustomizationType.Body => "top",
CustomizationType.Legs => "dwn",
CustomizationType.Gloves => "glv",
CustomizationType.Shoes => "sho",
CustomizationType.Face => "fac",
CustomizationType.Iris => "iri",
CustomizationType.Accessory => "acc",
CustomizationType.Hair => "hir",
CustomizationType.Tail => "til",
CustomizationType.Zear => "zer",
CustomizationType.Etc => "etc",
_ => throw new InvalidEnumArgumentException(),
};
}
}
public static partial class Names {
public static readonly Dictionary<string, CustomizationType> SuffixToCustomizationType = new() {
{ CustomizationType.Helmet.ToSuffix(), CustomizationType.Helmet },
{ CustomizationType.Body.ToSuffix(), CustomizationType.Body },
{ CustomizationType.Legs.ToSuffix(), CustomizationType.Legs },
{ CustomizationType.Gloves.ToSuffix(), CustomizationType.Gloves },
{ CustomizationType.Shoes.ToSuffix(), CustomizationType.Shoes },
{ CustomizationType.Face.ToSuffix(), CustomizationType.Face },
{ CustomizationType.Iris.ToSuffix(), CustomizationType.Iris },
{ CustomizationType.Accessory.ToSuffix(), CustomizationType.Accessory },
{ CustomizationType.Hair.ToSuffix(), CustomizationType.Hair },
{ CustomizationType.Tail.ToSuffix(), CustomizationType.Tail },
{ CustomizationType.Zear.ToSuffix(), CustomizationType.Zear },
{ CustomizationType.Etc.ToSuffix(), CustomizationType.Etc },
};
}
}