Ejemplo n.º 1
0
        public override void Callback(string command, string[] args)
        {
            var message = "Listing farm animals\n";

            FarmAnimals.ReadCache();
            foreach (var category in FarmAnimals.GetCategories())
            {
                message += DescribeFarmAnimalCategory(category);
            }
            Monitor.Log(message, LogLevel.Info);
        }
Ejemplo n.º 2
0
        public static void Postfix(ref StardewValley.Menus.PurchaseAnimalsMenu __instance,
                                   ref List <StardewValley.Object> stock)
        {
            var moddedMenu = new Decorators.PurchaseAnimalsMenu(__instance);
            var dictionary = FarmAnimals.GetCategories().Where(o => o.CanBePurchased())
                             .ToDictionary(o => o.Category, o => o.GetAnimalShopIconTexture());
            int iconHeight;

            moddedMenu.SetUpAnimalsToPurchase(stock, dictionary, out iconHeight);
            AdjustMenuHeight(ref moddedMenu, iconHeight);
            StardewValley.Menus.PurchaseAnimalsMenu.menuWidth = 640;
        }
 public Dictionary <string, Texture2D> GetAnimalShopIcons()
 {
     return(FarmAnimals.GetCategories().Where(o => o.CanBePurchased())
            .ToDictionary(o => o.Category,
                          o => o.GetAnimalShopIconTexture()));
 }
 public Dictionary <string, List <string> > GetFarmAnimalCategories()
 {
     return(FarmAnimals.GetCategories().ToDictionary(o => o.Category,
                                                     o =>
                                                     o.Types.Select(t => t.Type).ToList()));
 }