Пример #1
0
            public static partial void FillBinaryUnusedConditionsLogicCustom(MutagenFrame frame, IQuestInternal item)
            {
                var nextHeader = frame.ReadSubrecordFrame();

                if (nextHeader.RecordType != RecordTypes.NEXT ||
                    nextHeader.Content.Length != 0)
                {
                    throw new ArgumentException("Unexpected NEXT header");
                }
                ConditionBinaryCreateTranslation.FillConditionsList(item.UnusedConditions, frame);
            }
Пример #2
0
            static partial void FillBinaryConditionsCustom(MutagenFrame frame, IAStoryManagerNodeInternal item)
            {
                if (!frame.TryReadSubrecordFrame(RecordTypes.CITC, out var countMeta) ||
                    countMeta.Content.Length != 4)
                {
                    throw new ArgumentException();
                }
                var count = BinaryPrimitives.ReadInt32LittleEndian(countMeta.Content);

                ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame, count);
            }
Пример #3
0
            public static ConditionBinaryOverlay ConditionFactory(OverlayStream stream, BinaryOverlayFactoryPackage package)
            {
                var subRecMeta = stream.GetSubrecordFrame();

                if (subRecMeta.RecordType != RecordTypes.CTDA)
                {
                    throw new ArgumentException();
                }
                Condition.Flag flag = ConditionBinaryCreateTranslation.GetFlag(subRecMeta.Content[0]);
                if (flag.HasFlag(Condition.Flag.UseGlobal))
                {
                    return(ConditionGlobalBinaryOverlay.ConditionGlobalFactory(stream, package));
                }
                else
                {
                    return(ConditionFloatBinaryOverlay.ConditionFloatFactory(stream, package));
                }
            }
Пример #4
0
        public static Condition CreateFromBinary(
            MutagenFrame frame,
            RecordTypeConverter?recordTypeConverter)
        {
            if (!frame.Reader.TryGetSubrecord(Mutagen.Bethesda.Fallout4.Internals.RecordTypes.CTDA, out var subRecMeta))
            {
                throw new ArgumentException();
            }
            var flagByte = frame.GetUInt8(subRecMeta.HeaderLength);

            Condition.Flag flag = ConditionBinaryCreateTranslation.GetFlag(flagByte);
            if (flag.HasFlag(Condition.Flag.UseGlobal))
            {
                return(ConditionGlobal.CreateFromBinary(frame.SpawnWithLength(subRecMeta.ContentLength, checkFraming: false)));
            }
            else
            {
                return(ConditionFloat.CreateFromBinary(frame.SpawnWithLength(subRecMeta.ContentLength, checkFraming: false)));
            }
        }
Пример #5
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, IIdleAnimationInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #6
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, IMessageButton item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #7
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, ISoundDescriptorInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #8
0
 static void FillBinaryConditionsCustom(MutagenFrame frame, IPerkInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #9
0
 public static partial void FillBinaryDialogConditionsCustom(MutagenFrame frame, IQuestInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.DialogConditions, frame);
 }
Пример #10
0
 static partial void CustomBinaryEndImport(MutagenFrame frame, IConditionFloat obj)
 {
     ConditionBinaryCreateTranslation.CustomStringImports(frame, obj.Data);
 }
Пример #11
0
 private Condition.Flag GetFlagsCustom(int location) => ConditionBinaryCreateTranslation.GetFlag(_data.Span[location]);
Пример #12
0
 static partial void FillBinaryCompletionConditionsCustom(MutagenFrame frame, IScenePhase item)
 {
     frame.ReadSubrecordFrame();
     ConditionBinaryCreateTranslation.FillConditionsList(item.CompletionConditions, frame);
 }
Пример #13
0
 static partial void FillBinaryStartConditionsCustom(MutagenFrame frame, IScenePhase item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.StartConditions, frame);
 }
Пример #14
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, IQuestLogEntry item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #15
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, IConstructibleObjectInternal item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }
Пример #16
0
 static partial void FillBinaryConditionsCustom(MutagenFrame frame, IQuestObjectiveTarget item)
 {
     ConditionBinaryCreateTranslation.FillConditionsList(item.Conditions, frame);
 }