public static APackageTarget CreateFromBinary(MutagenFrame frame) { APackageTarget target = ((APackageTarget.Type)frame.ReadUInt32()) switch { APackageTarget.Type.SpecificReference => new PackageTargetSpecificReference() { Reference = new FormLink <ILinkedReferenceGetter>(FormKeyBinaryTranslation.Instance.Parse(frame)) }, APackageTarget.Type.ObjectID => new PackageTargetObjectID() { Reference = new FormLink <IObjectIdGetter>(FormKeyBinaryTranslation.Instance.Parse(frame)) }, APackageTarget.Type.ObjectType => new PackageTargetObjectType() { Type = (TargetObjectType)frame.ReadInt32() }, APackageTarget.Type.LinkedReference => new PackageTargetReference() { Reference = new FormLink <ISkyrimMajorRecordGetter>(FormKeyBinaryTranslation.Instance.Parse(frame)) }, APackageTarget.Type.RefAlias => new PackageTargetAlias() { Alias = frame.ReadInt32() }, APackageTarget.Type.Unknown => new PackageTargetUnknown() { Data = frame.ReadInt32() }, APackageTarget.Type.Self => new PackageTargetSelf() { Data = frame.ReadInt32() }, _ => throw new NotImplementedException(), }; target.CountOrDistance = frame.ReadInt32(); return(target); }
public PackageDataTarget(APackageTarget target) { Target = target; }
partial void CustomCtor() { Target = new PackageTargetObjectType(); }