using StardewValley;
using StardewValley.Menus;
namespace StardewModdingAPI
{
/// Provides information about the current game state.
internal static class Context
{
/*********
** Accessors
*********/
/// Whether a player save has been loaded.
public static bool IsSaveLoaded => Game1.hasLoadedGame && !string.IsNullOrEmpty(Game1.player.name);
/// Whether the game is currently writing to the save file.
public static bool IsSaving => SaveGame.IsProcessing && (Game1.activeClickableMenu is SaveGameMenu || Game1.activeClickableMenu is ShippingMenu); // IsProcessing is never set to false on Linux/Mac
/// Whether the game is currently running the draw loop.
public static bool IsInDrawLoop { get; set; }
}
}