private void GameEvents_OnAfterLoadedContent(object sender, System.EventArgs e) { Farmhand.API.Items.Item.RegisterItem <Bluemelon>(Bluemelon.Information); Farmhand.API.Items.Item.RegisterItem <BluemelonSeeds>(BluemelonSeeds.Information); Farmhand.API.Crops.Crop.RegisterCrop <TestCrop>(TestCrop.Information); // Adds a new item to piere's shop, with a delegate to check whether or not they're on sale ShopUtilities.AddToShopStock(Instance, Shops.Pierre, BluemelonSeeds.Information, new ShopUtilities.CheckIfAddShopStock(CheckIfBluemelonSeedsAreOnSale), 123); // Adds a new item to joja's shop, without a delegate to check whether or not they're no sale, so they always will be ShopUtilities.AddToShopStock(Instance, Shops.Joja, BluemelonSeeds.Information, 123); }
private void GameEvents_OnAfterLoadedContent(object sender, System.EventArgs e) { // Register the DimensionalSack Farmhand.API.Tools.Tool.RegisterTool <StardewValley.Tool>(DimensionalSack.Information); // Register the new shop ShopUtilities.RegisterShop(Instance, "DimensionalSack"); // Add stock to the new shop ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 167, 5); ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 168); ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 169); ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 170); ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 171); ShopUtilities.AddToShopStock(Instance, "DimensionalSack", StockType.Item, 172); }