summaryrefslogtreecommitdiff
path: root/StardewModdingAPI
diff options
context:
space:
mode:
authorZoryn <Zoryn4163@users.noreply.github.com>2016-03-23 12:54:40 -0400
committerZoryn <Zoryn4163@users.noreply.github.com>2016-03-23 12:54:40 -0400
commit4c4d3e66fe2e18c424c08a295d628432fca767cd (patch)
tree56f551afc5b492215e497955b37359b25b3554b7 /StardewModdingAPI
parent38e395094c5a17693263ba135454a2a93151f250 (diff)
parenteeb9e507da114c6121846aec6d71047bdb449ac0 (diff)
downloadSMAPI-4c4d3e66fe2e18c424c08a295d628432fca767cd.tar.gz
SMAPI-4c4d3e66fe2e18c424c08a295d628432fca767cd.tar.bz2
SMAPI-4c4d3e66fe2e18c424c08a295d628432fca767cd.zip
Merge pull request #56 from Zoryn4163/master
config updates
Diffstat (limited to 'StardewModdingAPI')
-rw-r--r--StardewModdingAPI/Config.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/StardewModdingAPI/Config.cs b/StardewModdingAPI/Config.cs
index 62c26ca4..6fb13f6e 100644
--- a/StardewModdingAPI/Config.cs
+++ b/StardewModdingAPI/Config.cs
@@ -34,7 +34,7 @@ namespace StardewModdingAPI
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
- internal virtual T LoadConfig<T>() where T : Config
+ public virtual T LoadConfig<T>() where T : Config
{
if (string.IsNullOrEmpty(ConfigLocation))
{
@@ -79,17 +79,26 @@ namespace StardewModdingAPI
/// <summary>
/// MUST be implemented in inheriting class!
/// </summary>
- protected virtual T GenerateBaseConfig<T>() where T : Config
+ public virtual T GenerateDefaultConfig<T>() where T : Config
{
return null;
}
/// <summary>
+ /// Use the public GenerateDefaultConfig insteaad
+ /// </summary>
+ [Obsolete]
+ protected virtual T GenerateBaseConfig<T>() where T : Config
+ {
+ return GenerateDefaultConfig<T>();
+ }
+
+ /// <summary>
/// Merges a default-value config with the user-config on disk.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
- internal virtual T UpdateConfig<T>() where T : Config
+ public virtual T UpdateConfig<T>() where T : Config
{
try
{
@@ -191,7 +200,6 @@ namespace StardewModdingAPI
}
}
- [Obsolete]
public partial class Config
{
[Obsolete] public static int invalids = 0;