コード例 #1
0
 public virtual void Write(
     MutagenWriter writer,
     IGameSettingGetter item,
     RecordTypeConverter?recordTypeConverter = null)
 {
     using (HeaderExport.Header(
                writer: writer,
                record: recordTypeConverter.ConvertToCustom(RecordTypes.GMST),
                type: Mutagen.Bethesda.Binary.ObjectType.Record))
     {
         try
         {
             OblivionMajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             MajorRecordBinaryWriteTranslation.WriteRecordTypes(
                 item: item,
                 writer: writer,
                 recordTypeConverter: recordTypeConverter);
         }
         catch (Exception ex)
         {
             throw RecordException.Enrich(ex, item);
         }
     }
 }
コード例 #2
0
 public virtual GameSetting Duplicate(
     IGameSettingGetter item,
     FormKey formKey,
     TranslationCrystal?copyMask)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 public virtual void Write(
     MutagenWriter writer,
     IGameSettingGetter item,
     TypedWriteParams?translationParams = null)
 {
     using (HeaderExport.Record(
                writer: writer,
                record: translationParams.ConvertToCustom(RecordTypes.GMST)))
     {
         try
         {
             SkyrimMajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             MajorRecordBinaryWriteTranslation.WriteRecordTypes(
                 item: item,
                 writer: writer,
                 translationParams: translationParams);
         }
         catch (Exception ex)
         {
             throw RecordException.Enrich(ex, item);
         }
     }
 }
コード例 #4
0
        public virtual int GetHashCode(IGameSettingGetter item)
        {
            var hash = new HashCode();

            hash.Add(base.GetHashCode());
            return(hash.ToHashCode());
        }
