summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Context.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-08-21 16:39:21 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-08-21 16:39:21 -0400
commit8ba54a682fd7de3756b6ddd262b232cf40d23ea0 (patch)
tree7e44d53b733d95b05b232da46306a0d3d57e9231 /src/StardewModdingAPI/Context.cs
parent674ad0d90f8780130a5fcefb3869acfe2315df2a (diff)
parenteea5100acea0bceaf440f9d1bd50ee2b24cf8ebc (diff)
downloadSMAPI-8ba54a682fd7de3756b6ddd262b232cf40d23ea0.tar.gz
SMAPI-8ba54a682fd7de3756b6ddd262b232cf40d23ea0.tar.bz2
SMAPI-8ba54a682fd7de3756b6ddd262b232cf40d23ea0.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/StardewModdingAPI/Context.cs')
-rw-r--r--src/StardewModdingAPI/Context.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/StardewModdingAPI/Context.cs b/src/StardewModdingAPI/Context.cs
index 6c5ae40e..119e14c8 100644
--- a/src/StardewModdingAPI/Context.cs
+++ b/src/StardewModdingAPI/Context.cs
@@ -16,8 +16,11 @@ namespace StardewModdingAPI
/// <summary>Whether the player has loaded a save and the world has finished initialising.</summary>
public static bool IsWorldReady { get; internal set; }
- /// <summary>Whether the player is free to move around (e.g. save is loaded, no menu is displayed, no cutscene is in progress, etc).</summary>
- public static bool IsPlayerFree => Context.IsWorldReady && Game1.activeClickableMenu == null && Game1.player.CanMove && !Game1.dialogueUp && !Game1.eventUp;
+ /// <summary>Whether <see cref="IsWorldReady"/> is true and the player is free to act in the world (no menu is displayed, no cutscene is in progress, etc).</summary>
+ public static bool IsPlayerFree => Context.IsWorldReady && Game1.activeClickableMenu == null && !Game1.dialogueUp && !Game1.eventUp;
+
+ /// <summary>Whether <see cref="IsPlayerFree"/> is true and the player is free to move (e.g. not using a tool).</summary>
+ public static bool CanPlayerMove => Context.IsPlayerFree && Game1.player.CanMove;
/// <summary>Whether the game is currently running the draw loop. This isn't relevant to most mods, since you should use <see cref="GraphicsEvents.OnPostRenderEvent"/> to draw to the screen.</summary>
public static bool IsInDrawLoop { get; internal set; }