SMAPI/StardewModdingAPI/Manifest.cs

54 lines
1.5 KiB
C#
Raw Normal View History

using System;
namespace StardewModdingAPI
{
2016-03-23 08:36:04 +08:00
public class Manifest : Config
{
/// <summary>
/// The name of your mod.
/// </summary>
public virtual string Name { get; set; }
/// <summary>
/// The name of the mod's authour.
/// </summary>
public virtual string Authour { get; set; }
/// <summary>
/// The version of the mod.
/// </summary>
2016-03-24 01:43:11 +08:00
public virtual Version Version { get; set; }
/// <summary>
/// A description of the mod.
/// </summary>
public virtual string Description { get; set; }
2016-03-23 08:36:04 +08:00
/// <summary>
/// The unique ID of the mod. It doesn't *need* to be anything.
2016-03-23 08:36:04 +08:00
/// </summary>
public virtual string UniqueID { get; set; }
/// <summary>
/// Whether or not the mod uses per-save-config files.
2016-03-23 08:36:04 +08:00
/// </summary>
public virtual bool PerSaveConfigs { get; set; }
/// <summary>
/// The name of the DLL in the directory that has the Entry() method.
2016-03-23 08:36:04 +08:00
/// </summary>
public virtual string EntryDll { get; set; }
2016-03-24 01:43:11 +08:00
public override T GenerateDefaultConfig<T>()
2016-03-23 08:36:04 +08:00
{
Name = "";
Authour = "";
2016-03-24 01:43:11 +08:00
Version = new Version(0, 0, 0, "");
2016-03-23 08:36:04 +08:00
Description = "";
UniqueID = Guid.NewGuid().ToString();
PerSaveConfigs = false;
EntryDll = "";
return this as T;
2016-03-23 08:36:04 +08:00
}
}
}