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 => 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
/// Whether the game is currently running the draw loop.
public static bool IsInDrawLoop { get; set; }
}
}