Changes

Jump to navigation Jump to search
4 bytes removed ,  18:16, 6 December 2023
Line 449: Line 449:     
==Open a custom shop==
 
==Open a custom shop==
You can place an [[Modding:Migrate to Stardew Valley 1.6#Map/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>storeContext</samp> field.
    
[[Category:Modding]]
 
[[Category:Modding]]
translators
8,446

edits

Navigation menu