From 94c9ce12644c2331994c4456170f0d8766dc2e93 Mon Sep 17 00:00:00 2001 From: kozhilya Date: Mon, 6 Oct 2025 17:12:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=81=D1=83=D1=89=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=B2=20FullEntity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pf2e/Common/FullEntity.cs | 43 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/Pf2e/Common/FullEntity.cs b/Pf2e/Common/FullEntity.cs index 1b6f098..8136b31 100644 --- a/Pf2e/Common/FullEntity.cs +++ b/Pf2e/Common/FullEntity.cs @@ -4,6 +4,7 @@ using Pf2e.Database.Model; using Pf2e.Database.Model.Base; using Pf2e.Database.Model.Enum; using Pf2e.Database.Model.Structure; +using Action = Pf2e.Database.Model.Structure.Action; namespace Pf2e.Common; @@ -89,6 +90,7 @@ public class FullEntity /// private readonly ICollection _getters = [ + new Getter(EntityType.Action, context => context.Actions), new Getter( EntityType.Ancestry, context => context.Ancestries.Include(a => a.AncestryBoosts) @@ -121,15 +123,41 @@ public class FullEntity .Include(c => c.ClassProgressions) .Include(c => c.SubclassGroups) ), + new Getter(EntityType.Condition, context => context.Conditions), + new Getter( + EntityType.Deity, + context => + context + .Deities.Include(d => d.DeityAttributes) + .Include(d => d.DeityDomains) + .ThenInclude(dd => dd.Domain) + .Include(d => d.DeitySpells) + .ThenInclude(ds => ds.Spell) + .Include(d => d.DeityWeapons) + .ThenInclude(dw => dw.Weapon) + .Include(d => d.CategoryEntity) + .Include(d => d.Skills) + ), + new Getter(EntityType.DeityCategory, context => context.DeityCategories), + new Getter( + EntityType.Domain, + context => + context + .Domains.Include(d => d.DomainSpell) + .Include(d => d.AdvancedDomainSpell) + .Include(d => d.ApocryphalSpell) + .Include(d => d.AdvancedApocryphalSpell) + ), new Getter( EntityType.Feat, context => context.Feats.Include(f => f.Archetypes).ThenInclude(a => a.Entity).AsQueryable() ), - new Getter( - EntityType.Spell, - context => context.Spells.Include(s => s.SpellAreas).Include(s => s.SpellDefenses) + new Getter( + EntityType.Heritage, + context => context.Heritages.Include(h => h.Ancestry) ), + new Getter(EntityType.Language, context => context.Languages), new Getter( EntityType.Ritual, context => @@ -139,6 +167,14 @@ public class FullEntity .ThenInclude(c => c.Training) .AsQueryable() ), + new Getter( + EntityType.Rule, + context => context.Rules.Include(r => r.Parent).Include(r => r.Children) + ), + new Getter( + EntityType.Spell, + context => context.Spells.Include(s => s.SpellAreas).Include(s => s.SpellDefenses) + ), new Getter( EntityType.Subclass, context => @@ -147,6 +183,7 @@ public class FullEntity .ThenInclude(t => t.Training) .Include(s => s.Entities) ), + new Getter(EntityType.Trait, context => context.Traits), ]; ///