public static IEnumerable <KeyValuePair <int, FishData> > GetPossibleFish(int depth, int mineLevel = -1)
        {
            Season    s = Helpers.ToSeason(Game1.currentSeason) ?? Season.SPRINGSUMMERFALLWINTER;
            WaterType w = Helpers.ConvertWaterType(Game1.currentLocation.getFishingLocation(Game1.player.getTileLocation())) ?? WaterType.BOTH;

            return(FishHelper.GetPossibleFish(Game1.currentLocation.name, w, s, Game1.isRaining ? Weather.RAINY : Weather.SUNNY, Game1.timeOfDay, depth, Game1.player.FishingLevel, mineLevel));
        }
        private void KeyPressed(object sender, EventArgsKeyPressed e)
        {
            if (!Enum.TryParse(this.Config.GetFishInWaterKey, out Keys getFishKey) || e.KeyPressed != getFishKey)
            {
                return;
            }
            if (Game1.currentLocation == null)
            {
                return;
            }

            int[] possibleFish;
            if (Game1.currentLocation is MineShaft m)
            {
                possibleFish = FishHelper.GetPossibleFish(5, m.mineLevel).Select(f => f.Key).ToArray();
            }
            else
            {
                possibleFish = FishHelper.GetPossibleFish(5).Select(f => f.Key).ToArray();
            }

            Dictionary <int, string> fish = Game1.content.Load <Dictionary <int, string> >("Data\\Fish");

            string[] fishByName = (
                from id in possibleFish
                let data = fish[id].Split('/')
                           select data.Length > 13 ? data[13] : data[0]
                ).ToArray();

            Game1.showGlobalMessage(fishByName.Length == 0 ? this.Strings.NoPossibleFish : string.Format(this.Strings.PossibleFish, string.Join <string>(", ", fishByName)));
        }
 public static int GetRandomFish(int depth, int mineLevel = -1) => FishHelper.GetRandomFish(FishHelper.GetPossibleFish(depth, mineLevel));