コード例 #5
0
 public static bool Equals(
     this IGameSettingGetter item,
     IGameSettingGetter rhs)
 {
     return(((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs));
 }
コード例 #6
0
 public IEnumerable <FormKey> GetLinkFormKeys(IGameSettingGetter obj)
 {
     foreach (var item in base.GetLinkFormKeys(obj))
     {
         yield return(item);
     }
     yield break;
 }
コード例 #7
0
 public static GameSetting DeepCopy(
     this IGameSettingGetter item,
     GameSetting.TranslationMask?copyMask = null)
 {
     return(((GameSettingSetterTranslationCommon)((IGameSettingGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask));
 }
コード例 #8
0
 public IEnumerable <FormLinkInformation> GetContainedFormLinks(IGameSettingGetter obj)
 {
     foreach (var item in base.GetContainedFormLinks(obj))
     {
         yield return(item);
     }
     yield break;
 }
コード例 #9
0
 public static string ToString(
     this IGameSettingGetter item,
     string?name = null,
     GameSetting.Mask <bool>?printMask = null)
 {
     return(((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).ToString(
                item: item,
                name: name,
                printMask: printMask));
 }
コード例 #10
0
 public static GameSetting Duplicate(
     this IGameSettingGetter item,
     FormKey formKey,
     GameSetting.TranslationMask?copyMask = null)
 {
     return(((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).Duplicate(
                item: item,
                formKey: formKey,
                copyMask: copyMask?.GetCrystal()));
 }
コード例 #11
0
 public static bool Equals(
     this IGameSettingGetter item,
     IGameSettingGetter rhs,
     GameSetting.TranslationMask?equalsMask = null)
 {
     return(((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs,
                crystal: equalsMask?.GetCrystal()));
 }
コード例 #12
0
 public static GameSetting DeepCopy(
     this IGameSettingGetter item,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask = null)
 {
     return(((GameSettingSetterTranslationCommon)((IGameSettingGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask,
                errorMask: errorMask));
 }
コード例 #13
0
 protected static void ToStringFields(
     IGameSettingGetter item,
     FileGeneration fg,
     GameSetting.Mask <bool>?printMask = null)
 {
     OblivionMajorRecordCommon.ToStringFields(
         item: item,
         fg: fg,
         printMask: printMask);
 }
コード例 #14
0
 public static GameSetting.Mask <bool> GetEqualsMask(
     this IGameSettingGetter item,
     IGameSettingGetter rhs,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     return(((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).GetEqualsMask(
                item: item,
                rhs: rhs,
                include: include));
 }
コード例 #15
0
 public void FillEqualsMask(
     IGameSettingGetter item,
     IGameSettingGetter rhs,
     GameSetting.Mask <bool> ret,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     if (rhs == null)
     {
         return;
     }
     base.FillEqualsMask(item, rhs, ret, include);
 }
コード例 #16
0
 public static void ToString(
     this IGameSettingGetter item,
     FileGeneration fg,
     string?name = null,
     GameSetting.Mask <bool>?printMask = null)
 {
     ((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).ToString(
         item: item,
         fg: fg,
         name: name,
         printMask: printMask);
 }
コード例 #17
0
 public static void DeepCopyIn(
     this IGameSettingInternal lhs,
     IGameSettingGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask)
 {
     ((GameSettingSetterTranslationCommon)((IGameSettingGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
         item: lhs,
         rhs: rhs,
         errorMask: errorMask,
         copyMask: copyMask,
         deepCopy: false);
 }
コード例 #18
0
        public GameSetting DeepCopy(
            IGameSettingGetter item,
            GameSetting.TranslationMask?copyMask = null)
        {
            GameSetting ret = (GameSetting)((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).GetNew();

            ((GameSettingSetterTranslationCommon)((IGameSettingGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: null,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            return(ret);
        }
コード例 #19
0
        public string ToString(
            IGameSettingGetter item,
            string?name = null,
            GameSetting.Mask <bool>?printMask = null)
        {
            var fg = new FileGeneration();

            ToString(
                item: item,
                fg: fg,
                name: name,
                printMask: printMask);
            return(fg.ToString());
        }
コード例 #20
0
        public GameSetting.Mask <bool> GetEqualsMask(
            IGameSettingGetter item,
            IGameSettingGetter rhs,
            EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
        {
            var ret = new GameSetting.Mask <bool>(false);

            ((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).FillEqualsMask(
                item: item,
                rhs: rhs,
                ret: ret,
                include: include);
            return(ret);
        }
コード例 #21
0
 public virtual void DeepCopyIn(
     IGameSetting item,
     IGameSettingGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         (IOblivionMajorRecord)item,
         (IOblivionMajorRecordGetter)rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
コード例 #22
0
 public virtual void DeepCopyIn(
     IGameSettingInternal item,
     IGameSettingGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         item,
         rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
コード例 #23
0
        public GameSetting DeepCopy(
            IGameSettingGetter item,
            ErrorMaskBuilder?errorMask,
            TranslationCrystal?copyMask = null)
        {
            GameSetting ret = (GameSetting)((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).GetNew();

            ((GameSettingSetterTranslationCommon)((IGameSettingGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: errorMask,
                copyMask: copyMask,
                deepCopy: true);
            return(ret);
        }
コード例 #24
0
        public static void DeepCopyIn(
            this IGameSettingInternal lhs,
            IGameSettingGetter rhs,
            out GameSetting.ErrorMask errorMask,
            GameSetting.TranslationMask?copyMask = null)
        {
            var errorMaskBuilder = new ErrorMaskBuilder();

            ((GameSettingSetterTranslationCommon)((IGameSettingGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: lhs,
                rhs: rhs,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: false);
            errorMask = GameSetting.ErrorMask.Factory(errorMaskBuilder);
        }
コード例 #25
0
        public GameSetting DeepCopy(
            IGameSettingGetter item,
            out GameSetting.ErrorMask errorMask,
            GameSetting.TranslationMask?copyMask = null)
        {
            var         errorMaskBuilder = new ErrorMaskBuilder();
            GameSetting ret = (GameSetting)((GameSettingCommon)((IGameSettingGetter)item).CommonInstance() !).GetNew();

            ((GameSettingSetterTranslationCommon)((IGameSettingGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                ret,
                item,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            errorMask = GameSetting.ErrorMask.Factory(errorMaskBuilder);
            return(ret);
        }
コード例 #26
0
 public void ToString(
     IGameSettingGetter item,
     FileGeneration fg,
     string?name = null,
     GameSetting.Mask <bool>?printMask = null)
 {
     if (name == null)
     {
         fg.AppendLine($"GameSetting =>");
     }
     else
     {
         fg.AppendLine($"{name} (GameSetting) =>");
     }
     fg.AppendLine("[");
     using (new DepthWrapper(fg))
     {
         ToStringFields(
             item: item,
             fg: fg,
             printMask: printMask);
     }
     fg.AppendLine("]");
 }
コード例 #27
0
        private void SetFloat(IGameSettingGetter gs, float value)
        {
            var r = (IGameSettingFloat)Patch.GameSettings.GetOrAddAsOverride(gs);

            r.Data = value;
        }
コード例 #28
0
 public void RemapLinks(IGameSettingGetter obj, IReadOnlyDictionary <FormKey, FormKey> mapping) => throw new NotImplementedException();