public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadBinary(reader); break; case "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "DEST": if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadBinary(reader); break; case "SNAM": if (LoopingSound == null) { LoopingSound = new RecordReference(); } LoopingSound.ReadBinary(reader); break; case "VNAM": if (VoiceType == null) { VoiceType = new RecordReference(); } VoiceType.ReadBinary(reader); break; case "INAM": if (RadioTemplate == null) { RadioTemplate = new RecordReference(); } RadioTemplate.ReadBinary(reader); break; default: throw new Exception(); } } }
public override void ReadData(ESPReader reader, long dataEnd) { while (reader.BaseStream.Position < dataEnd) { string subTag = reader.PeekTag(); switch (subTag) { case "EDID": if (EditorID == null) { EditorID = new SimpleSubrecord <String>(); } EditorID.ReadBinary(reader); break; case "OBND": if (ObjectBounds == null) { ObjectBounds = new ObjectBounds(); } ObjectBounds.ReadBinary(reader); break; case "FULL": if (Name == null) { Name = new SimpleSubrecord <String>(); } Name.ReadBinary(reader); break; case "MODL": if (Model == null) { Model = new Model(); } Model.ReadBinary(reader); break; case "SCRI": if (Script == null) { Script = new RecordReference(); } Script.ReadBinary(reader); break; case "DEST": if (Destructable == null) { Destructable = new Destructable(); } Destructable.ReadBinary(reader); break; case "DESC": if (WelcomeText == null) { WelcomeText = new SimpleSubrecord <String>(); } WelcomeText.ReadBinary(reader); break; case "SNAM": if (LoopingSound == null) { LoopingSound = new RecordReference(); } LoopingSound.ReadBinary(reader); break; case "PNAM": if (Password == null) { Password = new RecordReference(); } Password.ReadBinary(reader); break; case "DNAM": if (Data == null) { Data = new TerminalData(); } Data.ReadBinary(reader); break; case "ITXT": if (Selections == null) { Selections = new List <TerminalMenu>(); } TerminalMenu tempITXT = new TerminalMenu(); tempITXT.ReadBinary(reader); Selections.Add(tempITXT); break; default: throw new Exception(); } } }