Документирование и небольшой рефакторинг модели.
This commit is contained in:
+3
-3
@@ -18,11 +18,11 @@ public static class AonprdEnumResolver
|
||||
{ "Society", SourceCategory.Society },
|
||||
}
|
||||
),
|
||||
new Solver<AncestryVision>(
|
||||
new Solver<VisionEnum>(
|
||||
new()
|
||||
{
|
||||
{ "Low-Light Vision", AncestryVision.LowLightVision },
|
||||
{ "Darkvision", AncestryVision.DarkVision },
|
||||
{ "Low-Light VisionEnum", VisionEnum.LowLightVision },
|
||||
{ "Darkvision", VisionEnum.DarkVision },
|
||||
}
|
||||
),
|
||||
new Solver<AttributeValues>(
|
||||
|
||||
+2
-2
@@ -26,7 +26,7 @@ internal class AncestryProcessor(AonprdProcessorInput input) : AbstractEntityPro
|
||||
|
||||
Object.Size = Input
|
||||
.GetRequired<JArray>("size")
|
||||
.Select(t => Input.Enum<Size>(t.ToString()))
|
||||
.Select(t => Input.Enum<SizeEnum>(t.ToString()))
|
||||
.ToArray();
|
||||
|
||||
string hp = Input.GetRequired<string>("hp_raw");
|
||||
@@ -34,7 +34,7 @@ internal class AncestryProcessor(AonprdProcessorInput input) : AbstractEntityPro
|
||||
|
||||
Object.Speed = Convert.ToInt32(Input.GetOptional<int>("speed.land"));
|
||||
|
||||
Object.Vision = Input.EnumOptional("vision", AncestryVision.Normal);
|
||||
Object.VisionEnum = Input.EnumOptional("vision", VisionEnum.Normal);
|
||||
|
||||
AddBoosts("attribute", true);
|
||||
AddBoosts("attribute_flaw", false);
|
||||
|
||||
+3
-3
@@ -21,8 +21,8 @@ internal class FeatProcessor(AonprdProcessorInput input) : AbstractEntityProcess
|
||||
Object.Level = Input.GetRequired<int>("level");
|
||||
|
||||
Object.Category = Entity.Traits.Any(t => t.Type == TraitType.Class)
|
||||
? ActionCategory.ClassFeat
|
||||
: ActionCategory.Unknown;
|
||||
? FeatCategory.Class
|
||||
: FeatCategory.Uncategorized;
|
||||
|
||||
AonprdProcessorInput.ActionStruct action = Input.ResolveActionString(
|
||||
Input.GetOptional<string>("actions") ?? ""
|
||||
@@ -54,7 +54,7 @@ internal class FeatProcessor(AonprdProcessorInput input) : AbstractEntityProcess
|
||||
|
||||
if (archetypes.Length != 0)
|
||||
{
|
||||
Object.Category = ActionCategory.Archetype;
|
||||
Object.Category = FeatCategory.Archetype;
|
||||
}
|
||||
|
||||
foreach (Archetype archetype in archetypes)
|
||||
|
||||
Reference in New Issue
Block a user