diff --git a/Mutagen.Bethesda.Starfield/Documentation/AspectInterfaceDocumentation_Generated.md b/Mutagen.Bethesda.Starfield/Documentation/AspectInterfaceDocumentation_Generated.md
index 989936fa65..6cdc5ef5aa 100644
--- a/Mutagen.Bethesda.Starfield/Documentation/AspectInterfaceDocumentation_Generated.md
+++ b/Mutagen.Bethesda.Starfield/Documentation/AspectInterfaceDocumentation_Generated.md
@@ -7,6 +7,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- Activator
- Armor
- Book
+- Container
- LeveledItem
- MagicEffect
- MiscItem
@@ -20,6 +21,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- Activator
- Armor
- Book
+- Container
- KeywordFormComponent
- MagicEffect
- MiscItem
@@ -37,6 +39,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- AnimatedObject
- BodyData
- Book
+- Container
- DestructionStage
- HeadPart
- LegendaryItem
@@ -55,6 +58,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- BipedObjectData
- Book
- Class
+- Container
- DamageType
- FaceMorphPhenotype
- FaceMorphPhenotypeItem
@@ -103,6 +107,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- AudioOcclusionPrimitive
- BendableSpline
- Book
+- Container
- LegendaryItem
- LeveledItem
- MiscItem
@@ -121,6 +126,7 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- Activator
- Armor
- Book
+- Container
- LeveledItem
- MagicEffect
- MiscItem
@@ -167,6 +173,13 @@ Functions can then be written that take in `INamed`, allowing any record that ha
- IWeightValue
### Class
- INamed
+### Container
+- IHaveVirtualMachineAdapter
+- IKeyworded
+- IModeled
+- INamed
+- IObjectBounded
+- IScripted
### DamageType
- INamed
### DestructionStage
diff --git a/Mutagen.Bethesda.Starfield/Interfaces/Aspect/AspectInterfaceMapping_Generated.cs b/Mutagen.Bethesda.Starfield/Interfaces/Aspect/AspectInterfaceMapping_Generated.cs
index 069a9826e3..a12bddd85f 100644
--- a/Mutagen.Bethesda.Starfield/Interfaces/Aspect/AspectInterfaceMapping_Generated.cs
+++ b/Mutagen.Bethesda.Starfield/Interfaces/Aspect/AspectInterfaceMapping_Generated.cs
@@ -25,6 +25,7 @@ public StarfieldAspectInterfaceMapping()
Activator_Registration.Instance,
Armor_Registration.Instance,
Book_Registration.Instance,
+ Container_Registration.Instance,
LeveledItem_Registration.Instance,
MagicEffect_Registration.Instance,
MiscItem_Registration.Instance,
@@ -43,6 +44,7 @@ public StarfieldAspectInterfaceMapping()
Activator_Registration.Instance,
Armor_Registration.Instance,
Book_Registration.Instance,
+ Container_Registration.Instance,
KeywordFormComponent_Registration.Instance,
MagicEffect_Registration.Instance,
MiscItem_Registration.Instance,
@@ -63,6 +65,7 @@ public StarfieldAspectInterfaceMapping()
AnimatedObject_Registration.Instance,
BodyData_Registration.Instance,
Book_Registration.Instance,
+ Container_Registration.Instance,
DestructionStage_Registration.Instance,
HeadPart_Registration.Instance,
LegendaryItem_Registration.Instance,
@@ -82,6 +85,7 @@ public StarfieldAspectInterfaceMapping()
Armor_Registration.Instance,
Book_Registration.Instance,
Class_Registration.Instance,
+ Container_Registration.Instance,
DamageType_Registration.Instance,
FaceMorphPhenotype_Registration.Instance,
FaceMorphPhenotypeItem_Registration.Instance,
@@ -118,6 +122,7 @@ public StarfieldAspectInterfaceMapping()
BipedObjectData_Registration.Instance,
Book_Registration.Instance,
Class_Registration.Instance,
+ Container_Registration.Instance,
DamageType_Registration.Instance,
FaceMorphPhenotype_Registration.Instance,
FaceMorphPhenotypeItem_Registration.Instance,
@@ -168,6 +173,7 @@ public StarfieldAspectInterfaceMapping()
Armor_Registration.Instance,
Book_Registration.Instance,
Class_Registration.Instance,
+ Container_Registration.Instance,
DamageType_Registration.Instance,
FaceMorphPhenotype_Registration.Instance,
FaceMorphPhenotypeItem_Registration.Instance,
@@ -197,6 +203,7 @@ public StarfieldAspectInterfaceMapping()
Armor_Registration.Instance,
Book_Registration.Instance,
Class_Registration.Instance,
+ Container_Registration.Instance,
DamageType_Registration.Instance,
FaceMorphPhenotype_Registration.Instance,
FaceMorphPhenotypeItem_Registration.Instance,
@@ -226,6 +233,7 @@ public StarfieldAspectInterfaceMapping()
Armor_Registration.Instance,
AudioOcclusionPrimitive_Registration.Instance,
Book_Registration.Instance,
+ Container_Registration.Instance,
LeveledItem_Registration.Instance,
MiscItem_Registration.Instance,
ObjectEffect_Registration.Instance,
@@ -255,6 +263,7 @@ public StarfieldAspectInterfaceMapping()
Activator_Registration.Instance,
Armor_Registration.Instance,
Book_Registration.Instance,
+ Container_Registration.Instance,
LeveledItem_Registration.Instance,
MagicEffect_Registration.Instance,
MiscItem_Registration.Instance,
diff --git a/Mutagen.Bethesda.Starfield/Mutagen.Bethesda.Starfield.csproj b/Mutagen.Bethesda.Starfield/Mutagen.Bethesda.Starfield.csproj
index 1358652ce0..11d6c390cf 100644
--- a/Mutagen.Bethesda.Starfield/Mutagen.Bethesda.Starfield.csproj
+++ b/Mutagen.Bethesda.Starfield/Mutagen.Bethesda.Starfield.csproj
@@ -2050,6 +2050,9 @@
ConstructibleObject.xml
+
+ Container.xml
+
Quest.xml
@@ -5349,9 +5352,6 @@
MorphableObject.xml
-
- Armor.xml
-
Book.xml
@@ -5367,5 +5367,14 @@
Book.xml
+
+ Armor.xml
+
+
+ Component.xml
+
+
+ Component.xml
+
\ No newline at end of file
diff --git a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent.cs b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent.cs
index 833b7a5cdf..ab27e87847 100644
--- a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent.cs
+++ b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent.cs
@@ -31,6 +31,7 @@ public enum ComponentType
ParticleSystem_Component,
BGSLodOwner_Component,
BGSSoundTag_Component,
+ BGSDisplayCase,
}
public static bool TryCreateFromBinary(
@@ -91,6 +92,8 @@ public static AComponent CreateFromBinary(
return LodOwnerComponent.CreateFromBinary(frame, translationParams);
case ComponentType.BGSSoundTag_Component:
return SoundTagComponent.CreateFromBinary(frame, translationParams);
+ case ComponentType.BGSDisplayCase:
+ return DisplayCaseComponent.CreateFromBinary(frame, translationParams);
default:
throw new NotImplementedException();
}
@@ -153,6 +156,7 @@ public static partial void WriteBinaryBFCBStringCustom(
IParticleSystemComponentGetter _ => AComponent.ComponentType.ParticleSystem_Component,
ILodOwnerComponentGetter _ => AComponent.ComponentType.BGSLodOwner_Component,
ISoundTagComponentGetter _ => AComponent.ComponentType.BGSSoundTag_Component,
+ IDisplayCaseComponentGetter _ => AComponent.ComponentType.BGSDisplayCase,
_ => throw new NotImplementedException()
};
@@ -211,6 +215,8 @@ public static IAComponentGetter AComponentFactory(
return LodOwnerComponentBinaryOverlay.LodOwnerComponentFactory(stream, package);
case AComponent.ComponentType.BGSSoundTag_Component:
return SoundTagComponentBinaryOverlay.SoundTagComponentFactory(stream, package);
+ case AComponent.ComponentType.BGSDisplayCase:
+ return DisplayCaseComponentBinaryOverlay.DisplayCaseComponentFactory(stream, package);
default:
throw new NotImplementedException();
}
diff --git a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent_Generated.cs b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent_Generated.cs
index 371af732e1..e94ac66e94 100644
--- a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent_Generated.cs
+++ b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/AComponent_Generated.cs
@@ -41,7 +41,7 @@ namespace Mutagen.Bethesda.Starfield
{
#region Class
///
- /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent]
+ /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent, DisplayCaseComponent]
///
public abstract partial class AComponent :
IAComponent,
@@ -360,7 +360,7 @@ internal static AComponent GetNew()
#region Interface
///
- /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent]
+ /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent, DisplayCaseComponent]
///
public partial interface IAComponent :
IAComponentGetter,
@@ -371,7 +371,7 @@ public partial interface IAComponent :
}
///
- /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent]
+ /// Implemented by: [AnimationGraphComponent, AttachParentArrayComponent, ActivityTrackerComponent, ScannableComponent, KeywordFormComponent, ObjectWindowFilterComponent, ContactShadowComponent, FullNameComponent, ModelComponent, PlanetModelComponent, HoudiniDataComponent, SkinFormComponent, BodyPartInfoComponent, EffectSequenceComponent, LightAttachmentFormComponent, LightAnimFormComponent, ParticleSystemComponent, LodOwnerComponent, SoundTagComponent, DisplayCaseComponent]
///
public partial interface IAComponentGetter :
ILoquiObject,
diff --git a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/Component.xml b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/Component.xml
index e2776d39e1..c36d126df2 100644
--- a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/Component.xml
+++ b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/Component.xml
@@ -133,4 +133,20 @@
+
+
diff --git a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponentItem_Generated.cs b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponentItem_Generated.cs
new file mode 100644
index 0000000000..c2edfbaad3
--- /dev/null
+++ b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponentItem_Generated.cs
@@ -0,0 +1,1300 @@
+/*
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Autogenerated by Loqui. Do not manually change.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+*/
+#region Usings
+using Loqui;
+using Loqui.Interfaces;
+using Loqui.Internal;
+using Mutagen.Bethesda.Binary;
+using Mutagen.Bethesda.Plugins;
+using Mutagen.Bethesda.Plugins.Binary.Headers;
+using Mutagen.Bethesda.Plugins.Binary.Overlay;
+using Mutagen.Bethesda.Plugins.Binary.Streams;
+using Mutagen.Bethesda.Plugins.Binary.Translations;
+using Mutagen.Bethesda.Plugins.Cache;
+using Mutagen.Bethesda.Plugins.Exceptions;
+using Mutagen.Bethesda.Plugins.Internals;
+using Mutagen.Bethesda.Plugins.Meta;
+using Mutagen.Bethesda.Plugins.Records;
+using Mutagen.Bethesda.Plugins.Records.Internals;
+using Mutagen.Bethesda.Plugins.Records.Mapping;
+using Mutagen.Bethesda.Starfield.Internals;
+using Mutagen.Bethesda.Translations.Binary;
+using Noggog;
+using Noggog.StructuredStrings;
+using Noggog.StructuredStrings.CSharp;
+using RecordTypeInts = Mutagen.Bethesda.Starfield.Internals.RecordTypeInts;
+using RecordTypes = Mutagen.Bethesda.Starfield.Internals.RecordTypes;
+using System.Buffers.Binary;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+#endregion
+
+#nullable enable
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Class
+ public partial class DisplayCaseComponentItem :
+ IDisplayCaseComponentItem,
+ IEquatable,
+ ILoquiObjectSetter
+ {
+ #region Ctor
+ public DisplayCaseComponentItem()
+ {
+ CustomCtor();
+ }
+ partial void CustomCtor();
+ #endregion
+
+ #region DisplayFilter
+ private readonly IFormLink _DisplayFilter = new FormLink();
+ public IFormLink DisplayFilter
+ {
+ get => _DisplayFilter;
+ set => _DisplayFilter.SetTo(value);
+ }
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ IFormLinkGetter IDisplayCaseComponentItemGetter.DisplayFilter => this.DisplayFilter;
+ #endregion
+ #region Unknown1
+ public UInt32 Unknown1 { get; set; } = default;
+ #endregion
+ #region Index
+ public UInt32 Index { get; set; } = default;
+ #endregion
+ #region Unknown2
+ public UInt32 Unknown2 { get; set; } = default;
+ #endregion
+
+ #region To String
+
+ public void Print(
+ StructuredStringBuilder sb,
+ string? name = null)
+ {
+ DisplayCaseComponentItemMixIn.Print(
+ item: this,
+ sb: sb,
+ name: name);
+ }
+
+ #endregion
+
+ #region Equals and Hash
+ public override bool Equals(object? obj)
+ {
+ if (obj is not IDisplayCaseComponentItemGetter rhs) return false;
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).Equals(this, rhs, equalsMask: null);
+ }
+
+ public bool Equals(IDisplayCaseComponentItemGetter? obj)
+ {
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).Equals(this, obj, equalsMask: null);
+ }
+
+ public override int GetHashCode() => ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).GetHashCode(this);
+
+ #endregion
+
+ #region Mask
+ public class Mask :
+ IEquatable>,
+ IMask
+ {
+ #region Ctors
+ public Mask(TItem initialValue)
+ {
+ this.DisplayFilter = initialValue;
+ this.Unknown1 = initialValue;
+ this.Index = initialValue;
+ this.Unknown2 = initialValue;
+ }
+
+ public Mask(
+ TItem DisplayFilter,
+ TItem Unknown1,
+ TItem Index,
+ TItem Unknown2)
+ {
+ this.DisplayFilter = DisplayFilter;
+ this.Unknown1 = Unknown1;
+ this.Index = Index;
+ this.Unknown2 = Unknown2;
+ }
+
+ #pragma warning disable CS8618
+ protected Mask()
+ {
+ }
+ #pragma warning restore CS8618
+
+ #endregion
+
+ #region Members
+ public TItem DisplayFilter;
+ public TItem Unknown1;
+ public TItem Index;
+ public TItem Unknown2;
+ #endregion
+
+ #region Equals
+ public override bool Equals(object? obj)
+ {
+ if (!(obj is Mask rhs)) return false;
+ return Equals(rhs);
+ }
+
+ public bool Equals(Mask? rhs)
+ {
+ if (rhs == null) return false;
+ if (!object.Equals(this.DisplayFilter, rhs.DisplayFilter)) return false;
+ if (!object.Equals(this.Unknown1, rhs.Unknown1)) return false;
+ if (!object.Equals(this.Index, rhs.Index)) return false;
+ if (!object.Equals(this.Unknown2, rhs.Unknown2)) return false;
+ return true;
+ }
+ public override int GetHashCode()
+ {
+ var hash = new HashCode();
+ hash.Add(this.DisplayFilter);
+ hash.Add(this.Unknown1);
+ hash.Add(this.Index);
+ hash.Add(this.Unknown2);
+ return hash.ToHashCode();
+ }
+
+ #endregion
+
+ #region All
+ public bool All(Func eval)
+ {
+ if (!eval(this.DisplayFilter)) return false;
+ if (!eval(this.Unknown1)) return false;
+ if (!eval(this.Index)) return false;
+ if (!eval(this.Unknown2)) return false;
+ return true;
+ }
+ #endregion
+
+ #region Any
+ public bool Any(Func eval)
+ {
+ if (eval(this.DisplayFilter)) return true;
+ if (eval(this.Unknown1)) return true;
+ if (eval(this.Index)) return true;
+ if (eval(this.Unknown2)) return true;
+ return false;
+ }
+ #endregion
+
+ #region Translate
+ public Mask Translate(Func eval)
+ {
+ var ret = new DisplayCaseComponentItem.Mask();
+ this.Translate_InternalFill(ret, eval);
+ return ret;
+ }
+
+ protected void Translate_InternalFill(Mask obj, Func eval)
+ {
+ obj.DisplayFilter = eval(this.DisplayFilter);
+ obj.Unknown1 = eval(this.Unknown1);
+ obj.Index = eval(this.Index);
+ obj.Unknown2 = eval(this.Unknown2);
+ }
+ #endregion
+
+ #region To String
+ public override string ToString() => this.Print();
+
+ public string Print(DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ var sb = new StructuredStringBuilder();
+ Print(sb, printMask);
+ return sb.ToString();
+ }
+
+ public void Print(StructuredStringBuilder sb, DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ sb.AppendLine($"{nameof(DisplayCaseComponentItem.Mask)} =>");
+ using (sb.Brace())
+ {
+ if (printMask?.DisplayFilter ?? true)
+ {
+ sb.AppendItem(DisplayFilter, "DisplayFilter");
+ }
+ if (printMask?.Unknown1 ?? true)
+ {
+ sb.AppendItem(Unknown1, "Unknown1");
+ }
+ if (printMask?.Index ?? true)
+ {
+ sb.AppendItem(Index, "Index");
+ }
+ if (printMask?.Unknown2 ?? true)
+ {
+ sb.AppendItem(Unknown2, "Unknown2");
+ }
+ }
+ }
+ #endregion
+
+ }
+
+ public class ErrorMask :
+ IErrorMask,
+ IErrorMask
+ {
+ #region Members
+ public Exception? Overall { get; set; }
+ private List? _warnings;
+ public List Warnings
+ {
+ get
+ {
+ if (_warnings == null)
+ {
+ _warnings = new List();
+ }
+ return _warnings;
+ }
+ }
+ public Exception? DisplayFilter;
+ public Exception? Unknown1;
+ public Exception? Index;
+ public Exception? Unknown2;
+ #endregion
+
+ #region IErrorMask
+ public object? GetNthMask(int index)
+ {
+ DisplayCaseComponentItem_FieldIndex enu = (DisplayCaseComponentItem_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponentItem_FieldIndex.DisplayFilter:
+ return DisplayFilter;
+ case DisplayCaseComponentItem_FieldIndex.Unknown1:
+ return Unknown1;
+ case DisplayCaseComponentItem_FieldIndex.Index:
+ return Index;
+ case DisplayCaseComponentItem_FieldIndex.Unknown2:
+ return Unknown2;
+ default:
+ throw new ArgumentException($"Index is out of range: {index}");
+ }
+ }
+
+ public void SetNthException(int index, Exception ex)
+ {
+ DisplayCaseComponentItem_FieldIndex enu = (DisplayCaseComponentItem_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponentItem_FieldIndex.DisplayFilter:
+ this.DisplayFilter = ex;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Unknown1:
+ this.Unknown1 = ex;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Index:
+ this.Index = ex;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Unknown2:
+ this.Unknown2 = ex;
+ break;
+ default:
+ throw new ArgumentException($"Index is out of range: {index}");
+ }
+ }
+
+ public void SetNthMask(int index, object obj)
+ {
+ DisplayCaseComponentItem_FieldIndex enu = (DisplayCaseComponentItem_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponentItem_FieldIndex.DisplayFilter:
+ this.DisplayFilter = (Exception?)obj;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Unknown1:
+ this.Unknown1 = (Exception?)obj;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Index:
+ this.Index = (Exception?)obj;
+ break;
+ case DisplayCaseComponentItem_FieldIndex.Unknown2:
+ this.Unknown2 = (Exception?)obj;
+ break;
+ default:
+ throw new ArgumentException($"Index is out of range: {index}");
+ }
+ }
+
+ public bool IsInError()
+ {
+ if (Overall != null) return true;
+ if (DisplayFilter != null) return true;
+ if (Unknown1 != null) return true;
+ if (Index != null) return true;
+ if (Unknown2 != null) return true;
+ return false;
+ }
+ #endregion
+
+ #region To String
+ public override string ToString() => this.Print();
+
+ public void Print(StructuredStringBuilder sb, string? name = null)
+ {
+ sb.AppendLine($"{(name ?? "ErrorMask")} =>");
+ using (sb.Brace())
+ {
+ if (this.Overall != null)
+ {
+ sb.AppendLine("Overall =>");
+ using (sb.Brace())
+ {
+ sb.AppendLine($"{this.Overall}");
+ }
+ }
+ PrintFillInternal(sb);
+ }
+ }
+ protected void PrintFillInternal(StructuredStringBuilder sb)
+ {
+ {
+ sb.AppendItem(DisplayFilter, "DisplayFilter");
+ }
+ {
+ sb.AppendItem(Unknown1, "Unknown1");
+ }
+ {
+ sb.AppendItem(Index, "Index");
+ }
+ {
+ sb.AppendItem(Unknown2, "Unknown2");
+ }
+ }
+ #endregion
+
+ #region Combine
+ public ErrorMask Combine(ErrorMask? rhs)
+ {
+ if (rhs == null) return this;
+ var ret = new ErrorMask();
+ ret.DisplayFilter = this.DisplayFilter.Combine(rhs.DisplayFilter);
+ ret.Unknown1 = this.Unknown1.Combine(rhs.Unknown1);
+ ret.Index = this.Index.Combine(rhs.Index);
+ ret.Unknown2 = this.Unknown2.Combine(rhs.Unknown2);
+ return ret;
+ }
+ public static ErrorMask? Combine(ErrorMask? lhs, ErrorMask? rhs)
+ {
+ if (lhs != null && rhs != null) return lhs.Combine(rhs);
+ return lhs ?? rhs;
+ }
+ #endregion
+
+ #region Factory
+ public static ErrorMask Factory(ErrorMaskBuilder errorMask)
+ {
+ return new ErrorMask();
+ }
+ #endregion
+
+ }
+ public class TranslationMask : ITranslationMask
+ {
+ #region Members
+ private TranslationCrystal? _crystal;
+ public readonly bool DefaultOn;
+ public bool OnOverall;
+ public bool DisplayFilter;
+ public bool Unknown1;
+ public bool Index;
+ public bool Unknown2;
+ #endregion
+
+ #region Ctors
+ public TranslationMask(
+ bool defaultOn,
+ bool onOverall = true)
+ {
+ this.DefaultOn = defaultOn;
+ this.OnOverall = onOverall;
+ this.DisplayFilter = defaultOn;
+ this.Unknown1 = defaultOn;
+ this.Index = defaultOn;
+ this.Unknown2 = defaultOn;
+ }
+
+ #endregion
+
+ public TranslationCrystal GetCrystal()
+ {
+ if (_crystal != null) return _crystal;
+ var ret = new List<(bool On, TranslationCrystal? SubCrystal)>();
+ GetCrystal(ret);
+ _crystal = new TranslationCrystal(ret.ToArray());
+ return _crystal;
+ }
+
+ protected void GetCrystal(List<(bool On, TranslationCrystal? SubCrystal)> ret)
+ {
+ ret.Add((DisplayFilter, null));
+ ret.Add((Unknown1, null));
+ ret.Add((Index, null));
+ ret.Add((Unknown2, null));
+ }
+
+ public static implicit operator TranslationMask(bool defaultOn)
+ {
+ return new TranslationMask(defaultOn: defaultOn, onOverall: defaultOn);
+ }
+
+ }
+ #endregion
+
+ #region Mutagen
+ public IEnumerable EnumerateFormLinks() => DisplayCaseComponentItemCommon.Instance.EnumerateFormLinks(this);
+ public void RemapLinks(IReadOnlyDictionary mapping) => DisplayCaseComponentItemSetterCommon.Instance.RemapLinks(this, mapping);
+ #endregion
+
+ #region Binary Translation
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ protected object BinaryWriteTranslator => DisplayCaseComponentItemBinaryWriteTranslation.Instance;
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ object IBinaryItem.BinaryWriteTranslator => this.BinaryWriteTranslator;
+ void IBinaryItem.WriteToBinary(
+ MutagenWriter writer,
+ TypedWriteParams translationParams = default)
+ {
+ ((DisplayCaseComponentItemBinaryWriteTranslation)this.BinaryWriteTranslator).Write(
+ item: this,
+ writer: writer,
+ translationParams: translationParams);
+ }
+ #region Binary Create
+ public static DisplayCaseComponentItem CreateFromBinary(
+ MutagenFrame frame,
+ TypedParseParams translationParams = default)
+ {
+ var ret = new DisplayCaseComponentItem();
+ ((DisplayCaseComponentItemSetterCommon)((IDisplayCaseComponentItemGetter)ret).CommonSetterInstance()!).CopyInFromBinary(
+ item: ret,
+ frame: frame,
+ translationParams: translationParams);
+ return ret;
+ }
+
+ #endregion
+
+ public static bool TryCreateFromBinary(
+ MutagenFrame frame,
+ out DisplayCaseComponentItem item,
+ TypedParseParams translationParams = default)
+ {
+ var startPos = frame.Position;
+ item = CreateFromBinary(
+ frame: frame,
+ translationParams: translationParams);
+ return startPos != frame.Position;
+ }
+ #endregion
+
+ void IPrintable.Print(StructuredStringBuilder sb, string? name) => this.Print(sb, name);
+
+ void IClearable.Clear()
+ {
+ ((DisplayCaseComponentItemSetterCommon)((IDisplayCaseComponentItemGetter)this).CommonSetterInstance()!).Clear(this);
+ }
+
+ internal static DisplayCaseComponentItem GetNew()
+ {
+ return new DisplayCaseComponentItem();
+ }
+
+ }
+ #endregion
+
+ #region Interface
+ public partial interface IDisplayCaseComponentItem :
+ IDisplayCaseComponentItemGetter,
+ IFormLinkContainer,
+ ILoquiObjectSetter
+ {
+ new IFormLink DisplayFilter { get; set; }
+ new UInt32 Unknown1 { get; set; }
+ new UInt32 Index { get; set; }
+ new UInt32 Unknown2 { get; set; }
+ }
+
+ public partial interface IDisplayCaseComponentItemGetter :
+ ILoquiObject,
+ IBinaryItem,
+ IFormLinkContainerGetter,
+ ILoquiObject
+ {
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ object CommonInstance();
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ object? CommonSetterInstance();
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ object CommonSetterTranslationInstance();
+ static ILoquiRegistration StaticRegistration => DisplayCaseComponentItem_Registration.Instance;
+ IFormLinkGetter DisplayFilter { get; }
+ UInt32 Unknown1 { get; }
+ UInt32 Index { get; }
+ UInt32 Unknown2 { get; }
+
+ }
+
+ #endregion
+
+ #region Common MixIn
+ public static partial class DisplayCaseComponentItemMixIn
+ {
+ public static void Clear(this IDisplayCaseComponentItem item)
+ {
+ ((DisplayCaseComponentItemSetterCommon)((IDisplayCaseComponentItemGetter)item).CommonSetterInstance()!).Clear(item: item);
+ }
+
+ public static DisplayCaseComponentItem.Mask GetEqualsMask(
+ this IDisplayCaseComponentItemGetter item,
+ IDisplayCaseComponentItemGetter rhs,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).GetEqualsMask(
+ item: item,
+ rhs: rhs,
+ include: include);
+ }
+
+ public static string Print(
+ this IDisplayCaseComponentItemGetter item,
+ string? name = null,
+ DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).Print(
+ item: item,
+ name: name,
+ printMask: printMask);
+ }
+
+ public static void Print(
+ this IDisplayCaseComponentItemGetter item,
+ StructuredStringBuilder sb,
+ string? name = null,
+ DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).Print(
+ item: item,
+ sb: sb,
+ name: name,
+ printMask: printMask);
+ }
+
+ public static bool Equals(
+ this IDisplayCaseComponentItemGetter item,
+ IDisplayCaseComponentItemGetter rhs,
+ DisplayCaseComponentItem.TranslationMask? equalsMask = null)
+ {
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).Equals(
+ lhs: item,
+ rhs: rhs,
+ equalsMask: equalsMask?.GetCrystal());
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponentItem lhs,
+ IDisplayCaseComponentItemGetter rhs)
+ {
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: default,
+ copyMask: default,
+ deepCopy: false);
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponentItem lhs,
+ IDisplayCaseComponentItemGetter rhs,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: default,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: false);
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponentItem lhs,
+ IDisplayCaseComponentItemGetter rhs,
+ out DisplayCaseComponentItem.ErrorMask errorMask,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ var errorMaskBuilder = new ErrorMaskBuilder();
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: errorMaskBuilder,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: false);
+ errorMask = DisplayCaseComponentItem.ErrorMask.Factory(errorMaskBuilder);
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponentItem lhs,
+ IDisplayCaseComponentItemGetter rhs,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask)
+ {
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: errorMask,
+ copyMask: copyMask,
+ deepCopy: false);
+ }
+
+ public static DisplayCaseComponentItem DeepCopy(
+ this IDisplayCaseComponentItemGetter item,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ return ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask);
+ }
+
+ public static DisplayCaseComponentItem DeepCopy(
+ this IDisplayCaseComponentItemGetter item,
+ out DisplayCaseComponentItem.ErrorMask errorMask,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ return ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask,
+ errorMask: out errorMask);
+ }
+
+ public static DisplayCaseComponentItem DeepCopy(
+ this IDisplayCaseComponentItemGetter item,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask = null)
+ {
+ return ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask,
+ errorMask: errorMask);
+ }
+
+ #region Binary Translation
+ public static void CopyInFromBinary(
+ this IDisplayCaseComponentItem item,
+ MutagenFrame frame,
+ TypedParseParams translationParams = default)
+ {
+ ((DisplayCaseComponentItemSetterCommon)((IDisplayCaseComponentItemGetter)item).CommonSetterInstance()!).CopyInFromBinary(
+ item: item,
+ frame: frame,
+ translationParams: translationParams);
+ }
+
+ #endregion
+
+ }
+ #endregion
+
+}
+
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Field Index
+ internal enum DisplayCaseComponentItem_FieldIndex
+ {
+ DisplayFilter = 0,
+ Unknown1 = 1,
+ Index = 2,
+ Unknown2 = 3,
+ }
+ #endregion
+
+ #region Registration
+ internal partial class DisplayCaseComponentItem_Registration : ILoquiRegistration
+ {
+ public static readonly DisplayCaseComponentItem_Registration Instance = new DisplayCaseComponentItem_Registration();
+
+ public static ProtocolKey ProtocolKey => ProtocolDefinition_Starfield.ProtocolKey;
+
+ public const ushort AdditionalFieldCount = 4;
+
+ public const ushort FieldCount = 4;
+
+ public static readonly Type MaskType = typeof(DisplayCaseComponentItem.Mask<>);
+
+ public static readonly Type ErrorMaskType = typeof(DisplayCaseComponentItem.ErrorMask);
+
+ public static readonly Type ClassType = typeof(DisplayCaseComponentItem);
+
+ public static readonly Type GetterType = typeof(IDisplayCaseComponentItemGetter);
+
+ public static readonly Type? InternalGetterType = null;
+
+ public static readonly Type SetterType = typeof(IDisplayCaseComponentItem);
+
+ public static readonly Type? InternalSetterType = null;
+
+ public const string FullName = "Mutagen.Bethesda.Starfield.DisplayCaseComponentItem";
+
+ public const string Name = "DisplayCaseComponentItem";
+
+ public const string Namespace = "Mutagen.Bethesda.Starfield";
+
+ public const byte GenericCount = 0;
+
+ public static readonly Type? GenericRegistrationType = null;
+
+ public static readonly Type BinaryWriteTranslation = typeof(DisplayCaseComponentItemBinaryWriteTranslation);
+ #region Interface
+ ProtocolKey ILoquiRegistration.ProtocolKey => ProtocolKey;
+ ushort ILoquiRegistration.FieldCount => FieldCount;
+ ushort ILoquiRegistration.AdditionalFieldCount => AdditionalFieldCount;
+ Type ILoquiRegistration.MaskType => MaskType;
+ Type ILoquiRegistration.ErrorMaskType => ErrorMaskType;
+ Type ILoquiRegistration.ClassType => ClassType;
+ Type ILoquiRegistration.SetterType => SetterType;
+ Type? ILoquiRegistration.InternalSetterType => InternalSetterType;
+ Type ILoquiRegistration.GetterType => GetterType;
+ Type? ILoquiRegistration.InternalGetterType => InternalGetterType;
+ string ILoquiRegistration.FullName => FullName;
+ string ILoquiRegistration.Name => Name;
+ string ILoquiRegistration.Namespace => Namespace;
+ byte ILoquiRegistration.GenericCount => GenericCount;
+ Type? ILoquiRegistration.GenericRegistrationType => GenericRegistrationType;
+ ushort? ILoquiRegistration.GetNameIndex(StringCaseAgnostic name) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsEnumerable(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsLoqui(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsSingleton(ushort index) => throw new NotImplementedException();
+ string ILoquiRegistration.GetNthName(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.IsNthDerivative(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.IsProtected(ushort index) => throw new NotImplementedException();
+ Type ILoquiRegistration.GetNthType(ushort index) => throw new NotImplementedException();
+ #endregion
+
+ }
+ #endregion
+
+ #region Common
+ internal partial class DisplayCaseComponentItemSetterCommon
+ {
+ public static readonly DisplayCaseComponentItemSetterCommon Instance = new DisplayCaseComponentItemSetterCommon();
+
+ partial void ClearPartial();
+
+ public void Clear(IDisplayCaseComponentItem item)
+ {
+ ClearPartial();
+ item.DisplayFilter.Clear();
+ item.Unknown1 = default;
+ item.Index = default;
+ item.Unknown2 = default;
+ }
+
+ #region Mutagen
+ public void RemapLinks(IDisplayCaseComponentItem obj, IReadOnlyDictionary mapping)
+ {
+ obj.DisplayFilter.Relink(mapping);
+ }
+
+ #endregion
+
+ #region Binary Translation
+ public virtual void CopyInFromBinary(
+ IDisplayCaseComponentItem item,
+ MutagenFrame frame,
+ TypedParseParams translationParams)
+ {
+ PluginUtilityTranslation.SubrecordParse(
+ record: item,
+ frame: frame,
+ translationParams: translationParams,
+ fillStructs: DisplayCaseComponentItemBinaryCreateTranslation.FillBinaryStructs);
+ }
+
+ #endregion
+
+ }
+ internal partial class DisplayCaseComponentItemCommon
+ {
+ public static readonly DisplayCaseComponentItemCommon Instance = new DisplayCaseComponentItemCommon();
+
+ public DisplayCaseComponentItem.Mask GetEqualsMask(
+ IDisplayCaseComponentItemGetter item,
+ IDisplayCaseComponentItemGetter rhs,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ var ret = new DisplayCaseComponentItem.Mask(false);
+ ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).FillEqualsMask(
+ item: item,
+ rhs: rhs,
+ ret: ret,
+ include: include);
+ return ret;
+ }
+
+ public void FillEqualsMask(
+ IDisplayCaseComponentItemGetter item,
+ IDisplayCaseComponentItemGetter rhs,
+ DisplayCaseComponentItem.Mask ret,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ ret.DisplayFilter = item.DisplayFilter.Equals(rhs.DisplayFilter);
+ ret.Unknown1 = item.Unknown1 == rhs.Unknown1;
+ ret.Index = item.Index == rhs.Index;
+ ret.Unknown2 = item.Unknown2 == rhs.Unknown2;
+ }
+
+ public string Print(
+ IDisplayCaseComponentItemGetter item,
+ string? name = null,
+ DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ var sb = new StructuredStringBuilder();
+ Print(
+ item: item,
+ sb: sb,
+ name: name,
+ printMask: printMask);
+ return sb.ToString();
+ }
+
+ public void Print(
+ IDisplayCaseComponentItemGetter item,
+ StructuredStringBuilder sb,
+ string? name = null,
+ DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ if (name == null)
+ {
+ sb.AppendLine($"DisplayCaseComponentItem =>");
+ }
+ else
+ {
+ sb.AppendLine($"{name} (DisplayCaseComponentItem) =>");
+ }
+ using (sb.Brace())
+ {
+ ToStringFields(
+ item: item,
+ sb: sb,
+ printMask: printMask);
+ }
+ }
+
+ protected static void ToStringFields(
+ IDisplayCaseComponentItemGetter item,
+ StructuredStringBuilder sb,
+ DisplayCaseComponentItem.Mask? printMask = null)
+ {
+ if (printMask?.DisplayFilter ?? true)
+ {
+ sb.AppendItem(item.DisplayFilter.FormKey, "DisplayFilter");
+ }
+ if (printMask?.Unknown1 ?? true)
+ {
+ sb.AppendItem(item.Unknown1, "Unknown1");
+ }
+ if (printMask?.Index ?? true)
+ {
+ sb.AppendItem(item.Index, "Index");
+ }
+ if (printMask?.Unknown2 ?? true)
+ {
+ sb.AppendItem(item.Unknown2, "Unknown2");
+ }
+ }
+
+ #region Equals and Hash
+ public virtual bool Equals(
+ IDisplayCaseComponentItemGetter? lhs,
+ IDisplayCaseComponentItemGetter? rhs,
+ TranslationCrystal? equalsMask)
+ {
+ if (!EqualsMaskHelper.RefEquality(lhs, rhs, out var isEqual)) return isEqual;
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.DisplayFilter) ?? true))
+ {
+ if (!lhs.DisplayFilter.Equals(rhs.DisplayFilter)) return false;
+ }
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Unknown1) ?? true))
+ {
+ if (lhs.Unknown1 != rhs.Unknown1) return false;
+ }
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Index) ?? true))
+ {
+ if (lhs.Index != rhs.Index) return false;
+ }
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Unknown2) ?? true))
+ {
+ if (lhs.Unknown2 != rhs.Unknown2) return false;
+ }
+ return true;
+ }
+
+ public virtual int GetHashCode(IDisplayCaseComponentItemGetter item)
+ {
+ var hash = new HashCode();
+ hash.Add(item.DisplayFilter);
+ hash.Add(item.Unknown1);
+ hash.Add(item.Index);
+ hash.Add(item.Unknown2);
+ return hash.ToHashCode();
+ }
+
+ #endregion
+
+
+ public object GetNew()
+ {
+ return DisplayCaseComponentItem.GetNew();
+ }
+
+ #region Mutagen
+ public IEnumerable EnumerateFormLinks(IDisplayCaseComponentItemGetter obj)
+ {
+ yield return FormLinkInformation.Factory(obj.DisplayFilter);
+ yield break;
+ }
+
+ #endregion
+
+ }
+ internal partial class DisplayCaseComponentItemSetterTranslationCommon
+ {
+ public static readonly DisplayCaseComponentItemSetterTranslationCommon Instance = new DisplayCaseComponentItemSetterTranslationCommon();
+
+ #region DeepCopyIn
+ public void DeepCopyIn(
+ IDisplayCaseComponentItem item,
+ IDisplayCaseComponentItemGetter rhs,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask,
+ bool deepCopy)
+ {
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.DisplayFilter) ?? true))
+ {
+ item.DisplayFilter.SetTo(rhs.DisplayFilter.FormKey);
+ }
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Unknown1) ?? true))
+ {
+ item.Unknown1 = rhs.Unknown1;
+ }
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Index) ?? true))
+ {
+ item.Index = rhs.Index;
+ }
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponentItem_FieldIndex.Unknown2) ?? true))
+ {
+ item.Unknown2 = rhs.Unknown2;
+ }
+ }
+
+ #endregion
+
+ public DisplayCaseComponentItem DeepCopy(
+ IDisplayCaseComponentItemGetter item,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ DisplayCaseComponentItem ret = (DisplayCaseComponentItem)((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: ret,
+ rhs: item,
+ errorMask: null,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: true);
+ return ret;
+ }
+
+ public DisplayCaseComponentItem DeepCopy(
+ IDisplayCaseComponentItemGetter item,
+ out DisplayCaseComponentItem.ErrorMask errorMask,
+ DisplayCaseComponentItem.TranslationMask? copyMask = null)
+ {
+ var errorMaskBuilder = new ErrorMaskBuilder();
+ DisplayCaseComponentItem ret = (DisplayCaseComponentItem)((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ ret,
+ item,
+ errorMask: errorMaskBuilder,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: true);
+ errorMask = DisplayCaseComponentItem.ErrorMask.Factory(errorMaskBuilder);
+ return ret;
+ }
+
+ public DisplayCaseComponentItem DeepCopy(
+ IDisplayCaseComponentItemGetter item,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask = null)
+ {
+ DisplayCaseComponentItem ret = (DisplayCaseComponentItem)((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentItemSetterTranslationCommon)((IDisplayCaseComponentItemGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: ret,
+ rhs: item,
+ errorMask: errorMask,
+ copyMask: copyMask,
+ deepCopy: true);
+ return ret;
+ }
+
+ }
+ #endregion
+
+}
+
+namespace Mutagen.Bethesda.Starfield
+{
+ public partial class DisplayCaseComponentItem
+ {
+ #region Common Routing
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ ILoquiRegistration ILoquiObject.Registration => DisplayCaseComponentItem_Registration.Instance;
+ public static ILoquiRegistration StaticRegistration => DisplayCaseComponentItem_Registration.Instance;
+ [DebuggerStepThrough]
+ protected object CommonInstance() => DisplayCaseComponentItemCommon.Instance;
+ [DebuggerStepThrough]
+ protected object CommonSetterInstance()
+ {
+ return DisplayCaseComponentItemSetterCommon.Instance;
+ }
+ [DebuggerStepThrough]
+ protected object CommonSetterTranslationInstance() => DisplayCaseComponentItemSetterTranslationCommon.Instance;
+ [DebuggerStepThrough]
+ object IDisplayCaseComponentItemGetter.CommonInstance() => this.CommonInstance();
+ [DebuggerStepThrough]
+ object IDisplayCaseComponentItemGetter.CommonSetterInstance() => this.CommonSetterInstance();
+ [DebuggerStepThrough]
+ object IDisplayCaseComponentItemGetter.CommonSetterTranslationInstance() => this.CommonSetterTranslationInstance();
+
+ #endregion
+
+ }
+}
+
+#region Modules
+#region Binary Translation
+namespace Mutagen.Bethesda.Starfield
+{
+ public partial class DisplayCaseComponentItemBinaryWriteTranslation : IBinaryWriteTranslator
+ {
+ public static readonly DisplayCaseComponentItemBinaryWriteTranslation Instance = new();
+
+ public static void WriteEmbedded(
+ IDisplayCaseComponentItemGetter item,
+ MutagenWriter writer)
+ {
+ FormLinkBinaryTranslation.Instance.Write(
+ writer: writer,
+ item: item.DisplayFilter);
+ writer.Write(item.Unknown1);
+ writer.Write(item.Index);
+ writer.Write(item.Unknown2);
+ }
+
+ public void Write(
+ MutagenWriter writer,
+ IDisplayCaseComponentItemGetter item,
+ TypedWriteParams translationParams)
+ {
+ WriteEmbedded(
+ item: item,
+ writer: writer);
+ }
+
+ public void Write(
+ MutagenWriter writer,
+ object item,
+ TypedWriteParams translationParams = default)
+ {
+ Write(
+ item: (IDisplayCaseComponentItemGetter)item,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ }
+
+ internal partial class DisplayCaseComponentItemBinaryCreateTranslation
+ {
+ public static readonly DisplayCaseComponentItemBinaryCreateTranslation Instance = new DisplayCaseComponentItemBinaryCreateTranslation();
+
+ public static void FillBinaryStructs(
+ IDisplayCaseComponentItem item,
+ MutagenFrame frame)
+ {
+ item.DisplayFilter.SetTo(FormLinkBinaryTranslation.Instance.Parse(reader: frame));
+ item.Unknown1 = frame.ReadUInt32();
+ item.Index = frame.ReadUInt32();
+ item.Unknown2 = frame.ReadUInt32();
+ }
+
+ }
+
+}
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Binary Write Mixins
+ public static class DisplayCaseComponentItemBinaryTranslationMixIn
+ {
+ public static void WriteToBinary(
+ this IDisplayCaseComponentItemGetter item,
+ MutagenWriter writer,
+ TypedWriteParams translationParams = default)
+ {
+ ((DisplayCaseComponentItemBinaryWriteTranslation)item.BinaryWriteTranslator).Write(
+ item: item,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ }
+ #endregion
+
+
+}
+namespace Mutagen.Bethesda.Starfield
+{
+ internal partial class DisplayCaseComponentItemBinaryOverlay :
+ PluginBinaryOverlay,
+ IDisplayCaseComponentItemGetter
+ {
+ #region Common Routing
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ ILoquiRegistration ILoquiObject.Registration => DisplayCaseComponentItem_Registration.Instance;
+ public static ILoquiRegistration StaticRegistration => DisplayCaseComponentItem_Registration.Instance;
+ [DebuggerStepThrough]
+ protected object CommonInstance() => DisplayCaseComponentItemCommon.Instance;
+ [DebuggerStepThrough]
+ protected object CommonSetterTranslationInstance() => DisplayCaseComponentItemSetterTranslationCommon.Instance;
+ [DebuggerStepThrough]
+ object IDisplayCaseComponentItemGetter.CommonInstance() => this.CommonInstance();
+ [DebuggerStepThrough]
+ object? IDisplayCaseComponentItemGetter.CommonSetterInstance() => null;
+ [DebuggerStepThrough]
+ object IDisplayCaseComponentItemGetter.CommonSetterTranslationInstance() => this.CommonSetterTranslationInstance();
+
+ #endregion
+
+ void IPrintable.Print(StructuredStringBuilder sb, string? name) => this.Print(sb, name);
+
+ public IEnumerable EnumerateFormLinks() => DisplayCaseComponentItemCommon.Instance.EnumerateFormLinks(this);
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ protected object BinaryWriteTranslator => DisplayCaseComponentItemBinaryWriteTranslation.Instance;
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ object IBinaryItem.BinaryWriteTranslator => this.BinaryWriteTranslator;
+ void IBinaryItem.WriteToBinary(
+ MutagenWriter writer,
+ TypedWriteParams translationParams = default)
+ {
+ ((DisplayCaseComponentItemBinaryWriteTranslation)this.BinaryWriteTranslator).Write(
+ item: this,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ public IFormLinkGetter DisplayFilter => new FormLink(FormKey.Factory(_package.MetaData.MasterReferences!, BinaryPrimitives.ReadUInt32LittleEndian(_structData.Span.Slice(0x0, 0x4))));
+ public UInt32 Unknown1 => BinaryPrimitives.ReadUInt32LittleEndian(_structData.Slice(0x4, 0x4));
+ public UInt32 Index => BinaryPrimitives.ReadUInt32LittleEndian(_structData.Slice(0x8, 0x4));
+ public UInt32 Unknown2 => BinaryPrimitives.ReadUInt32LittleEndian(_structData.Slice(0xC, 0x4));
+ partial void CustomFactoryEnd(
+ OverlayStream stream,
+ int finalPos,
+ int offset);
+
+ partial void CustomCtor();
+ protected DisplayCaseComponentItemBinaryOverlay(
+ MemoryPair memoryPair,
+ BinaryOverlayFactoryPackage package)
+ : base(
+ memoryPair: memoryPair,
+ package: package)
+ {
+ this.CustomCtor();
+ }
+
+ public static IDisplayCaseComponentItemGetter DisplayCaseComponentItemFactory(
+ OverlayStream stream,
+ BinaryOverlayFactoryPackage package,
+ TypedParseParams translationParams = default)
+ {
+ stream = ExtractTypelessSubrecordStructMemory(
+ stream: stream,
+ meta: package.MetaData.Constants,
+ translationParams: translationParams,
+ length: 0x10,
+ memoryPair: out var memoryPair,
+ offset: out var offset);
+ var ret = new DisplayCaseComponentItemBinaryOverlay(
+ memoryPair: memoryPair,
+ package: package);
+ stream.Position += 0x10;
+ ret.CustomFactoryEnd(
+ stream: stream,
+ finalPos: stream.Length,
+ offset: offset);
+ return ret;
+ }
+
+ public static IDisplayCaseComponentItemGetter DisplayCaseComponentItemFactory(
+ ReadOnlyMemorySlice slice,
+ BinaryOverlayFactoryPackage package,
+ TypedParseParams translationParams = default)
+ {
+ return DisplayCaseComponentItemFactory(
+ stream: new OverlayStream(slice, package),
+ package: package,
+ translationParams: translationParams);
+ }
+
+ #region To String
+
+ public void Print(
+ StructuredStringBuilder sb,
+ string? name = null)
+ {
+ DisplayCaseComponentItemMixIn.Print(
+ item: this,
+ sb: sb,
+ name: name);
+ }
+
+ #endregion
+
+ #region Equals and Hash
+ public override bool Equals(object? obj)
+ {
+ if (obj is not IDisplayCaseComponentItemGetter rhs) return false;
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).Equals(this, rhs, equalsMask: null);
+ }
+
+ public bool Equals(IDisplayCaseComponentItemGetter? obj)
+ {
+ return ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).Equals(this, obj, equalsMask: null);
+ }
+
+ public override int GetHashCode() => ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)this).CommonInstance()!).GetHashCode(this);
+
+ #endregion
+
+ }
+
+}
+#endregion
+
+#endregion
+
diff --git a/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponent_Generated.cs b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponent_Generated.cs
new file mode 100644
index 0000000000..bea44294bf
--- /dev/null
+++ b/Mutagen.Bethesda.Starfield/Records/Common Subrecords/DisplayCaseComponent_Generated.cs
@@ -0,0 +1,1560 @@
+/*
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Autogenerated by Loqui. Do not manually change.
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+*/
+#region Usings
+using Loqui;
+using Loqui.Interfaces;
+using Loqui.Internal;
+using Mutagen.Bethesda.Binary;
+using Mutagen.Bethesda.Plugins;
+using Mutagen.Bethesda.Plugins.Binary.Headers;
+using Mutagen.Bethesda.Plugins.Binary.Overlay;
+using Mutagen.Bethesda.Plugins.Binary.Streams;
+using Mutagen.Bethesda.Plugins.Binary.Translations;
+using Mutagen.Bethesda.Plugins.Cache;
+using Mutagen.Bethesda.Plugins.Exceptions;
+using Mutagen.Bethesda.Plugins.Internals;
+using Mutagen.Bethesda.Plugins.Meta;
+using Mutagen.Bethesda.Plugins.Records;
+using Mutagen.Bethesda.Plugins.Records.Internals;
+using Mutagen.Bethesda.Plugins.Records.Mapping;
+using Mutagen.Bethesda.Starfield;
+using Mutagen.Bethesda.Starfield.Internals;
+using Mutagen.Bethesda.Translations.Binary;
+using Noggog;
+using Noggog.StructuredStrings;
+using Noggog.StructuredStrings.CSharp;
+using RecordTypeInts = Mutagen.Bethesda.Starfield.Internals.RecordTypeInts;
+using RecordTypes = Mutagen.Bethesda.Starfield.Internals.RecordTypes;
+using System.Buffers.Binary;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+#endregion
+
+#nullable enable
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Class
+ public partial class DisplayCaseComponent :
+ AComponent,
+ IDisplayCaseComponent,
+ IEquatable,
+ ILoquiObjectSetter
+ {
+ #region Ctor
+ public DisplayCaseComponent()
+ {
+ CustomCtor();
+ }
+ partial void CustomCtor();
+ #endregion
+
+ #region Items
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ private ExtendedList? _Items;
+ public ExtendedList? Items
+ {
+ get => this._Items;
+ set => this._Items = value;
+ }
+ #region Interface Members
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ IReadOnlyList? IDisplayCaseComponentGetter.Items => _Items;
+ #endregion
+
+ #endregion
+ #region DCED
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ private ExtendedList? _DCED;
+ public ExtendedList? DCED
+ {
+ get => this._DCED;
+ set => this._DCED = value;
+ }
+ #region Interface Members
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ IReadOnlyList? IDisplayCaseComponentGetter.DCED => _DCED;
+ #endregion
+
+ #endregion
+
+ #region To String
+
+ public override void Print(
+ StructuredStringBuilder sb,
+ string? name = null)
+ {
+ DisplayCaseComponentMixIn.Print(
+ item: this,
+ sb: sb,
+ name: name);
+ }
+
+ #endregion
+
+ #region Equals and Hash
+ public override bool Equals(object? obj)
+ {
+ if (obj is not IDisplayCaseComponentGetter rhs) return false;
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).Equals(this, rhs, equalsMask: null);
+ }
+
+ public bool Equals(IDisplayCaseComponentGetter? obj)
+ {
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).Equals(this, obj, equalsMask: null);
+ }
+
+ public override int GetHashCode() => ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).GetHashCode(this);
+
+ #endregion
+
+ #region Mask
+ public new class Mask :
+ AComponent.Mask,
+ IEquatable>,
+ IMask
+ {
+ #region Ctors
+ public Mask(TItem initialValue)
+ : base(initialValue)
+ {
+ this.Items = new MaskItem?>>?>(initialValue, Enumerable.Empty?>>());
+ this.DCED = new MaskItem?>(initialValue, Enumerable.Empty<(int Index, TItem Value)>());
+ }
+
+ public Mask(
+ TItem Items,
+ TItem DCED)
+ : base()
+ {
+ this.Items = new MaskItem?>>?>(Items, Enumerable.Empty?>>());
+ this.DCED = new MaskItem?>(DCED, Enumerable.Empty<(int Index, TItem Value)>());
+ }
+
+ #pragma warning disable CS8618
+ protected Mask()
+ {
+ }
+ #pragma warning restore CS8618
+
+ #endregion
+
+ #region Members
+ public MaskItem?>>?>? Items;
+ public MaskItem?>? DCED;
+ #endregion
+
+ #region Equals
+ public override bool Equals(object? obj)
+ {
+ if (!(obj is Mask rhs)) return false;
+ return Equals(rhs);
+ }
+
+ public bool Equals(Mask? rhs)
+ {
+ if (rhs == null) return false;
+ if (!base.Equals(rhs)) return false;
+ if (!object.Equals(this.Items, rhs.Items)) return false;
+ if (!object.Equals(this.DCED, rhs.DCED)) return false;
+ return true;
+ }
+ public override int GetHashCode()
+ {
+ var hash = new HashCode();
+ hash.Add(this.Items);
+ hash.Add(this.DCED);
+ hash.Add(base.GetHashCode());
+ return hash.ToHashCode();
+ }
+
+ #endregion
+
+ #region All
+ public override bool All(Func eval)
+ {
+ if (!base.All(eval)) return false;
+ if (this.Items != null)
+ {
+ if (!eval(this.Items.Overall)) return false;
+ if (this.Items.Specific != null)
+ {
+ foreach (var item in this.Items.Specific)
+ {
+ if (!eval(item.Overall)) return false;
+ if (item.Specific != null && !item.Specific.All(eval)) return false;
+ }
+ }
+ }
+ if (this.DCED != null)
+ {
+ if (!eval(this.DCED.Overall)) return false;
+ if (this.DCED.Specific != null)
+ {
+ foreach (var item in this.DCED.Specific)
+ {
+ if (!eval(item.Value)) return false;
+ }
+ }
+ }
+ return true;
+ }
+ #endregion
+
+ #region Any
+ public override bool Any(Func eval)
+ {
+ if (base.Any(eval)) return true;
+ if (this.Items != null)
+ {
+ if (eval(this.Items.Overall)) return true;
+ if (this.Items.Specific != null)
+ {
+ foreach (var item in this.Items.Specific)
+ {
+ if (!eval(item.Overall)) return false;
+ if (item.Specific != null && !item.Specific.All(eval)) return false;
+ }
+ }
+ }
+ if (this.DCED != null)
+ {
+ if (eval(this.DCED.Overall)) return true;
+ if (this.DCED.Specific != null)
+ {
+ foreach (var item in this.DCED.Specific)
+ {
+ if (!eval(item.Value)) return false;
+ }
+ }
+ }
+ return false;
+ }
+ #endregion
+
+ #region Translate
+ public new Mask Translate(Func eval)
+ {
+ var ret = new DisplayCaseComponent.Mask();
+ this.Translate_InternalFill(ret, eval);
+ return ret;
+ }
+
+ protected void Translate_InternalFill(Mask obj, Func eval)
+ {
+ base.Translate_InternalFill(obj, eval);
+ if (Items != null)
+ {
+ obj.Items = new MaskItem?>>?>(eval(this.Items.Overall), Enumerable.Empty?>>());
+ if (Items.Specific != null)
+ {
+ var l = new List?>>();
+ obj.Items.Specific = l;
+ foreach (var item in Items.Specific)
+ {
+ MaskItemIndexed?>? mask = item == null ? null : new MaskItemIndexed?>(item.Index, eval(item.Overall), item.Specific?.Translate(eval));
+ if (mask == null) continue;
+ l.Add(mask);
+ }
+ }
+ }
+ if (DCED != null)
+ {
+ obj.DCED = new MaskItem?>(eval(this.DCED.Overall), Enumerable.Empty<(int Index, R Value)>());
+ if (DCED.Specific != null)
+ {
+ var l = new List<(int Index, R Item)>();
+ obj.DCED.Specific = l;
+ foreach (var item in DCED.Specific)
+ {
+ R mask = eval(item.Value);
+ l.Add((item.Index, mask));
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region To String
+ public override string ToString() => this.Print();
+
+ public string Print(DisplayCaseComponent.Mask? printMask = null)
+ {
+ var sb = new StructuredStringBuilder();
+ Print(sb, printMask);
+ return sb.ToString();
+ }
+
+ public void Print(StructuredStringBuilder sb, DisplayCaseComponent.Mask? printMask = null)
+ {
+ sb.AppendLine($"{nameof(DisplayCaseComponent.Mask)} =>");
+ using (sb.Brace())
+ {
+ if ((printMask?.Items?.Overall ?? true)
+ && Items is {} ItemsItem)
+ {
+ sb.AppendLine("Items =>");
+ using (sb.Brace())
+ {
+ sb.AppendItem(ItemsItem.Overall);
+ if (ItemsItem.Specific != null)
+ {
+ foreach (var subItem in ItemsItem.Specific)
+ {
+ using (sb.Brace())
+ {
+ subItem?.Print(sb);
+ }
+ }
+ }
+ }
+ }
+ if ((printMask?.DCED?.Overall ?? true)
+ && DCED is {} DCEDItem)
+ {
+ sb.AppendLine("DCED =>");
+ using (sb.Brace())
+ {
+ sb.AppendItem(DCEDItem.Overall);
+ if (DCEDItem.Specific != null)
+ {
+ foreach (var subItem in DCEDItem.Specific)
+ {
+ using (sb.Brace())
+ {
+ {
+ sb.AppendItem(subItem);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ }
+
+ public new class ErrorMask :
+ AComponent.ErrorMask,
+ IErrorMask
+ {
+ #region Members
+ public MaskItem>?>? Items;
+ public MaskItem?>? DCED;
+ #endregion
+
+ #region IErrorMask
+ public override object? GetNthMask(int index)
+ {
+ DisplayCaseComponent_FieldIndex enu = (DisplayCaseComponent_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponent_FieldIndex.Items:
+ return Items;
+ case DisplayCaseComponent_FieldIndex.DCED:
+ return DCED;
+ default:
+ return base.GetNthMask(index);
+ }
+ }
+
+ public override void SetNthException(int index, Exception ex)
+ {
+ DisplayCaseComponent_FieldIndex enu = (DisplayCaseComponent_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponent_FieldIndex.Items:
+ this.Items = new MaskItem>?>(ex, null);
+ break;
+ case DisplayCaseComponent_FieldIndex.DCED:
+ this.DCED = new MaskItem?>(ex, null);
+ break;
+ default:
+ base.SetNthException(index, ex);
+ break;
+ }
+ }
+
+ public override void SetNthMask(int index, object obj)
+ {
+ DisplayCaseComponent_FieldIndex enu = (DisplayCaseComponent_FieldIndex)index;
+ switch (enu)
+ {
+ case DisplayCaseComponent_FieldIndex.Items:
+ this.Items = (MaskItem>?>)obj;
+ break;
+ case DisplayCaseComponent_FieldIndex.DCED:
+ this.DCED = (MaskItem?>)obj;
+ break;
+ default:
+ base.SetNthMask(index, obj);
+ break;
+ }
+ }
+
+ public override bool IsInError()
+ {
+ if (Overall != null) return true;
+ if (Items != null) return true;
+ if (DCED != null) return true;
+ return false;
+ }
+ #endregion
+
+ #region To String
+ public override string ToString() => this.Print();
+
+ public override void Print(StructuredStringBuilder sb, string? name = null)
+ {
+ sb.AppendLine($"{(name ?? "ErrorMask")} =>");
+ using (sb.Brace())
+ {
+ if (this.Overall != null)
+ {
+ sb.AppendLine("Overall =>");
+ using (sb.Brace())
+ {
+ sb.AppendLine($"{this.Overall}");
+ }
+ }
+ PrintFillInternal(sb);
+ }
+ }
+ protected override void PrintFillInternal(StructuredStringBuilder sb)
+ {
+ base.PrintFillInternal(sb);
+ if (Items is {} ItemsItem)
+ {
+ sb.AppendLine("Items =>");
+ using (sb.Brace())
+ {
+ sb.AppendItem(ItemsItem.Overall);
+ if (ItemsItem.Specific != null)
+ {
+ foreach (var subItem in ItemsItem.Specific)
+ {
+ using (sb.Brace())
+ {
+ subItem?.Print(sb);
+ }
+ }
+ }
+ }
+ }
+ if (DCED is {} DCEDItem)
+ {
+ sb.AppendLine("DCED =>");
+ using (sb.Brace())
+ {
+ sb.AppendItem(DCEDItem.Overall);
+ if (DCEDItem.Specific != null)
+ {
+ foreach (var subItem in DCEDItem.Specific)
+ {
+ using (sb.Brace())
+ {
+ {
+ sb.AppendItem(subItem);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region Combine
+ public ErrorMask Combine(ErrorMask? rhs)
+ {
+ if (rhs == null) return this;
+ var ret = new ErrorMask();
+ ret.Items = new MaskItem>?>(Noggog.ExceptionExt.Combine(this.Items?.Overall, rhs.Items?.Overall), Noggog.ExceptionExt.Combine(this.Items?.Specific, rhs.Items?.Specific));
+ ret.DCED = new MaskItem?>(Noggog.ExceptionExt.Combine(this.DCED?.Overall, rhs.DCED?.Overall), Noggog.ExceptionExt.Combine(this.DCED?.Specific, rhs.DCED?.Specific));
+ return ret;
+ }
+ public static ErrorMask? Combine(ErrorMask? lhs, ErrorMask? rhs)
+ {
+ if (lhs != null && rhs != null) return lhs.Combine(rhs);
+ return lhs ?? rhs;
+ }
+ #endregion
+
+ #region Factory
+ public static new ErrorMask Factory(ErrorMaskBuilder errorMask)
+ {
+ return new ErrorMask();
+ }
+ #endregion
+
+ }
+ public new class TranslationMask :
+ AComponent.TranslationMask,
+ ITranslationMask
+ {
+ #region Members
+ public DisplayCaseComponentItem.TranslationMask? Items;
+ public bool DCED;
+ #endregion
+
+ #region Ctors
+ public TranslationMask(
+ bool defaultOn,
+ bool onOverall = true)
+ : base(defaultOn, onOverall)
+ {
+ this.DCED = defaultOn;
+ }
+
+ #endregion
+
+ protected override void GetCrystal(List<(bool On, TranslationCrystal? SubCrystal)> ret)
+ {
+ base.GetCrystal(ret);
+ ret.Add((Items == null ? DefaultOn : !Items.GetCrystal().CopyNothing, Items?.GetCrystal()));
+ ret.Add((DCED, null));
+ }
+
+ public static implicit operator TranslationMask(bool defaultOn)
+ {
+ return new TranslationMask(defaultOn: defaultOn, onOverall: defaultOn);
+ }
+
+ }
+ #endregion
+
+ #region Mutagen
+ public override IEnumerable EnumerateFormLinks() => DisplayCaseComponentCommon.Instance.EnumerateFormLinks(this);
+ public override void RemapLinks(IReadOnlyDictionary mapping) => DisplayCaseComponentSetterCommon.Instance.RemapLinks(this, mapping);
+ #endregion
+
+ #region Binary Translation
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ protected override object BinaryWriteTranslator => DisplayCaseComponentBinaryWriteTranslation.Instance;
+ void IBinaryItem.WriteToBinary(
+ MutagenWriter writer,
+ TypedWriteParams translationParams = default)
+ {
+ ((DisplayCaseComponentBinaryWriteTranslation)this.BinaryWriteTranslator).Write(
+ item: this,
+ writer: writer,
+ translationParams: translationParams);
+ }
+ #region Binary Create
+ public new static DisplayCaseComponent CreateFromBinary(
+ MutagenFrame frame,
+ TypedParseParams translationParams = default)
+ {
+ var ret = new DisplayCaseComponent();
+ ((DisplayCaseComponentSetterCommon)((IDisplayCaseComponentGetter)ret).CommonSetterInstance()!).CopyInFromBinary(
+ item: ret,
+ frame: frame,
+ translationParams: translationParams);
+ return ret;
+ }
+
+ #endregion
+
+ public static bool TryCreateFromBinary(
+ MutagenFrame frame,
+ out DisplayCaseComponent item,
+ TypedParseParams translationParams = default)
+ {
+ var startPos = frame.Position;
+ item = CreateFromBinary(
+ frame: frame,
+ translationParams: translationParams);
+ return startPos != frame.Position;
+ }
+ #endregion
+
+ void IPrintable.Print(StructuredStringBuilder sb, string? name) => this.Print(sb, name);
+
+ void IClearable.Clear()
+ {
+ ((DisplayCaseComponentSetterCommon)((IDisplayCaseComponentGetter)this).CommonSetterInstance()!).Clear(this);
+ }
+
+ internal static new DisplayCaseComponent GetNew()
+ {
+ return new DisplayCaseComponent();
+ }
+
+ }
+ #endregion
+
+ #region Interface
+ public partial interface IDisplayCaseComponent :
+ IAComponent,
+ IDisplayCaseComponentGetter,
+ IFormLinkContainer,
+ ILoquiObjectSetter
+ {
+ new ExtendedList? Items { get; set; }
+ new ExtendedList? DCED { get; set; }
+ }
+
+ public partial interface IDisplayCaseComponentGetter :
+ IAComponentGetter,
+ IBinaryItem,
+ IFormLinkContainerGetter,
+ ILoquiObject
+ {
+ static new ILoquiRegistration StaticRegistration => DisplayCaseComponent_Registration.Instance;
+ IReadOnlyList? Items { get; }
+ IReadOnlyList? DCED { get; }
+
+ }
+
+ #endregion
+
+ #region Common MixIn
+ public static partial class DisplayCaseComponentMixIn
+ {
+ public static void Clear(this IDisplayCaseComponent item)
+ {
+ ((DisplayCaseComponentSetterCommon)((IDisplayCaseComponentGetter)item).CommonSetterInstance()!).Clear(item: item);
+ }
+
+ public static DisplayCaseComponent.Mask GetEqualsMask(
+ this IDisplayCaseComponentGetter item,
+ IDisplayCaseComponentGetter rhs,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).GetEqualsMask(
+ item: item,
+ rhs: rhs,
+ include: include);
+ }
+
+ public static string Print(
+ this IDisplayCaseComponentGetter item,
+ string? name = null,
+ DisplayCaseComponent.Mask? printMask = null)
+ {
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).Print(
+ item: item,
+ name: name,
+ printMask: printMask);
+ }
+
+ public static void Print(
+ this IDisplayCaseComponentGetter item,
+ StructuredStringBuilder sb,
+ string? name = null,
+ DisplayCaseComponent.Mask? printMask = null)
+ {
+ ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).Print(
+ item: item,
+ sb: sb,
+ name: name,
+ printMask: printMask);
+ }
+
+ public static bool Equals(
+ this IDisplayCaseComponentGetter item,
+ IDisplayCaseComponentGetter rhs,
+ DisplayCaseComponent.TranslationMask? equalsMask = null)
+ {
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).Equals(
+ lhs: item,
+ rhs: rhs,
+ equalsMask: equalsMask?.GetCrystal());
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponent lhs,
+ IDisplayCaseComponentGetter rhs,
+ out DisplayCaseComponent.ErrorMask errorMask,
+ DisplayCaseComponent.TranslationMask? copyMask = null)
+ {
+ var errorMaskBuilder = new ErrorMaskBuilder();
+ ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: errorMaskBuilder,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: false);
+ errorMask = DisplayCaseComponent.ErrorMask.Factory(errorMaskBuilder);
+ }
+
+ public static void DeepCopyIn(
+ this IDisplayCaseComponent lhs,
+ IDisplayCaseComponentGetter rhs,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask)
+ {
+ ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)lhs).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: lhs,
+ rhs: rhs,
+ errorMask: errorMask,
+ copyMask: copyMask,
+ deepCopy: false);
+ }
+
+ public static DisplayCaseComponent DeepCopy(
+ this IDisplayCaseComponentGetter item,
+ DisplayCaseComponent.TranslationMask? copyMask = null)
+ {
+ return ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask);
+ }
+
+ public static DisplayCaseComponent DeepCopy(
+ this IDisplayCaseComponentGetter item,
+ out DisplayCaseComponent.ErrorMask errorMask,
+ DisplayCaseComponent.TranslationMask? copyMask = null)
+ {
+ return ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask,
+ errorMask: out errorMask);
+ }
+
+ public static DisplayCaseComponent DeepCopy(
+ this IDisplayCaseComponentGetter item,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask = null)
+ {
+ return ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)item).CommonSetterTranslationInstance()!).DeepCopy(
+ item: item,
+ copyMask: copyMask,
+ errorMask: errorMask);
+ }
+
+ #region Binary Translation
+ public static void CopyInFromBinary(
+ this IDisplayCaseComponent item,
+ MutagenFrame frame,
+ TypedParseParams translationParams = default)
+ {
+ ((DisplayCaseComponentSetterCommon)((IDisplayCaseComponentGetter)item).CommonSetterInstance()!).CopyInFromBinary(
+ item: item,
+ frame: frame,
+ translationParams: translationParams);
+ }
+
+ #endregion
+
+ }
+ #endregion
+
+}
+
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Field Index
+ internal enum DisplayCaseComponent_FieldIndex
+ {
+ Items = 0,
+ DCED = 1,
+ }
+ #endregion
+
+ #region Registration
+ internal partial class DisplayCaseComponent_Registration : ILoquiRegistration
+ {
+ public static readonly DisplayCaseComponent_Registration Instance = new DisplayCaseComponent_Registration();
+
+ public static ProtocolKey ProtocolKey => ProtocolDefinition_Starfield.ProtocolKey;
+
+ public const ushort AdditionalFieldCount = 2;
+
+ public const ushort FieldCount = 2;
+
+ public static readonly Type MaskType = typeof(DisplayCaseComponent.Mask<>);
+
+ public static readonly Type ErrorMaskType = typeof(DisplayCaseComponent.ErrorMask);
+
+ public static readonly Type ClassType = typeof(DisplayCaseComponent);
+
+ public static readonly Type GetterType = typeof(IDisplayCaseComponentGetter);
+
+ public static readonly Type? InternalGetterType = null;
+
+ public static readonly Type SetterType = typeof(IDisplayCaseComponent);
+
+ public static readonly Type? InternalSetterType = null;
+
+ public const string FullName = "Mutagen.Bethesda.Starfield.DisplayCaseComponent";
+
+ public const string Name = "DisplayCaseComponent";
+
+ public const string Namespace = "Mutagen.Bethesda.Starfield";
+
+ public const byte GenericCount = 0;
+
+ public static readonly Type? GenericRegistrationType = null;
+
+ public static readonly RecordType TriggeringRecordType = RecordTypes.BFCB;
+ public static RecordTriggerSpecs TriggerSpecs => _recordSpecs.Value;
+ private static readonly Lazy _recordSpecs = new Lazy(() =>
+ {
+ var triggers = RecordCollection.Factory(RecordTypes.BFCB);
+ var all = RecordCollection.Factory(
+ RecordTypes.BFCB,
+ RecordTypes.DCSD,
+ RecordTypes.DCED);
+ return new RecordTriggerSpecs(allRecordTypes: all, triggeringRecordTypes: triggers);
+ });
+ public static readonly Type BinaryWriteTranslation = typeof(DisplayCaseComponentBinaryWriteTranslation);
+ #region Interface
+ ProtocolKey ILoquiRegistration.ProtocolKey => ProtocolKey;
+ ushort ILoquiRegistration.FieldCount => FieldCount;
+ ushort ILoquiRegistration.AdditionalFieldCount => AdditionalFieldCount;
+ Type ILoquiRegistration.MaskType => MaskType;
+ Type ILoquiRegistration.ErrorMaskType => ErrorMaskType;
+ Type ILoquiRegistration.ClassType => ClassType;
+ Type ILoquiRegistration.SetterType => SetterType;
+ Type? ILoquiRegistration.InternalSetterType => InternalSetterType;
+ Type ILoquiRegistration.GetterType => GetterType;
+ Type? ILoquiRegistration.InternalGetterType => InternalGetterType;
+ string ILoquiRegistration.FullName => FullName;
+ string ILoquiRegistration.Name => Name;
+ string ILoquiRegistration.Namespace => Namespace;
+ byte ILoquiRegistration.GenericCount => GenericCount;
+ Type? ILoquiRegistration.GenericRegistrationType => GenericRegistrationType;
+ ushort? ILoquiRegistration.GetNameIndex(StringCaseAgnostic name) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsEnumerable(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsLoqui(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.GetNthIsSingleton(ushort index) => throw new NotImplementedException();
+ string ILoquiRegistration.GetNthName(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.IsNthDerivative(ushort index) => throw new NotImplementedException();
+ bool ILoquiRegistration.IsProtected(ushort index) => throw new NotImplementedException();
+ Type ILoquiRegistration.GetNthType(ushort index) => throw new NotImplementedException();
+ #endregion
+
+ }
+ #endregion
+
+ #region Common
+ internal partial class DisplayCaseComponentSetterCommon : AComponentSetterCommon
+ {
+ public new static readonly DisplayCaseComponentSetterCommon Instance = new DisplayCaseComponentSetterCommon();
+
+ partial void ClearPartial();
+
+ public void Clear(IDisplayCaseComponent item)
+ {
+ ClearPartial();
+ item.Items = null;
+ item.DCED = null;
+ base.Clear(item);
+ }
+
+ public override void Clear(IAComponent item)
+ {
+ Clear(item: (IDisplayCaseComponent)item);
+ }
+
+ #region Mutagen
+ public void RemapLinks(IDisplayCaseComponent obj, IReadOnlyDictionary mapping)
+ {
+ base.RemapLinks(obj, mapping);
+ obj.Items?.RemapLinks(mapping);
+ }
+
+ #endregion
+
+ #region Binary Translation
+ public virtual void CopyInFromBinary(
+ IDisplayCaseComponent item,
+ MutagenFrame frame,
+ TypedParseParams translationParams)
+ {
+ PluginUtilityTranslation.SubrecordParse(
+ record: item,
+ frame: frame,
+ translationParams: translationParams,
+ fillTyped: DisplayCaseComponentBinaryCreateTranslation.FillBinaryRecordTypes);
+ }
+
+ public override void CopyInFromBinary(
+ IAComponent item,
+ MutagenFrame frame,
+ TypedParseParams translationParams)
+ {
+ CopyInFromBinary(
+ item: (DisplayCaseComponent)item,
+ frame: frame,
+ translationParams: translationParams);
+ }
+
+ #endregion
+
+ }
+ internal partial class DisplayCaseComponentCommon : AComponentCommon
+ {
+ public new static readonly DisplayCaseComponentCommon Instance = new DisplayCaseComponentCommon();
+
+ public DisplayCaseComponent.Mask GetEqualsMask(
+ IDisplayCaseComponentGetter item,
+ IDisplayCaseComponentGetter rhs,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ var ret = new DisplayCaseComponent.Mask(false);
+ ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).FillEqualsMask(
+ item: item,
+ rhs: rhs,
+ ret: ret,
+ include: include);
+ return ret;
+ }
+
+ public void FillEqualsMask(
+ IDisplayCaseComponentGetter item,
+ IDisplayCaseComponentGetter rhs,
+ DisplayCaseComponent.Mask ret,
+ EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
+ {
+ ret.Items = item.Items.CollectionEqualsHelper(
+ rhs.Items,
+ (loqLhs, loqRhs) => loqLhs.GetEqualsMask(loqRhs, include),
+ include);
+ ret.DCED = item.DCED.CollectionEqualsHelper(
+ rhs.DCED,
+ (l, r) => l == r,
+ include);
+ base.FillEqualsMask(item, rhs, ret, include);
+ }
+
+ public string Print(
+ IDisplayCaseComponentGetter item,
+ string? name = null,
+ DisplayCaseComponent.Mask? printMask = null)
+ {
+ var sb = new StructuredStringBuilder();
+ Print(
+ item: item,
+ sb: sb,
+ name: name,
+ printMask: printMask);
+ return sb.ToString();
+ }
+
+ public void Print(
+ IDisplayCaseComponentGetter item,
+ StructuredStringBuilder sb,
+ string? name = null,
+ DisplayCaseComponent.Mask? printMask = null)
+ {
+ if (name == null)
+ {
+ sb.AppendLine($"DisplayCaseComponent =>");
+ }
+ else
+ {
+ sb.AppendLine($"{name} (DisplayCaseComponent) =>");
+ }
+ using (sb.Brace())
+ {
+ ToStringFields(
+ item: item,
+ sb: sb,
+ printMask: printMask);
+ }
+ }
+
+ protected static void ToStringFields(
+ IDisplayCaseComponentGetter item,
+ StructuredStringBuilder sb,
+ DisplayCaseComponent.Mask? printMask = null)
+ {
+ AComponentCommon.ToStringFields(
+ item: item,
+ sb: sb,
+ printMask: printMask);
+ if ((printMask?.Items?.Overall ?? true)
+ && item.Items is {} ItemsItem)
+ {
+ sb.AppendLine("Items =>");
+ using (sb.Brace())
+ {
+ foreach (var subItem in ItemsItem)
+ {
+ using (sb.Brace())
+ {
+ subItem?.Print(sb, "Item");
+ }
+ }
+ }
+ }
+ if ((printMask?.DCED?.Overall ?? true)
+ && item.DCED is {} DCEDItem)
+ {
+ sb.AppendLine("DCED =>");
+ using (sb.Brace())
+ {
+ foreach (var subItem in DCEDItem)
+ {
+ using (sb.Brace())
+ {
+ sb.AppendItem(subItem);
+ }
+ }
+ }
+ }
+ }
+
+ public static DisplayCaseComponent_FieldIndex ConvertFieldIndex(AComponent_FieldIndex index)
+ {
+ switch (index)
+ {
+ default:
+ throw new ArgumentException($"Index is out of range: {index.ToStringFast()}");
+ }
+ }
+
+ #region Equals and Hash
+ public virtual bool Equals(
+ IDisplayCaseComponentGetter? lhs,
+ IDisplayCaseComponentGetter? rhs,
+ TranslationCrystal? equalsMask)
+ {
+ if (!EqualsMaskHelper.RefEquality(lhs, rhs, out var isEqual)) return isEqual;
+ if (!base.Equals((IAComponentGetter)lhs, (IAComponentGetter)rhs, equalsMask)) return false;
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponent_FieldIndex.Items) ?? true))
+ {
+ if (!lhs.Items.SequenceEqualNullable(rhs.Items, (l, r) => ((DisplayCaseComponentItemCommon)((IDisplayCaseComponentItemGetter)l).CommonInstance()!).Equals(l, r, equalsMask?.GetSubCrystal((int)DisplayCaseComponent_FieldIndex.Items)))) return false;
+ }
+ if ((equalsMask?.GetShouldTranslate((int)DisplayCaseComponent_FieldIndex.DCED) ?? true))
+ {
+ if (!lhs.DCED.SequenceEqualNullable(rhs.DCED)) return false;
+ }
+ return true;
+ }
+
+ public override bool Equals(
+ IAComponentGetter? lhs,
+ IAComponentGetter? rhs,
+ TranslationCrystal? equalsMask)
+ {
+ return Equals(
+ lhs: (IDisplayCaseComponentGetter?)lhs,
+ rhs: rhs as IDisplayCaseComponentGetter,
+ equalsMask: equalsMask);
+ }
+
+ public virtual int GetHashCode(IDisplayCaseComponentGetter item)
+ {
+ var hash = new HashCode();
+ hash.Add(item.Items);
+ hash.Add(item.DCED);
+ hash.Add(base.GetHashCode());
+ return hash.ToHashCode();
+ }
+
+ public override int GetHashCode(IAComponentGetter item)
+ {
+ return GetHashCode(item: (IDisplayCaseComponentGetter)item);
+ }
+
+ #endregion
+
+
+ public override object GetNew()
+ {
+ return DisplayCaseComponent.GetNew();
+ }
+
+ #region Mutagen
+ public IEnumerable EnumerateFormLinks(IDisplayCaseComponentGetter obj)
+ {
+ foreach (var item in base.EnumerateFormLinks(obj))
+ {
+ yield return item;
+ }
+ if (obj.Items is {} ItemsItem)
+ {
+ foreach (var item in ItemsItem.SelectMany(f => f.EnumerateFormLinks()))
+ {
+ yield return FormLinkInformation.Factory(item);
+ }
+ }
+ yield break;
+ }
+
+ #endregion
+
+ }
+ internal partial class DisplayCaseComponentSetterTranslationCommon : AComponentSetterTranslationCommon
+ {
+ public new static readonly DisplayCaseComponentSetterTranslationCommon Instance = new DisplayCaseComponentSetterTranslationCommon();
+
+ #region DeepCopyIn
+ public void DeepCopyIn(
+ IDisplayCaseComponent item,
+ IDisplayCaseComponentGetter rhs,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask,
+ bool deepCopy)
+ {
+ base.DeepCopyIn(
+ (IAComponent)item,
+ (IAComponentGetter)rhs,
+ errorMask,
+ copyMask,
+ deepCopy: deepCopy);
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponent_FieldIndex.Items) ?? true))
+ {
+ errorMask?.PushIndex((int)DisplayCaseComponent_FieldIndex.Items);
+ try
+ {
+ if ((rhs.Items != null))
+ {
+ item.Items =
+ rhs.Items
+ .Select(r =>
+ {
+ return r.DeepCopy(
+ errorMask: errorMask,
+ default(TranslationCrystal));
+ })
+ .ToExtendedList();
+ }
+ else
+ {
+ item.Items = null;
+ }
+ }
+ catch (Exception ex)
+ when (errorMask != null)
+ {
+ errorMask.ReportException(ex);
+ }
+ finally
+ {
+ errorMask?.PopIndex();
+ }
+ }
+ if ((copyMask?.GetShouldTranslate((int)DisplayCaseComponent_FieldIndex.DCED) ?? true))
+ {
+ errorMask?.PushIndex((int)DisplayCaseComponent_FieldIndex.DCED);
+ try
+ {
+ if ((rhs.DCED != null))
+ {
+ item.DCED =
+ rhs.DCED
+ .ToExtendedList();
+ }
+ else
+ {
+ item.DCED = null;
+ }
+ }
+ catch (Exception ex)
+ when (errorMask != null)
+ {
+ errorMask.ReportException(ex);
+ }
+ finally
+ {
+ errorMask?.PopIndex();
+ }
+ }
+ }
+
+
+ public override void DeepCopyIn(
+ IAComponent item,
+ IAComponentGetter rhs,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask,
+ bool deepCopy)
+ {
+ this.DeepCopyIn(
+ item: (IDisplayCaseComponent)item,
+ rhs: (IDisplayCaseComponentGetter)rhs,
+ errorMask: errorMask,
+ copyMask: copyMask,
+ deepCopy: deepCopy);
+ }
+
+ #endregion
+
+ public DisplayCaseComponent DeepCopy(
+ IDisplayCaseComponentGetter item,
+ DisplayCaseComponent.TranslationMask? copyMask = null)
+ {
+ DisplayCaseComponent ret = (DisplayCaseComponent)((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: ret,
+ rhs: item,
+ errorMask: null,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: true);
+ return ret;
+ }
+
+ public DisplayCaseComponent DeepCopy(
+ IDisplayCaseComponentGetter item,
+ out DisplayCaseComponent.ErrorMask errorMask,
+ DisplayCaseComponent.TranslationMask? copyMask = null)
+ {
+ var errorMaskBuilder = new ErrorMaskBuilder();
+ DisplayCaseComponent ret = (DisplayCaseComponent)((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ ret,
+ item,
+ errorMask: errorMaskBuilder,
+ copyMask: copyMask?.GetCrystal(),
+ deepCopy: true);
+ errorMask = DisplayCaseComponent.ErrorMask.Factory(errorMaskBuilder);
+ return ret;
+ }
+
+ public DisplayCaseComponent DeepCopy(
+ IDisplayCaseComponentGetter item,
+ ErrorMaskBuilder? errorMask,
+ TranslationCrystal? copyMask = null)
+ {
+ DisplayCaseComponent ret = (DisplayCaseComponent)((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)item).CommonInstance()!).GetNew();
+ ((DisplayCaseComponentSetterTranslationCommon)((IDisplayCaseComponentGetter)ret).CommonSetterTranslationInstance()!).DeepCopyIn(
+ item: ret,
+ rhs: item,
+ errorMask: errorMask,
+ copyMask: copyMask,
+ deepCopy: true);
+ return ret;
+ }
+
+ }
+ #endregion
+
+}
+
+namespace Mutagen.Bethesda.Starfield
+{
+ public partial class DisplayCaseComponent
+ {
+ #region Common Routing
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ ILoquiRegistration ILoquiObject.Registration => DisplayCaseComponent_Registration.Instance;
+ public new static ILoquiRegistration StaticRegistration => DisplayCaseComponent_Registration.Instance;
+ [DebuggerStepThrough]
+ protected override object CommonInstance() => DisplayCaseComponentCommon.Instance;
+ [DebuggerStepThrough]
+ protected override object CommonSetterInstance()
+ {
+ return DisplayCaseComponentSetterCommon.Instance;
+ }
+ [DebuggerStepThrough]
+ protected override object CommonSetterTranslationInstance() => DisplayCaseComponentSetterTranslationCommon.Instance;
+
+ #endregion
+
+ }
+}
+
+#region Modules
+#region Binary Translation
+namespace Mutagen.Bethesda.Starfield
+{
+ public partial class DisplayCaseComponentBinaryWriteTranslation :
+ AComponentBinaryWriteTranslation,
+ IBinaryWriteTranslator
+ {
+ public new static readonly DisplayCaseComponentBinaryWriteTranslation Instance = new();
+
+ public static void WriteRecordTypes(
+ IDisplayCaseComponentGetter item,
+ MutagenWriter writer,
+ TypedWriteParams translationParams)
+ {
+ AComponentBinaryWriteTranslation.WriteRecordTypes(
+ item: item,
+ writer: writer,
+ translationParams: translationParams);
+ Mutagen.Bethesda.Plugins.Binary.Translations.ListBinaryTranslation.Instance.Write(
+ writer: writer,
+ items: item.Items,
+ recordType: translationParams.ConvertToCustom(RecordTypes.DCSD),
+ transl: (MutagenWriter subWriter, IDisplayCaseComponentItemGetter subItem, TypedWriteParams conv) =>
+ {
+ var Item = subItem;
+ ((DisplayCaseComponentItemBinaryWriteTranslation)((IBinaryItem)Item).BinaryWriteTranslator).Write(
+ item: Item,
+ writer: subWriter,
+ translationParams: conv);
+ });
+ Mutagen.Bethesda.Plugins.Binary.Translations.ListBinaryTranslation.Instance.Write(
+ writer: writer,
+ items: item.DCED,
+ recordType: translationParams.ConvertToCustom(RecordTypes.DCED),
+ transl: UInt32BinaryTranslation.Instance.Write);
+ }
+
+ public void Write(
+ MutagenWriter writer,
+ IDisplayCaseComponentGetter item,
+ TypedWriteParams translationParams)
+ {
+ WriteRecordTypes(
+ item: item,
+ writer: writer,
+ translationParams: translationParams);
+ using (HeaderExport.Subrecord(writer, RecordTypes.BFCE)) { } // End Marker
+ }
+
+ public override void Write(
+ MutagenWriter writer,
+ object item,
+ TypedWriteParams translationParams = default)
+ {
+ Write(
+ item: (IDisplayCaseComponentGetter)item,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ public override void Write(
+ MutagenWriter writer,
+ IAComponentGetter item,
+ TypedWriteParams translationParams)
+ {
+ Write(
+ item: (IDisplayCaseComponentGetter)item,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ }
+
+ internal partial class DisplayCaseComponentBinaryCreateTranslation : AComponentBinaryCreateTranslation
+ {
+ public new static readonly DisplayCaseComponentBinaryCreateTranslation Instance = new DisplayCaseComponentBinaryCreateTranslation();
+
+ public static ParseResult FillBinaryRecordTypes(
+ IDisplayCaseComponent item,
+ MutagenFrame frame,
+ PreviousParse lastParsed,
+ Dictionary? recordParseCount,
+ RecordType nextRecordType,
+ int contentLength,
+ TypedParseParams translationParams = default)
+ {
+ nextRecordType = translationParams.ConvertToStandard(nextRecordType);
+ switch (nextRecordType.TypeInt)
+ {
+ case RecordTypeInts.DCSD:
+ {
+ frame.Position += frame.MetaData.Constants.SubConstants.HeaderLength;
+ item.Items =
+ Mutagen.Bethesda.Plugins.Binary.Translations.ListBinaryTranslation.Instance.Parse(
+ reader: frame.SpawnWithLength(contentLength),
+ transl: DisplayCaseComponentItem.TryCreateFromBinary)
+ .CastExtendedList();
+ return (int)DisplayCaseComponent_FieldIndex.Items;
+ }
+ case RecordTypeInts.DCED:
+ {
+ frame.Position += frame.MetaData.Constants.SubConstants.HeaderLength;
+ item.DCED =
+ Mutagen.Bethesda.Plugins.Binary.Translations.ListBinaryTranslation.Instance.Parse(
+ reader: frame.SpawnWithLength(contentLength),
+ transl: UInt32BinaryTranslation.Instance.Parse)
+ .CastExtendedList();
+ return (int)DisplayCaseComponent_FieldIndex.DCED;
+ }
+ default:
+ return AComponentBinaryCreateTranslation.FillBinaryRecordTypes(
+ item: item,
+ frame: frame,
+ lastParsed: lastParsed,
+ recordParseCount: recordParseCount,
+ nextRecordType: nextRecordType,
+ contentLength: contentLength,
+ translationParams: translationParams.WithNoConverter());
+ }
+ }
+
+ }
+
+}
+namespace Mutagen.Bethesda.Starfield
+{
+ #region Binary Write Mixins
+ public static class DisplayCaseComponentBinaryTranslationMixIn
+ {
+ }
+ #endregion
+
+
+}
+namespace Mutagen.Bethesda.Starfield
+{
+ internal partial class DisplayCaseComponentBinaryOverlay :
+ AComponentBinaryOverlay,
+ IDisplayCaseComponentGetter
+ {
+ #region Common Routing
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ ILoquiRegistration ILoquiObject.Registration => DisplayCaseComponent_Registration.Instance;
+ public new static ILoquiRegistration StaticRegistration => DisplayCaseComponent_Registration.Instance;
+ [DebuggerStepThrough]
+ protected override object CommonInstance() => DisplayCaseComponentCommon.Instance;
+ [DebuggerStepThrough]
+ protected override object CommonSetterTranslationInstance() => DisplayCaseComponentSetterTranslationCommon.Instance;
+
+ #endregion
+
+ void IPrintable.Print(StructuredStringBuilder sb, string? name) => this.Print(sb, name);
+
+ public override IEnumerable EnumerateFormLinks() => DisplayCaseComponentCommon.Instance.EnumerateFormLinks(this);
+ [DebuggerBrowsable(DebuggerBrowsableState.Never)]
+ protected override object BinaryWriteTranslator => DisplayCaseComponentBinaryWriteTranslation.Instance;
+ void IBinaryItem.WriteToBinary(
+ MutagenWriter writer,
+ TypedWriteParams translationParams = default)
+ {
+ ((DisplayCaseComponentBinaryWriteTranslation)this.BinaryWriteTranslator).Write(
+ item: this,
+ writer: writer,
+ translationParams: translationParams);
+ }
+
+ public IReadOnlyList? Items { get; private set; }
+ public IReadOnlyList? DCED { get; private set; }
+ partial void CustomFactoryEnd(
+ OverlayStream stream,
+ int finalPos,
+ int offset);
+
+ partial void CustomCtor();
+ protected DisplayCaseComponentBinaryOverlay(
+ MemoryPair memoryPair,
+ BinaryOverlayFactoryPackage package)
+ : base(
+ memoryPair: memoryPair,
+ package: package)
+ {
+ this.CustomCtor();
+ }
+
+ public static IDisplayCaseComponentGetter DisplayCaseComponentFactory(
+ OverlayStream stream,
+ BinaryOverlayFactoryPackage package,
+ TypedParseParams translationParams = default)
+ {
+ stream = ExtractTypelessSubrecordRecordMemory(
+ stream: stream,
+ meta: package.MetaData.Constants,
+ translationParams: translationParams,
+ memoryPair: out var memoryPair,
+ offset: out var offset,
+ finalPos: out var finalPos);
+ var ret = new DisplayCaseComponentBinaryOverlay(
+ memoryPair: memoryPair,
+ package: package);
+ ret.FillTypelessSubrecordTypes(
+ stream: stream,
+ finalPos: stream.Length,
+ offset: offset,
+ translationParams: translationParams,
+ fill: ret.FillRecordType);
+ return ret;
+ }
+
+ public static IDisplayCaseComponentGetter DisplayCaseComponentFactory(
+ ReadOnlyMemorySlice slice,
+ BinaryOverlayFactoryPackage package,
+ TypedParseParams translationParams = default)
+ {
+ return DisplayCaseComponentFactory(
+ stream: new OverlayStream(slice, package),
+ package: package,
+ translationParams: translationParams);
+ }
+
+ public override ParseResult FillRecordType(
+ OverlayStream stream,
+ int finalPos,
+ int offset,
+ RecordType type,
+ PreviousParse lastParsed,
+ Dictionary? recordParseCount,
+ TypedParseParams translationParams = default)
+ {
+ type = translationParams.ConvertToStandard(type);
+ switch (type.TypeInt)
+ {
+ case RecordTypeInts.DCSD:
+ {
+ var subMeta = stream.ReadSubrecordHeader();
+ var subLen = finalPos - stream.Position;
+ this.Items = BinaryOverlayList.FactoryByStartIndex(
+ mem: stream.RemainingMemory.Slice(0, subLen),
+ package: _package,
+ itemLength: 16,
+ getter: (s, p) => DisplayCaseComponentItemBinaryOverlay.DisplayCaseComponentItemFactory(s, p));
+ stream.Position += subLen;
+ return (int)DisplayCaseComponent_FieldIndex.Items;
+ }
+ case RecordTypeInts.DCED:
+ {
+ var subMeta = stream.ReadSubrecordHeader();
+ var subLen = finalPos - stream.Position;
+ this.DCED = BinaryOverlayList.FactoryByStartIndex(
+ mem: stream.RemainingMemory.Slice(0, subLen),
+ package: _package,
+ itemLength: 4,
+ getter: (s, p) => BinaryPrimitives.ReadUInt32LittleEndian(s));
+ stream.Position += subLen;
+ return (int)DisplayCaseComponent_FieldIndex.DCED;
+ }
+ default:
+ return base.FillRecordType(
+ stream: stream,
+ finalPos: finalPos,
+ offset: offset,
+ type: type,
+ lastParsed: lastParsed,
+ recordParseCount: recordParseCount,
+ translationParams: translationParams.WithNoConverter());
+ }
+ }
+ #region To String
+
+ public override void Print(
+ StructuredStringBuilder sb,
+ string? name = null)
+ {
+ DisplayCaseComponentMixIn.Print(
+ item: this,
+ sb: sb,
+ name: name);
+ }
+
+ #endregion
+
+ #region Equals and Hash
+ public override bool Equals(object? obj)
+ {
+ if (obj is not IDisplayCaseComponentGetter rhs) return false;
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).Equals(this, rhs, equalsMask: null);
+ }
+
+ public bool Equals(IDisplayCaseComponentGetter? obj)
+ {
+ return ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).Equals(this, obj, equalsMask: null);
+ }
+
+ public override int GetHashCode() => ((DisplayCaseComponentCommon)((IDisplayCaseComponentGetter)this).CommonInstance()!).GetHashCode(this);
+
+ #endregion
+
+ }
+
+}
+#endregion
+
+#endregion
+
diff --git a/Mutagen.Bethesda.Starfield/Records/Major Records/Container.cs b/Mutagen.Bethesda.Starfield/Records/Major Records/Container.cs
new file mode 100644
index 0000000000..d232d5084a
--- /dev/null
+++ b/Mutagen.Bethesda.Starfield/Records/Major Records/Container.cs
@@ -0,0 +1,23 @@
+namespace Mutagen.Bethesda.Starfield;
+
+public partial class Container
+{
+ [Flags]
+ public enum MajorFlag
+ {
+ HasDistantLod = 0x0000_8000,
+ RandomAnimStart = 0x0001_0000,
+ Obstacle = 0x0200_0000,
+ NavMeshGenerationFilter = 0x0400_0000,
+ NavMeshGenerationBoundingBox = 0x0800_0000,
+ NavMeshGenerationGround = 0x4000_0000
+ }
+
+ [Flags]
+ public enum Flag
+ {
+ AllowSoundsWhenAnimation = 0x01,
+ Respawns = 0x02,
+ ShowOwner = 0x04
+ }
+}
\ No newline at end of file
diff --git a/Mutagen.Bethesda.Starfield/Records/Major Records/Container.xml b/Mutagen.Bethesda.Starfield/Records/Major Records/Container.xml
index d6c6f4619f..2ac836e145 100644
--- a/Mutagen.Bethesda.Starfield/Records/Major Records/Container.xml
+++ b/Mutagen.Bethesda.Starfield/Records/Major Records/Container.xml
@@ -1,7 +1,40 @@
-