Changes

→‎Other API changes: + NetField.AddFields -> AddField
Line 8,831: Line 8,831:  
| <samp>Name</samp>
 
| <samp>Name</samp>
 
| Removed; use its dictionary key in <samp>Game1.locationContextData</samp> instead.
 
| Removed; use its dictionary key in <samp>Game1.locationContextData</samp> instead.
 +
|-
 +
| <samp>NetField</samp>
 +
| <samp>AddFields</samp>
 +
| Removed; use <samp>AddField</samp> instead. For example:
 +
<syntaxhighlight lang="c#">
 +
// old code
 +
NetFields.AddFields(textureName, spriteWidth, spriteHeight);
 +
 +
// new code
 +
NetFields
 +
    .AddField(textureName)
 +
    .AddField(spriteWidth)
 +
    .AddField(spriteHeight);
 +
</syntaxhighlight>
 +
Note that the second argument (<samp>name</samp>) should usually be omitted, since it'll be auto-populated from the value passed to the first argument.
 
|-
 
|-
 
|rowspan="4"| <samp>NPC</samp>
 
|rowspan="4"| <samp>NPC</samp>
translators
8,404

edits