summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Mod.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Mod.cs')
-rw-r--r--src/StardewModdingAPI/Mod.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Mod.cs b/src/StardewModdingAPI/Mod.cs
index 171088cf..302f16ec 100644
--- a/src/StardewModdingAPI/Mod.cs
+++ b/src/StardewModdingAPI/Mod.cs
@@ -11,11 +11,14 @@ namespace StardewModdingAPI
/*********
** Properties
*********/
+#if !SMAPI_2_0
/// <summary>Manages deprecation warnings.</summary>
private static DeprecationManager DeprecationManager;
+
/// <summary>The backing field for <see cref="Mod.PathOnDisk"/>.</summary>
private string _pathOnDisk;
+#endif
/*********
@@ -30,6 +33,7 @@ namespace StardewModdingAPI
/// <summary>The mod's manifest.</summary>
public IManifest ModManifest { get; internal set; }
+#if !SMAPI_2_0
/// <summary>The full path to the mod's directory on the disk.</summary>
[Obsolete("Use " + nameof(Mod.Helper) + "." + nameof(IModHelper.DirectoryPath) + " instead")]
public string PathOnDisk
@@ -69,11 +73,13 @@ namespace StardewModdingAPI
return Context.IsSaveLoaded ? Path.Combine(this.PerSaveConfigFolder, $"{Constants.SaveFolderName}.json") : "";
}
}
+#endif
/*********
** Public methods
*********/
+#if !SMAPI_2_0
/// <summary>Injects types required for backwards compatibility.</summary>
/// <param name="deprecationManager">Manages deprecation warnings.</param>
internal static void Shim(DeprecationManager deprecationManager)
@@ -84,6 +90,7 @@ namespace StardewModdingAPI
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
[Obsolete("This overload is obsolete since SMAPI 1.0.")]
public virtual void Entry(params object[] objects) { }
+#endif
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
@@ -101,6 +108,7 @@ namespace StardewModdingAPI
/*********
** Private methods
*********/
+#if !SMAPI_2_0
/// <summary>Get the full path to the per-save configuration file for the current save (if <see cref="Manifest.PerSaveConfigs"/> is <c>true</c>).</summary>
[Obsolete]
private string GetPerSaveConfigFolder()
@@ -115,6 +123,7 @@ namespace StardewModdingAPI
}
return Path.Combine(this.PathOnDisk, "psconfigs");
}
+#endif
/// <summary>Release or reset unmanaged resources when the game exits. There's no guarantee this will be called on every exit.</summary>
/// <param name="disposing">Whether the instance is being disposed explicitly rather than finalised. If this is false, the instance shouldn't dispose other objects since they may already be finalised.</param>