Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Migrate to Stardew Valley 1.6
(view source)
Revision as of 06:30, 30 August 2023
489 bytes added
,
06:30, 30 August 2023
→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>
Pathoschild
translators
8,404
edits