summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ModHelpers/DataHelper.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-21 12:25:27 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2020-12-21 12:25:27 -0500
commit71284e7176c55f66754470b19fd74b5b1fda4964 (patch)
tree848a7ec8c99e0e1f8335fac41f9e417dc1c86e40 /src/SMAPI/Framework/ModHelpers/DataHelper.cs
parent85b947dced10f5398055af36b5fdb6b8d32a6a6b (diff)
parent872a1d5627f20faece618644db1ae4749e124741 (diff)
downloadSMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.tar.gz
SMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.tar.bz2
SMAPI-71284e7176c55f66754470b19fd74b5b1fda4964.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/ModHelpers/DataHelper.cs')
-rw-r--r--src/SMAPI/Framework/ModHelpers/DataHelper.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/ModHelpers/DataHelper.cs b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
index 41612387..0fe3209f 100644
--- a/src/SMAPI/Framework/ModHelpers/DataHelper.cs
+++ b/src/SMAPI/Framework/ModHelpers/DataHelper.cs
@@ -69,8 +69,8 @@ namespace StardewModdingAPI.Framework.ModHelpers
{
if (Context.LoadStage == LoadStage.None)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.ReadSaveData)} when a save file isn't loaded.");
- 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.)");
+ if (!Context.IsOnHostComputer)
+ throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.ReadSaveData)} when connected to a remote host. (Save files are stored on the main player's computer.)");
string internalKey = this.GetSaveFileKey(key);
@@ -87,8 +87,8 @@ namespace StardewModdingAPI.Framework.ModHelpers
{
if (Context.LoadStage == LoadStage.None)
throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.WriteSaveData)} when a save file isn't loaded.");
- if (!Game1.IsMasterGame)
- throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.WriteSaveData)} because this isn't the main player. (Save files are stored on the main player's computer.)");
+ if (!Context.IsOnHostComputer)
+ throw new InvalidOperationException($"Can't use {nameof(IMod.Helper)}.{nameof(IModHelper.Data)}.{nameof(this.WriteSaveData)} when connected to a remote host. (Save files are stored on the main player's computer.)");
string internalKey = this.GetSaveFileKey(key);
string data = model != null