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