forked from XIV-Tools/CustomizePlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SkeletonFile.cs
55 lines (43 loc) · 1.02 KB
/
SkeletonFile.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
// © Anamnesis.
// Developed by W and A Walsh.
// Licensed under the MIT license.
namespace Anamnesis.Posing.Templates
{
using System.Collections.Generic;
using Anamnesis.Memory;
public class SkeletonFile
{
public int Depth = 0;
public Appearance.Races? Race { get; set; }
public Appearance.Ages? Age { get; set; }
public string? BasedOn { get; set; }
public Dictionary<string, string>? BoneNames { get; set; }
public bool IsValid(Appearance customize)
{
if (this.Race != null)
{
if (customize.Race != this.Race)
{
return false;
}
}
return true;
}
public void CopyBaseValues(SkeletonFile from)
{
this.Depth = from.Depth + 1;
if (this.Age == null)
this.Age = from.Age;
if (from.BoneNames == null)
return;
if (this.BoneNames == null)
this.BoneNames = new Dictionary<string, string>();
foreach ((string key, string name) in from.BoneNames)
{
if (this.BoneNames.ContainsKey(key))
continue;
this.BoneNames.Add(key, name);
}
}
}
}