Beispiel #1
0
        // Adds stock to custom registered shops
        private static void AddToShopStock(Mod owner, string shopName, StockEntry newEntry)
        {
            string internalShopName = GetInternalShopName(owner, shopName);

            if (RegisteredShops.ContainsKey(internalShopName))
            {
                RegisteredShops[internalShopName].Stock.Add(newEntry);
            }
            else
            {
                Farmhand.Logging.Log.Warning($"Shop {internalShopName} not found! Could not add stock to this shop.");
            }
        }
Beispiel #2
0
        // Adds stock to vanilla shops
        private static void AddToShopStock(Shops shop, StockEntry newEntry)
        {
            switch (shop)
            {
            case Shops.Pierre: { PierreShopStock.Add(newEntry); break; }

            case Shops.TravelingMerchant: { TravelingMerchantShopStock.Add(newEntry); break; }

            case Shops.Dwarf: { DwarfShopStock.Add(newEntry); break; }

            case Shops.Hospital: { HospitalShopStock.Add(newEntry); break; }

            case Shops.Qi: { QiShopStock.Add(newEntry); break; }

            case Shops.Joja: { JojaShopStock.Add(newEntry); break; }

            case Shops.Hat: { HatShopStock.Add(newEntry); break; }

            case Shops.Fish: { FishShopStock.Add(newEntry); break; }

            case Shops.Animal: { AnimalShopStock.Add(newEntry); break; }

            case Shops.Sandy: { SandyShopStock.Add(newEntry); break; }

            case Shops.Saloon: { SaloonShopStock.Add(newEntry); break; }

            case Shops.Adventure: { AdventureShopStock.Add(newEntry); break; }

            case Shops.Carpenter: { CarpenterShopStock.Add(newEntry); break; }

            case Shops.Blacksmith: { BlacksmithShopStock.Add(newEntry); break; }

            case Shops.IceCream: { IceCreamShopStock.Add(newEntry); break; }

            case Shops.Sewer: { SewerShopStock.Add(newEntry); break; }

            case Shops.FreeWallpapersAndFloors: { FreeWallpapersAndFloorsShopStock.Add(newEntry); break; }

            case Shops.FreeFurnitures: { FreeFurnituresShopStock.Add(newEntry); break; }
            }
        }