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); }