Example #1
0
        public override void LoadData(BinaryReader reader, StructInstance instance)
        {
            StructDef structDef = GetIncludedStruct();

            if (structDef.FieldLike)
            {
                instance.PushAddedCellHandler(cell => cell.Tag = Tag);
            }
            bool oldHidden = instance.HideAddedCells(_hidden);

            try
            {
                structDef.LoadInstanceData(instance, reader.BaseStream);
            }
            finally
            {
                if (structDef.FieldLike)
                {
                    instance.PopAddedCellHandler();
                }
                instance.HideAddedCells(oldHidden);
            }

            if (GetBoolAttribute("replace"))
            {
                instance.SetNodeName(structDef.Name);
            }
        }
Example #2
0
        public override void LoadData(BinaryReader reader, StructInstance instance)
        {
            StructDef structDef = GetIncludedStruct();

            if (structDef.FieldLike)
                instance.PushAddedCellHandler(cell => cell.Tag = Tag);
            bool oldHidden = instance.HideAddedCells(_hidden);

            try
            {
                structDef.LoadInstanceData(instance, reader.BaseStream);
            }
            finally
            {
                if (structDef.FieldLike)
                    instance.PopAddedCellHandler();
                instance.HideAddedCells(oldHidden);
            }

            if (GetBoolAttribute("replace"))
                instance.SetNodeName(structDef.Name);
        }
Example #3
0
 public override void LoadData(BinaryReader reader, StructInstance instance)
 {
     instance.SetNodeName(GetExpressionAttribute("name").EvaluateString(instance));
 }
Example #4
0
 public override void LoadData(BinaryReader reader, StructInstance instance)
 {
     instance.SetNodeName(GetExpressionAttribute("name").EvaluateString(instance));
 }