summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Context.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Context.cs')
-rw-r--r--src/StardewModdingAPI/Context.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/StardewModdingAPI/Context.cs b/src/StardewModdingAPI/Context.cs
index 45f6a05f..6bc5ae56 100644
--- a/src/StardewModdingAPI/Context.cs
+++ b/src/StardewModdingAPI/Context.cs
@@ -4,18 +4,27 @@ using StardewValley.Menus;
namespace StardewModdingAPI
{
/// <summary>Provides information about the current game state.</summary>
- internal static class Context
+ public static class Context
{
/*********
** Accessors
*********/
+ /****
+ ** Public
+ ****/
+ /// <summary>Whether the player has loaded a save and the world has finished initialising.</summary>
+ public static bool IsWorldReady { get; internal set; }
+
+ /****
+ ** Internal
+ ****/
/// <summary>Whether a player save has been loaded.</summary>
- public static bool IsSaveLoaded => Game1.hasLoadedGame && !string.IsNullOrEmpty(Game1.player.name);
+ internal static bool IsSaveLoaded => Game1.hasLoadedGame && !string.IsNullOrEmpty(Game1.player.name);
/// <summary>Whether the game is currently writing to the save file.</summary>
- public static bool IsSaving => Game1.activeClickableMenu is SaveGameMenu || Game1.activeClickableMenu is ShippingMenu; // saving is performed by SaveGameMenu, but it's wrapped by ShippingMenu on days when the player shipping something
+ internal static bool IsSaving => Game1.activeClickableMenu is SaveGameMenu || Game1.activeClickableMenu is ShippingMenu; // saving is performed by SaveGameMenu, but it's wrapped by ShippingMenu on days when the player shipping something
/// <summary>Whether the game is currently running the draw loop.</summary>
- public static bool IsInDrawLoop { get; set; }
+ internal static bool IsInDrawLoop { get; set; }
}
}