Changes
Jump to navigation
Jump to search
← 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,438
edits
Navigation menu
Personal tools
Create account
Log in
Namespaces
Modding
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Admin noticeboard
Help Editing
Random page
Official Links
Official Site
Official Forums
Official Merchandise
Discord
Reddit
Tools
Upload file
Special pages
Printable version