public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) { Model = new Model(); } Model.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("Destructable", false, out subEle)) { if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadXML(subEle, master); } if (ele.TryPathTo("OpenSound", false, out subEle)) { if (OpenSound == null) { OpenSound = new RecordReference(); } OpenSound.ReadXML(subEle, master); } if (ele.TryPathTo("CloseSound", false, out subEle)) { if (CloseSound == null) { CloseSound = new RecordReference(); } CloseSound.ReadXML(subEle, master); } if (ele.TryPathTo("LoopingSound", false, out subEle)) { if (LoopingSound == null) { LoopingSound = new RecordReference(); } LoopingSound.ReadXML(subEle, master); } if (ele.TryPathTo("DoorFlags", false, out subEle)) { if (DoorFlags == null) { DoorFlags = new SimpleSubrecord <DoorFlags>(); } DoorFlags.ReadXML(subEle, master); } }
public override void ReadDataXML(XElement ele, ElderScrollsPlugin master) { XElement subEle; if (ele.TryPathTo("EditorID", false, out subEle)) { if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadXML(subEle, master); } if (ele.TryPathTo("ObjectBounds", false, out subEle)) { if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadXML(subEle, master); } if (ele.TryPathTo("Name", false, out subEle)) { if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadXML(subEle, master); } if (ele.TryPathTo("Model", false, out subEle)) { if (Model == null) { Model = new Model(); } Model.ReadXML(subEle, master); } if (ele.TryPathTo("Script", false, out subEle)) { if (Script == null) { Script = new RecordReference(); } Script.ReadXML(subEle, master); } if (ele.TryPathTo("Contents", false, out subEle)) { if (Contents == null) { Contents = new List <InventoryItem>(); } foreach (XElement e in subEle.Elements()) { InventoryItem tempCNTO = new InventoryItem(); tempCNTO.ReadXML(e, master); Contents.Add(tempCNTO); } } if (ele.TryPathTo("Destructable", false, out subEle)) { if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadXML(subEle, master); } if (ele.TryPathTo("Data", false, out subEle)) { if (Data == null) { Data = new ContainerData(); } Data.ReadXML(subEle, master); } if (ele.TryPathTo("OpenSound", false, out subEle)) { if (OpenSound == null) { OpenSound = new RecordReference(); } OpenSound.ReadXML(subEle, master); } if (ele.TryPathTo("CloseSound", false, out subEle)) { if (CloseSound == null) { CloseSound = new RecordReference(); } CloseSound.ReadXML(subEle, master); } if (ele.TryPathTo("Random_LoopingSound", false, out subEle)) { if (Random_LoopingSound == null) { Random_LoopingSound = new RecordReference(); } Random_LoopingSound.ReadXML(subEle, master); } }