Changes

Jump to navigation Jump to search
1 byte added ,  20:27, 16 February 2022
m
Text replacement - "''e.g.''" to "''e.g.,''"
Line 41: Line 41:  
* and a ''spritesheet'' for the in-game item icons.
 
* and a ''spritesheet'' for the in-game item icons.
   −
Each item has a <samp>ParentSheetIndex</samp> field which is its position in the item type's spritesheet, starting at 0 in the top-left and incrementing by one as you move across and then down. For example, hat #0 is the first sprite in <samp>Characters/Farmer/hats</samp>. The <samp>ParentSheetIndex</samp> is also used to identify the item itself; since spritesheet indexes aren't unique (''e.g.'' there's both a hat #10 and object #10), code needs to check the type too like <code>item is Weapon weapon && weapon.ParentSheetIndex == 4</code>.
+
Each item has a <samp>ParentSheetIndex</samp> field which is its position in the item type's spritesheet, starting at 0 in the top-left and incrementing by one as you move across and then down. For example, hat #0 is the first sprite in <samp>Characters/Farmer/hats</samp>. The <samp>ParentSheetIndex</samp> is also used to identify the item itself; since spritesheet indexes aren't unique (''e.g.,'' there's both a hat #10 and object #10), code needs to check the type too like <code>item is Weapon weapon && weapon.ParentSheetIndex == 4</code>.
    
See the sections below for details on each item type.
 
See the sections below for details on each item type.
107,345

edits

Navigation menu