Changes

→‎Mod APIs: + Multiplayer
Line 748: Line 748:  
// get manifest info for all loaded mods
 
// get manifest info for all loaded mods
 
foreach(IManifest manifest in this.Helper.ModRegistry.GetAll()) { … }
 
foreach(IManifest manifest in this.Helper.ModRegistry.GetAll()) { … }
 +
</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>
  
translators
8,446

edits