Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs
(view source)
Revision as of 04:26, 2 August 2017
156 bytes added
,
04:26, 2 August 2017
→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
).
|}
|}
Pathoschild
translators
8,456
edits