コード例 #1
0
ファイル: Mod.cs プロジェクト: sixxkilur/ModAPI
            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));
            }
コード例 #2
0
ファイル: Mod.cs プロジェクト: sixxkilur/ModAPI
 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);
 }