Changes

Jump to navigation Jump to search
6 bytes removed ,  18:18, 6 December 2023
→‎Open a custom shop: update field name
Line 451: Line 451:  
You can place an [[Modding:Migrate to Stardew Valley 1.6#Tile property changes|<samp>Action OpenShop</samp> tile property]] on the map, which will open the given shop ID when the player clicks it.
 
You can place an [[Modding:Migrate to Stardew Valley 1.6#Tile property changes|<samp>Action OpenShop</samp> tile property]] on the map, which will open the given shop ID when the player clicks it.
   −
In C# code, you can get the inventory for a custom shop using <code>Utility.GetShopStock("shop id here")</code>, open a shop menu using <code>Utility.TryOpenShopMenu("shop id", …)</code>, and add temporary items to an open menu using <code>shopMenu.AddForSale(…)</code>. The ID of the opened shop is stored in the shop menu's <samp>storeContext</samp> field.
+
In C# code, you can get the inventory for a custom shop using <code>Utility.GetShopStock("shop id here")</code>, open a shop menu using <code>Utility.TryOpenShopMenu("shop id", …)</code>, and add temporary items to an open menu using <code>shopMenu.AddForSale(…)</code>. The ID of the opened shop is stored in the shop menu's <samp>ShopId</samp> field.
    
[[Category:Modding]]
 
[[Category:Modding]]
translators
8,446

edits

Navigation menu