Пример #1
0
 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);
 }
Пример #2
0
 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;
 }