commit
4c4d3e66fe
|
@ -34,7 +34,7 @@ namespace StardewModdingAPI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal virtual T LoadConfig<T>() where T : Config
|
public virtual T LoadConfig<T>() where T : Config
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(ConfigLocation))
|
if (string.IsNullOrEmpty(ConfigLocation))
|
||||||
{
|
{
|
||||||
|
@ -79,17 +79,26 @@ namespace StardewModdingAPI
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MUST be implemented in inheriting class!
|
/// MUST be implemented in inheriting class!
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual T GenerateBaseConfig<T>() where T : Config
|
public virtual T GenerateDefaultConfig<T>() where T : Config
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use the public GenerateDefaultConfig insteaad
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete]
|
||||||
|
protected virtual T GenerateBaseConfig<T>() where T : Config
|
||||||
|
{
|
||||||
|
return GenerateDefaultConfig<T>();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Merges a default-value config with the user-config on disk.
|
/// Merges a default-value config with the user-config on disk.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="T"></typeparam>
|
/// <typeparam name="T"></typeparam>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
internal virtual T UpdateConfig<T>() where T : Config
|
public virtual T UpdateConfig<T>() where T : Config
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -191,7 +200,6 @@ namespace StardewModdingAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete]
|
|
||||||
public partial class Config
|
public partial class Config
|
||||||
{
|
{
|
||||||
[Obsolete] public static int invalids = 0;
|
[Obsolete] public static int invalids = 0;
|
||||||
|
|
Loading…
Reference in New Issue