protected bool SetDescription(XElement element) { if (element == null) { Debug.Log("Game: " + Mod.Game.GameConfiguration.Id, "Invalid mod configuration for ID \"" + Id + "\": The description is missing.", Debug.Type.Warning); return(false); } var val = new MultilingualValue(); val.SetXml(element); return(SetDescription(val)); }
public bool SetXml(XElement element) { Id = XmlHelper.GetXmlAttributeAsString(element, "ID"); if (Id == "") { Debug.Log("Game: " + Mod.Game.GameConfiguration.Id, "Invalid mod configuration for ID \"" + Mod.Id + "\": A button is missing an ID.", Debug.Type.Warning); return(false); } StandardKey = XmlHelper.GetXmlAttributeAsString(element, "Standard"); if (element.Element("Name") == null) { Debug.Log("Game: " + Mod.Game.GameConfiguration.Id, "Invalid mod configuration for ID \"" + Mod.Id + "\": The button \"" + Id + "\" has no name.", Debug.Type.Warning); return(false); } Name = new MultilingualValue(); Name.SetXml(element.Element("Name")); Description = new MultilingualValue(); Description.SetXml(element.Element("Description")); return(true); }
public bool SetDescription(MultilingualValue val) { Description = val; return(true); }
public bool SetName(MultilingualValue val) { Name = val; return(true); }
protected bool SetName(XElement element) { if (element == null) { Debug.Log("Game: " + this.Mod.Game.GameConfiguration.ID, "Invalid mod configuration for ID \"" + this.ID + "\": The name is missing.", Debug.Type.WARNING); return false; } MultilingualValue val = new MultilingualValue(); val.SetXML(element); return SetName(val); }
public bool SetName(MultilingualValue val) { this.Name = val; return true; }
public bool SetDescription(MultilingualValue val) { this.Description = val; return true; }
public bool SetXML(XElement element) { ID = Utils.XMLHelper.GetXMLAttributeAsString(element, "ID", ""); if (ID == "") { Debug.Log("Game: " + this.Mod.Game.GameConfiguration.ID, "Invalid mod configuration for ID \"" + this.Mod.ID + "\": A button is missing an ID.", Debug.Type.WARNING); return false; } StandardKey = Utils.XMLHelper.GetXMLAttributeAsString(element, "Standard", ""); if (element.Element("Name") == null) { Debug.Log("Game: " + this.Mod.Game.GameConfiguration.ID, "Invalid mod configuration for ID \"" + this.Mod.ID + "\": The button \"" + this.ID + "\" has no name.", Debug.Type.WARNING); return false; } Name = new MultilingualValue(); Name.SetXML(element.Element("Name")); Description = new MultilingualValue(); Description.SetXML(element.Element("Description")); return true; }