Changes

→‎Small changes: remove list of accessibility modifier changes (very incomplete, too many to reasonably list here)
Line 5: Line 5:     
==Done in Stardew Valley {{version|1.3.27}}==
 
==Done in Stardew Valley {{version|1.3.27}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.3]].''
 +
 
===Bug fixes===
 
===Bug fixes===
 
* ☑ Fix strange null handling with net fields (mostly fixed).
 
* ☑ Fix strange null handling with net fields (mostly fixed).
Line 121: Line 123:     
==Done in Stardew Valley {{version|1.3.28}}==
 
==Done in Stardew Valley {{version|1.3.28}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.3]].''
 +
 
===Small changes===
 
===Small changes===
 
* ☑ When creating honey, set <samp>preservedParentSheetIndex</samp> to the flower's item ID.
 
* ☑ When creating honey, set <samp>preservedParentSheetIndex</samp> to the flower's item ID.
Line 147: Line 151:     
==Done in Stardew Valley {{version|1.3.32}}==
 
==Done in Stardew Valley {{version|1.3.32}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.3]].''
 +
 
===Small changes===
 
===Small changes===
 
<ul>
 
<ul>
Line 223: Line 229:     
==Done in Stardew Valley {{version|1.4}}==
 
==Done in Stardew Valley {{version|1.4}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.4]].''
 +
 
===Bug fixes===
 
===Bug fixes===
 
* When a fence is placed, its <samp>maxHealth</samp> is assigned to the same <samp>NetFloat</samp> instance as <samp>health</samp>. This causes the max health to deteriorate over time until the game is reloaded. (To fix it, <code>this.maxHealth = this.health</code> should become <code>this.maxHealth.Value = this.health.Value</code>.)
 
* When a fence is placed, its <samp>maxHealth</samp> is assigned to the same <samp>NetFloat</samp> instance as <samp>health</samp>. This causes the max health to deteriorate over time until the game is reloaded. (To fix it, <code>this.maxHealth = this.health</code> should become <code>this.maxHealth.Value = this.health.Value</code>.)
Line 370: Line 378:     
==Done in Stardew Valley {{version|1.4.4}}==
 
==Done in Stardew Valley {{version|1.4.4}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.4]].''
 +
 
===Bug fixes===
 
===Bug fixes===
 
* ☑ <samp>TrashBear.updateItemWanted</samp> is hardcoded to assume <samp>Data\CookingRecipes</samp> field 2 is an item ID, but it can actually be an item ID and count like <samp>272 5</samp> (e.g. see <samp>CraftingRecipe</samp> constructor). That means it crashes if it randomly chooses a recipe with multiple outputs.
 
* ☑ <samp>TrashBear.updateItemWanted</samp> is hardcoded to assume <samp>Data\CookingRecipes</samp> field 2 is an item ID, but it can actually be an item ID and count like <samp>272 5</samp> (e.g. see <samp>CraftingRecipe</samp> constructor). That means it crashes if it randomly chooses a recipe with multiple outputs.
    
==Done in Stardew Valley {{version|1.5}}==
 
==Done in Stardew Valley {{version|1.5}}==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.5]].''
 +
 
===Bug fixes===
 
===Bug fixes===
 
