/// <summary> /// Core code to Save the object's XML to the XmlWriter. /// </summary> /// <param name="objWriter">XmlTextWriter to write with.</param> public override void PrintInner(XmlTextWriter objWriter, bool blnIsCommlink = true, bool blnIsPersona = false) { base.PrintInner(objWriter, true, IsLivingPersona); objWriter.WriteElementString("attack", _intAttack.ToString()); objWriter.WriteElementString("sleaze", _intSleaze.ToString()); objWriter.WriteElementString("dataprocessing", _intDataProcessing.ToString()); objWriter.WriteElementString("firewall", _intFirewall.ToString()); objWriter.WriteElementString("devicerating", TotalDeviceRating.ToString()); objWriter.WriteElementString("processorlimit", ProcessorLimit.ToString()); objWriter.WriteElementString("active", _blnActiveCommlink.ToString()); }
/// <summary> /// Core code to Save the object's XML to the XmlWriter. /// </summary> /// <param name="objWriter">XmlTextWriter to write with.</param> public override void PrintInner(XmlTextWriter objWriter, bool blnIsCommlink = true) { base.PrintInner(objWriter, true); objWriter.WriteElementString("attack", GetTotalMatrixAttribute("Attack").ToString()); objWriter.WriteElementString("sleaze", GetTotalMatrixAttribute("Sleaze").ToString()); objWriter.WriteElementString("dataprocessing", GetTotalMatrixAttribute("Data Processing").ToString()); objWriter.WriteElementString("firewall", GetTotalMatrixAttribute("Firewall").ToString()); objWriter.WriteElementString("devicerating", GetTotalMatrixAttribute("Device Rating").ToString()); objWriter.WriteElementString("processorlimit", ProcessorLimit.ToString()); objWriter.WriteElementString("active", IsActive.ToString()); objWriter.WriteElementString("homenode", HomeNode.ToString()); }
/// <summary> /// Save the object's XML to the XmlWriter. /// </summary> /// <param name="objWriter">XmlTextWriter to write with.</param> public new void Print(XmlTextWriter objWriter) { objWriter.WriteStartElement("gear"); objWriter.WriteElementString("name", DisplayNameShort); objWriter.WriteElementString("name_english", _strName); if (DisplayCategory.EndsWith("s")) { objWriter.WriteElementString("category", DisplayCategory.Substring(0, DisplayCategory.Length - 1)); } else { objWriter.WriteElementString("category", DisplayCategory); } objWriter.WriteElementString("category_english", _strCategory); objWriter.WriteElementString("iscommlink", true.ToString()); objWriter.WriteElementString("ispersona", IsLivingPersona.ToString()); //objWriter.WriteElementString("isnexus", (_strCategory == "Nexus").ToString()); objWriter.WriteElementString("isammo", (_strCategory == "Ammunition").ToString()); objWriter.WriteElementString("isprogram", IsProgram.ToString()); objWriter.WriteElementString("isos", false.ToString()); objWriter.WriteElementString("issin", false.ToString()); objWriter.WriteElementString("maxrating", _intMaxRating.ToString()); objWriter.WriteElementString("rating", _intRating.ToString()); objWriter.WriteElementString("attack", _intAttack.ToString()); objWriter.WriteElementString("sleaze", _intSleaze.ToString()); objWriter.WriteElementString("dataprocessing", _intDataProcessing.ToString()); objWriter.WriteElementString("firewall", _intFirewall.ToString()); objWriter.WriteElementString("qty", _intQty.ToString()); objWriter.WriteElementString("avail", TotalAvail(true)); objWriter.WriteElementString("avail_english", TotalAvail(true, true)); objWriter.WriteElementString("cost", TotalCost.ToString()); objWriter.WriteElementString("owncost", OwnCost.ToString()); objWriter.WriteElementString("extra", LanguageManager.Instance.TranslateExtra(_strExtra)); objWriter.WriteElementString("bonded", _blnBonded.ToString()); objWriter.WriteElementString("equipped", _blnEquipped.ToString()); objWriter.WriteElementString("homenode", _blnHomeNode.ToString()); objWriter.WriteElementString("gearname", _strGearName); objWriter.WriteElementString("source", _objCharacter.Options.LanguageBookShort(_strSource)); objWriter.WriteElementString("page", Page); objWriter.WriteElementString("devicerating", TotalDeviceRating.ToString()); objWriter.WriteElementString("processorlimit", ProcessorLimit.ToString()); objWriter.WriteElementString("conditionmonitor", ConditionMonitor.ToString()); objWriter.WriteElementString("active", _blnActiveCommlink.ToString()); objWriter.WriteStartElement("children"); foreach (Gear objGear in _objChildren) { if (objGear.Category != "Commlink Upgrade" && objGear.Category != "Commlink Operating System Upgrade") { // Use the Gear's SubClass if applicable. if (objGear.GetType() == typeof(Commlink)) { Commlink objCommlink = new Commlink(_objCharacter); objCommlink = (Commlink)objGear; objCommlink.Print(objWriter); } else { objGear.Print(objWriter); } } } objWriter.WriteEndElement(); if (_objCharacter.Options.PrintNotes) { objWriter.WriteElementString("notes", _strNotes); } objWriter.WriteEndElement(); }