logging
This commit is contained in:
parent
e26db4415b
commit
598faa1861
|
@ -194,6 +194,8 @@ namespace StardewModdingAPI
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
public partial class Config
|
public partial class Config
|
||||||
{
|
{
|
||||||
|
[Obsolete] public static int invalids = 0;
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
public virtual JObject JObject { get; protected set; }
|
public virtual JObject JObject { get; protected set; }
|
||||||
|
@ -201,6 +203,8 @@ namespace StardewModdingAPI
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
public static Config InitializeConfig(string configLocation, Config baseConfig)
|
public static Config InitializeConfig(string configLocation, Config baseConfig)
|
||||||
{
|
{
|
||||||
|
invalids++;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(configLocation))
|
if (string.IsNullOrEmpty(configLocation))
|
||||||
{
|
{
|
||||||
Log.Verbose("The location to save the config to must not be empty.");
|
Log.Verbose("The location to save the config to must not be empty.");
|
||||||
|
|
|
@ -33,7 +33,6 @@ namespace StardewModdingAPI
|
||||||
[Obsolete]
|
[Obsolete]
|
||||||
public virtual string Description { get; set; }
|
public virtual string Description { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The mod's manifest
|
/// The mod's manifest
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -358,6 +358,10 @@ namespace StardewModdingAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
StardewModdingAPI.Log.Success("LOADED {0} MODS", Constants.ModsLoaded);
|
StardewModdingAPI.Log.Success("LOADED {0} MODS", Constants.ModsLoaded);
|
||||||
|
if (Config.invalids > 0)
|
||||||
|
{
|
||||||
|
StardewModdingAPI.Log.Error("LOADED {0} MODS THAT HAVE INVALID CONFIG INIT CALLS\n\tTHESE MODS NEED TO UPDATE", Config.invalids);
|
||||||
|
}
|
||||||
Console.Title = Constants.ConsoleTitle;
|
Console.Title = Constants.ConsoleTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue