Changes

Jump to navigation Jump to search
36 bytes added ,  17:00, 19 February 2021
m
Replace deprecated <source> tags with <syntaxhighlight> tags
Line 6: Line 6:  
Crop data is stored in <tt>Content\Data\Crops.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
 
Crop data is stored in <tt>Content\Data\Crops.xnb</tt>, which can be [[Modding:Editing XNB files#unpacking|unpacked for editing]]. Here's the raw data as of {{version|1.5.1}} for reference:
   −
{{collapse|Data|content=<source lang="json">
+
{{collapse|Data|content=<syntaxhighlight lang="json">
 
{
 
{
 
   "472": "1 1 1 1/spring/0/24/-1/0/false/false/false",
 
   "472": "1 1 1 1/spring/0/24/-1/0/false/false/false",
Line 55: Line 55:  
   "890": "1 1 1 1/spring summer fall winter/47/889/-1/0/false/false/false"
 
   "890": "1 1 1 1/spring summer fall winter/47/889/-1/0/false/false/false"
 
}
 
}
</source>}}
+
</syntaxhighlight>}}
    
==Format==
 
==Format==
Line 133: Line 133:  
The game determines the number of crops gained at a single harvest using the following code from <tt>Crops.cs::harvest()</tt>, where <tt>num</tt> is the number of crops gained:
 
The game determines the number of crops gained at a single harvest using the following code from <tt>Crops.cs::harvest()</tt>, where <tt>num</tt> is the number of crops gained:
   −
<source lang="C#">
+
<syntaxhighlight lang="C#">
 
if (this.minHarvest > 1 || this.maxHarvest > 1)
 
if (this.minHarvest > 1 || this.maxHarvest > 1)
 
     num = random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel));
 
     num = random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel));
Line 143: Line 143:  
if (random.NextDouble() < (double)Game1.dailyLuck / 1200.0 + 9.9999997473787516E-05)
 
if (random.NextDouble() < (double)Game1.dailyLuck / 1200.0 + 9.9999997473787516E-05)
 
     num *= 2;
 
     num *= 2;
</source>
+
</syntaxhighlight>
    
The result (''i.e.'', <tt>num</tt>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
 
The result (''i.e.'', <tt>num</tt>) of <code>random.Next(this.minHarvest, Math.Min(this.minHarvest + 1, this.maxHarvest + 1 + Game1.player.FarmingLevel / this.maxHarvestIncreasePerFarmingLevel))</code> is '''always the minHarvest''', for 2 reasons.
114

edits

Navigation menu