summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-29 20:09:33 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-12-29 20:09:33 -0500
commitf046091fe637963fd6a8cc8c1324daf81b64899f (patch)
treeadeffec4a5d31503548ef5dead7d67b3bff9e694 /src/SMAPI/Framework/ModHelpers
parent82beefd8531467de318c1881afd15a258d489f37 (diff)
parentca18a2867b457fd6bfda71d9828884032ecadfb8 (diff)
downloadSMAPI-f046091fe637963fd6a8cc8c1324daf81b64899f.tar.gz
SMAPI-f046091fe637963fd6a8cc8c1324daf81b64899f.tar.bz2
SMAPI-f046091fe637963fd6a8cc8c1324daf81b64899f.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers')
-rw-r--r--src/SMAPI/Framework/ModHelpers/CommandHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/DataHelper.cs10
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/MultiplayerHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/TranslationHelper.cs2
9 files changed, 13 insertions, 13 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/CommandHelper.cs b/src/SMAPI/Framework/ModHelpers/CommandHelper.cs
index a4fd21c1..e9d53d84 100644
--- a/src/SMAPI/Framework/ModHelpers/CommandHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/CommandHelper.cs
@@ -6,7 +6,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class CommandHelper : BaseHelper, ICommandHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>The mod using this instance.</summary>
private readonly IModMetadata Mod;
diff --git a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
index a8b24a13..dac627ba 100644
--- a/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ContentHelper.cs
@@ -21,7 +21,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class ContentHelper : BaseHelper, IContentHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>SMAPI's core content logic.</summary>
private readonly ContentCoordinator ContentCore;
diff --git a/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs b/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
index 26c4648c..34f24d65 100644
--- a/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs
@@ -9,7 +9,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class ContentPackHelper : BaseHelper, IContentPackHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>The content packs loaded for this mod.</summary>
private readonly Lazy<IContentPack[]> ContentPacks;
diff --git a/src/SMAPI/Framework/ModHelpers/DataHelper.cs b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
index e5100aed..2cb886ba 100644
--- a/src/SMAPI/Framework/ModHelpers/DataHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
@@ -11,7 +11,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class DataHelper : BaseHelper, IDataHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>Encapsulates SMAPI's JSON file parsing.</summary>
private readonly JsonHelper JsonHelper;
@@ -77,9 +77,9 @@ namespace StardewModdingAPI.Framework.ModHelpers
/// <exception cref="InvalidOperationException">The player hasn't loaded a save file yet or isn't the main player.</exception>
public TModel ReadSaveData<TModel>(string key) where TModel : class
{
- if (!Context.IsSaveLoaded)
+ if (!Game1.hasLoadedGame)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.ReadSaveData)} when a save file isn't loaded.");
- if (!Context.IsMainPlayer)
+ if (!Game1.IsMasterGame)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.ReadSaveData)} because this isn't the main player. (Save files are stored on the main player's computer.)");
return Game1.CustomData.TryGetValue(this.GetSaveFileKey(key), out string value)
@@ -94,9 +94,9 @@ namespace StardewModdingAPI.Framework.ModHelpers
/// <exception cref="InvalidOperationException">The player hasn't loaded a save file yet or isn't the main player.</exception>
public void WriteSaveData<TModel>(string key, TModel data) where TModel : class
{
- if (!Context.IsSaveLoaded)
+ if (!Game1.hasLoadedGame)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.WriteSaveData)} when a save file isn't loaded.");
- if (!Context.IsMainPlayer)
+ if (!Game1.IsMasterGame)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.ReadSaveData)} because this isn't the main player. (Save files are stored on the main player's computer.)");
string internalKey = this.GetSaveFileKey(key);
diff --git a/src/SMAPI/Framework/ModHelpers/ModHelper.cs b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
index ca872e32..18040a78 100644
--- a/src/SMAPI/Framework/ModHelpers/ModHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModHelper.cs
@@ -166,7 +166,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
[Obsolete("Use " + nameof(IModHelper) + "." + nameof(IModHelper.ContentPacks) + "." + nameof(IContentPackHelper.CreateTemporary) + " instead")]
public IContentPack CreateTransitionalContentPack(string directoryPath, string id, string name, string description, string author, ISemanticVersion version)
{
- SCore.DeprecationManager.Warn($"{nameof(IModHelper)}.{nameof(IModHelper.CreateTransitionalContentPack)}", "2.5", DeprecationLevel.Notice);
+ SCore.DeprecationManager.Warn($"{nameof(IModHelper)}.{nameof(IModHelper.CreateTransitionalContentPack)}", "2.5", DeprecationLevel.Info);
return this.ContentPacks.CreateTemporary(directoryPath, id, name, description, author, version);
}
diff --git a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
index 5cc2a20f..8330e078 100644
--- a/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ModRegistryHelper.cs
@@ -8,7 +8,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class ModRegistryHelper : BaseHelper, IModRegistry
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>The underlying mod registry.</summary>
private readonly ModRegistry Registry;
diff --git a/src/SMAPI/Framework/ModHelpers/MultiplayerHelper.cs b/src/SMAPI/Framework/ModHelpers/MultiplayerHelper.cs
index eedad0bc..c62dd121 100644
--- a/src/SMAPI/Framework/ModHelpers/MultiplayerHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/MultiplayerHelper.cs
@@ -9,7 +9,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class MultiplayerHelper : BaseHelper, IMultiplayerHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>SMAPI's core multiplayer utility.</summary>
private readonly SMultiplayer Multiplayer;
diff --git a/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs b/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs
index cfe2ddbe..0ce72a9e 100644
--- a/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs
@@ -9,7 +9,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class ReflectionHelper : BaseHelper, IReflectionHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>The underlying reflection helper.</summary>
private readonly Reflector Reflector;
diff --git a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
index bbe3a81a..3252e047 100644
--- a/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/TranslationHelper.cs
@@ -9,7 +9,7 @@ namespace StardewModdingAPI.Framework.ModHelpers
internal class TranslationHelper : BaseHelper, ITranslationHelper
{
/*********
- ** Properties
+ ** Fields
*********/
/// <summary>The name of the relevant mod for error messages.</summary>
private readonly string ModName;