Changes

m
Text replacement - "''e.g.''," to "''e.g.,''"
Line 20: Line 20:  
| tile position
 
| tile position
 
| top-left corner of the map
 
| top-left corner of the map
| measured in [[#Tiles|tiles]]; used when placing things on the map (''e.g.'', <samp>location.Objects</samp> uses tile positions).
+
| measured in [[#Tiles|tiles]]; used when placing things on the map (''e.g.,'' <samp>location.Objects</samp> uses tile positions).
 
|-
 
|-
 
| absolute position
 
| absolute position
 
| top-left corner of the map
 
| top-left corner of the map
| measured in pixels; used when more granular measurements are needed (''e.g.'', NPC movement).
+
| measured in pixels; used when more granular measurements are needed (''e.g.,'' NPC movement).
 
|-
 
|-
 
| screen position
 
| screen position
Line 60: Line 60:  
A 'net type' is any of several classes which Stardew Valley uses to sync data between players, and a 'net field' is any field or property of those types. They're named for the <code>Net</code> prefix in their type names. Net types can represent simple values like <samp>NetBool</samp>, or complex values like <samp>NetFieldDictionary</samp>. The game will regularly collect all the net fields reachable from <samp>Game1.netWorldState</samp> and sync them with other players. That means that many mod changes will be synchronised automatically in multiplayer.
 
A 'net type' is any of several classes which Stardew Valley uses to sync data between players, and a 'net field' is any field or property of those types. They're named for the <code>Net</code> prefix in their type names. Net types can represent simple values like <samp>NetBool</samp>, or complex values like <samp>NetFieldDictionary</samp>. The game will regularly collect all the net fields reachable from <samp>Game1.netWorldState</samp> and sync them with other players. That means that many mod changes will be synchronised automatically in multiplayer.
   −
Although net fields can be implicitly converted to an equivalent value type (like <code>bool x = new NetBool(true)</code>), their conversion rules are counterintuitive and error-prone (''e.g.'', <code>item?.category == null && item?.category != null</code> can both be true at once). To avoid bugs, never implicitly cast net fields; access the underlying value directly instead. The build config NuGet package should detect most implicit conversions and show an appropriate build warning.
+
Although net fields can be implicitly converted to an equivalent value type (like <code>bool x = new NetBool(true)</code>), their conversion rules are counterintuitive and error-prone (''e.g.,'' <code>item?.category == null && item?.category != null</code> can both be true at once). To avoid bugs, never implicitly cast net fields; access the underlying value directly instead. The build config NuGet package should detect most implicit conversions and show an appropriate build warning.
    
Here's how to access the data in some common net types:
 
Here's how to access the data in some common net types:
105,955

edits