Changes

Jump to navigation Jump to search
Line 6: Line 6:     
==SMAPI mods==
 
==SMAPI mods==
 +
===Mod build config package===
 +
Update to the latest <tt>Pathoschild.Stardew.ModBuildConfig</tt> 2.0.3-alpha package for compatibility with Stardew Valley 1.3.
 +
 
===Net types===
 
===Net types===
 
Stardew Valley 1.3 uses a new set of C# types to synchronise data between players. For example, a crop's <tt>bool dead</tt> field is now <tt>NetBool dead</tt>. The game will intermittently get the value of all reachable net fields, and send them to the other players. A ''net type'' means a network-synchronised type (like <tt>NetBool</tt>), and a ''net field'' is a field with such a type (like <tt>Crop.dead</tt>).
 
Stardew Valley 1.3 uses a new set of C# types to synchronise data between players. For example, a crop's <tt>bool dead</tt> field is now <tt>NetBool dead</tt>. The game will intermittently get the value of all reachable net fields, and send them to the other players. A ''net type'' means a network-synchronised type (like <tt>NetBool</tt>), and a ''net field'' is a field with such a type (like <tt>Crop.dead</tt>).
Line 23: Line 26:     
if (a == b) // true
 
if (a == b) // true
</source>
+
</source></li>
</li>
+
<li>You may need to access the value explicitly in some cases. Here's how:
 +
{| class="wikitable"
 +
|-
 +
! net type
 +
! syntax
 +
|-
 +
| <tt>NetDictionary</tt>
 +
| <tt>netField.FieldDict</tt>
 +
|-
 +
| ''most net types''
 +
| <tt>netField.Value</tt>
 +
|}</li>
 
<li>'''Do not''' reassign net fields. (Many are readonly to prevent that, but not all.) Instead, set the new value:
 
<li>'''Do not''' reassign net fields. (Many are readonly to prevent that, but not all.) Instead, set the new value:
 
<source lang="c#">
 
<source lang="c#">
translators
8,404

edits

Navigation menu