Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Modding:Modder Guide/APIs
(view source)
Revision as of 04:38, 28 May 2018
370 bytes removed
,
04:38, 28 May 2018
→Multiplayer
:
moved to
Modding:Modder Guide/APIs/Multiplayer
Line 80:
Line 80:
FieldInfo field = this.Helper.Reflection.GetField<string>(…).FieldInfo;
FieldInfo field = this.Helper.Reflection.GetField<string>(…).FieldInfo;
MethodInfo method = this.Helper.Reflection.GetMethod(…).MethodInfo;
MethodInfo method = this.Helper.Reflection.GetMethod(…).MethodInfo;
−
</source>
−
−
===Multiplayer===
−
The multiplayer API provides methods to support modding in a multiplayer context:
−
<source lang="c#">
−
// get a unique multiplayer ID (e.g. for animal IDs)
−
int uniqueID = this.Helper.Multiplayer.GetNewID();
−
−
// get the locations being sync'd from the main player
−
foreach (GameLocation location in this.Helper.Multiplayer.GetActiveLocations())
</source>
</source>
Pathoschild
translators
8,404
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