|
|
|
|
@ -2,64 +2,82 @@
|
|
|
|
|
|
|
|
|
|
namespace AM2RModPackerLib.XML;
|
|
|
|
|
|
|
|
|
|
//TODO: sync this with the launcher xml, a bunch more comments are in there.
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Class that handles how the modmeta settings are saved as XML.
|
|
|
|
|
/// Class that handles how the mod settings are saved as XML.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
[XmlRoot("message")]
|
|
|
|
|
public class ModProfileXML
|
|
|
|
|
{
|
|
|
|
|
/// <summary>Indicates the Operating system the mod was made for.</summary>
|
|
|
|
|
[XmlAttribute("OperatingSystem")]
|
|
|
|
|
public string OperatingSystem
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates the xml version the mod was made in.</summary>
|
|
|
|
|
[XmlAttribute("XMLVersion")]
|
|
|
|
|
public int XMLVersion
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates the version of the mod.</summary>
|
|
|
|
|
[XmlAttribute("Version")]
|
|
|
|
|
public string Version
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates the mod's name.</summary>
|
|
|
|
|
[XmlAttribute("Name")]
|
|
|
|
|
public string Name
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates the mod's author.</summary>
|
|
|
|
|
[XmlAttribute("Author")]
|
|
|
|
|
public string Author
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates whether or not the mod uses custom music.</summary>
|
|
|
|
|
[XmlAttribute("UsesCustomMusic")]
|
|
|
|
|
public bool UsesCustomMusic
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates the save location of the mod.</summary>
|
|
|
|
|
[XmlAttribute("SaveLocation")]
|
|
|
|
|
public string SaveLocation
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates whether or not the mod supports Android.</summary>
|
|
|
|
|
[XmlAttribute("SupportsAndroid")]
|
|
|
|
|
public bool Android
|
|
|
|
|
public bool SupportsAndroid
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates whether or not the mod was compiled with YYC.</summary>
|
|
|
|
|
[XmlAttribute("UsesYYC")]
|
|
|
|
|
public bool UsesYYC
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates if the mod is installable. This is only <see langword="false"/> for archival community updates mods.</summary>
|
|
|
|
|
[XmlAttribute("Installable")]
|
|
|
|
|
public bool Installable
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>Indicates any notes that the mod author deemed worthy to share about his mod.</summary>
|
|
|
|
|
[XmlAttribute("ProfileNotes")]
|
|
|
|
|
public string ProfileNotes
|
|
|
|
|
{ get; set; }
|
|
|
|
|
|
|
|
|
|
// TODO: this should fill in sensible default values
|
|
|
|
|
/// <summary>Creates a <see cref="ModProfileXML"/> with a default set of attributes.</summary>
|
|
|
|
|
public ModProfileXML()
|
|
|
|
|
{ }
|
|
|
|
|
{
|
|
|
|
|
XMLVersion = 1;
|
|
|
|
|
Installable = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ModProfileXML(string operatingSystem, int xmlVersion, string version, string name, string author, bool usesCustomMusic, string saveLocation, bool android, bool usesYYC, string profileNotes, bool installable = true)
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a <see cref="ModProfileXML"/> with a custom set of attributes.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="operatingSystem">The operating system the mod was made on.</param>
|
|
|
|
|
/// <param name="xmlVersion">The xml version the mod was created with.</param>
|
|
|
|
|
/// <param name="version">The version of the mod.</param>
|
|
|
|
|
/// <param name="name">The mod name.</param>
|
|
|
|
|
/// <param name="author">The mod author.</param>
|
|
|
|
|
/// <param name="usesCustomMusic">Whether or not the mod uses custom music.</param>
|
|
|
|
|
/// <param name="saveLocation">The save location of the mod.</param>
|
|
|
|
|
/// <param name="android">Whether or not the mod works for android.</param>
|
|
|
|
|
/// <param name="usesYYC">Whether or not the mod was made with YYC.</param>
|
|
|
|
|
/// <param name="installable">Whether or not the mod is installable.</param>
|
|
|
|
|
/// <param name="profileNotes">The notes of the mod.</param>
|
|
|
|
|
public ModProfileXML(string operatingSystem, int xmlVersion, string version, string name, string author,
|
|
|
|
|
bool usesCustomMusic, string saveLocation, bool android, bool usesYYC,
|
|
|
|
|
bool installable, string profileNotes)
|
|
|
|
|
{
|
|
|
|
|
OperatingSystem = operatingSystem;
|
|
|
|
|
XMLVersion = xmlVersion;
|
|
|
|
|
@ -68,9 +86,9 @@ public class ModProfileXML
|
|
|
|
|
Author = author;
|
|
|
|
|
UsesCustomMusic = usesCustomMusic;
|
|
|
|
|
SaveLocation = saveLocation;
|
|
|
|
|
Android = android;
|
|
|
|
|
SupportsAndroid = android;
|
|
|
|
|
UsesYYC = usesYYC;
|
|
|
|
|
ProfileNotes = profileNotes;
|
|
|
|
|
Installable = installable;
|
|
|
|
|
ProfileNotes = profileNotes;
|
|
|
|
|
}
|
|
|
|
|
}
|