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 16:53, 11 July 2017
464 bytes added
,
16:53, 11 July 2017
→Utilities
:
+ context
Line 630:
Line 630:
==Utilities==
==Utilities==
SMAPI provides some C# objects you can use to simplify your code.
SMAPI provides some C# objects you can use to simplify your code.
+
+
===Context===
+
The <tt>Context</tt> class provides properties about what the game is doing:
+
+
{| class="wikitable"
+
|-
+
! value
+
! meaning
+
|-
+
| <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.
+
|-
+
| <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).
+
|}
===Dates===
===Dates===
Pathoschild
translators
8,404
edits