Exemple #1
0
            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));
            }
Exemple #2
0
 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);
 }
Exemple #3
0
 public bool SetDescription(MultilingualValue val)
 {
     Description = val;
     return(true);
 }
Exemple #4
0
 public bool SetName(MultilingualValue val)
 {
     Name = val;
     return(true);
 }
Exemple #5
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);
 }
Exemple #6
0
 public bool SetName(MultilingualValue val)
 {
     this.Name = val;
     return true;
 }
Exemple #7
0
 public bool SetDescription(MultilingualValue val)
 {
     this.Description = val;
     return true;
 }
Exemple #8
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;
 }