* ☑ The game handles <samp>this.Window.ClientSizeChanged</samp> unsafely in <samp>Game1</samp>, so the resize logic can run in the middle of a draw/update cycle and [https://smapi.io/log/f29188142be44430a00c802eea75812f cause ObjectDisposedException crashes]. For most players the crash is rare (if they avoid resizing the window while it's loading something), but a minority of players report constant crashes. Proposed fix: when the window resize event is called, set a flag and perform the resize logic on the next update tick instead.
 
* ☑ The game handles <samp>this.Window.ClientSizeChanged</samp> unsafely in <samp>Game1</samp>, so the resize logic can run in the middle of a draw/update cycle and [https://smapi.io/log/f29188142be44430a00c802eea75812f cause ObjectDisposedException crashes]. For most players the crash is rare (if they avoid resizing the window while it's loading something), but a minority of players report constant crashes. Proposed fix: when the window resize event is called, set a flag and perform the resize logic on the next update tick instead.
Line 548: Line 560:     
==Done in Stardew Valley {{version|1.6}} (upcoming)==
 
==Done in Stardew Valley {{version|1.6}} (upcoming)==
 +
: ''See also [[Modding:Migrate to Stardew Valley 1.6]] for the full list of modding changes in 1.6.''
 +
 
===Small changes===
 
===Small changes===
 +
* ☑ Change all remaining <code>internal class</code> and <code>private class</code> to <code>public class</code> to simplify mod access.
 
* ☑ Change <code>Utility.isMale(name)</code> to check the NPC info instead of a hardcoded switch, so it works with custom NPCs.
 
* ☑ Change <code>Utility.isMale(name)</code> to check the NPC info instead of a hardcoded switch, so it works with custom NPCs.
 +
* ☑ Change <samp>IslandLocation.DrawParallaxHorizon</samp> to support custom sunset times that aren't on the hour, by using <samp>Utility.CalculateMinutesBetweenTimes</samp> instead of calculating the time manually.
 
* ☑ Remove <samp>Woods.stumps</samp> and use the new <samp>location.resourceClumps</samp> field instead.
 
* ☑ Remove <samp>Woods.stumps</samp> and use the new <samp>location.resourceClumps</samp> field instead.
<ul>
+
* ☑ Tweak accessibility modifiers. <small>(Stardew Valley 1.6 marks a large number of methods <samp>virtual</samp> and <samp>public</samp>/<samp>protected</samp>, too many to list here.)</small>
<li>☑ Tweak accessibility modifiers:
  −
{| class="wikitable"
  −
|-
  −
! class
  −
! changes
  −
|-
  −
| <samp>FarmerRenderer</samp>
  −
| &#32;
  −
* make field public: <samp>recolorOffsets</samp>.
  −
|-
  −
| <samp>Locations\AdventureGuild</samp>
  −
| &#32;
  −
* make fields public: <samp>Gil</samp>, <samp>talkedToGil</samp>.
  −
|-
  −
| <samp>Locations\MovieTheater</samp>
  −
| &#32;
  −
* add <samp>ClearCachedConcessionTastes()</samp> method to reset <samp>_concessionTastes</samp>.
  −
|-
  −
| <samp>Locations\ForgeMenu</samp>
  −
| &#32;
  −
* make methods virtual: <samp>CraftItem</samp>, <samp>GenerateHighlightDictionary</samp>, <samp>IsValidCraft</samp>, and <samp>IsValidCraftIngredient</samp>.
  −
|-
  −
| <samp>Menus\JunimoNoteMenu</samp>
  −
| &#32;
  −
* make fields public: <samp>heldItem</samp>, <samp>hoveredItem</samp>.
  −
|-
  −
| <samp>Menus\InventoryPage</samp>
  −
| &#32;
  −
* make fields public: <samp>hoveredItem</samp>, <samp>hoverAmount</samp>, <samp>hoverText</samp>, <samp>hoverTitle</samp>.
  −
|-
  −
| <samp>Menus\ItemGrabMenu</samp>
  −
| &#32;
  −
* make field public: <samp>sourceItem</samp>.
  −
|-
  −
| <samp>Menus\ShopMenu</samp>
  −
| &#32;
  −
* make field public: <samp>hoverText</samp>.
  −
|-
  −
| <samp>NPC</samp>
  −
| &#32;
  −
* make method public and virtual: <samp>pathfindToNextScheduleLocation</samp>.
  −
|-
  −
| <samp>Objects\Chest</samp>
  −
| &#32;
  −
* make fields public: <samp>currentLidFrame</samp>, <samp>frameCounter</samp>, <samp>_shippingBinFrameCounter</samp>, <samp>_farmerNearby</samp>.
  −
|-
  −
| <samp>TemporaryAnimatedSprite</samp>
  −
| &#32;
  −
* make field public: <samp>textureName</samp>.
  −
|-
  −
| <samp>TerrainFeatures\Tree</samp>
  −
| &#32;
  −
* make method public: <samp>resetTexture</samp>.
  −
|}
  −
</li>
  −
</ul>
      
===Medium changes===
 
===Medium changes===
 
* ☑ Some XNB files have a separate display name field, but only in non-English. Using display names consistently regardless of language would let mods rename things without breaking keys:
 
* ☑ Some XNB files have a separate display name field, but only in non-English. Using display names consistently regardless of language would let mods rename things without breaking keys:
 
** ☑ <samp>Data\Boots</samp>
 
** ☑ <samp>Data\Boots</samp>
 +
** ☑ <samp>Data\Bundles</samp>
 
** ☑ <samp>Data\CraftingRecipes</samp>
 
** ☑ <samp>Data\CraftingRecipes</samp>
 
** ☑ <samp>Data\CookingRecipes</samp>
 
** ☑ <samp>Data\CookingRecipes</samp>
 
** ☑ <samp>Data\Furniture</samp>
 
** ☑ <samp>Data\Furniture</samp>
 
** ☑ <samp>Data\Weapons</samp>
 
** ☑ <samp>Data\Weapons</samp>
 +
* ☑ Remove hardcoded logic that ignores display names when playing in English (e.g. for NPC gift taste dialogues). That causes a bug where renamed NPCs still show their internal name in some places.
    
===Refactoring===
 
===Refactoring===
translators
8,446

edits