Changes

→‎Context: + Context.CanPlayerMove in SMAPI 2.0
Line 695: Line 695:     
===Context===
 
===Context===
The <tt>Context</tt> class provides properties about what the game is doing:
+
The <tt>Context</tt> class provides information about the game state and player control:
    
{| class="wikitable"
 
{| class="wikitable"
Line 703: Line 703:  
|-
 
|-
 
| <tt>Context.IsWorldReady</tt>
 
| <tt>Context.IsWorldReady</tt>
| Whether the player has loaded a save and the world has finished initialising. Useful for ignoring events before the save is loaded.
+
| The player has loaded a save and the world has finished initialising. Useful for ignoring events before the save is loaded.
 
|-
 
|-
 
| <tt>Context.IsPlayerFree</tt>
 
| <tt>Context.IsPlayerFree</tt>
| Whether the player is free to move around (e.g. save is loaded, no menu is displayed, no cutscene is in progress, etc).
+
| <tt>Context.IsWorldReady</tt> and the player is free to act on the world (no menu is displayed, no cutscene is in progress, etc).
 +
|-
 +
| <tt>Context.CanPlayerMove</tt>
 +
| (SMAPI 2.0+ only) <tt>Context.IsPlayerFree</tt> and the player is free to move (e.g. not using a tool).
 
|}
 
|}
  
translators
8,446

edits