ARKBreedingStats.Form1.updateCreatureListings C# (CSharp) Method

updateCreatureListings() private method

This function should be called if the creatureCollection is changed, i.e. after loading a file or adding/removing a creature
private updateCreatureListings ( int speciesIndex = -1 ) : void
speciesIndex int
return void
        private void updateCreatureListings(int speciesIndex = -1)
        {
            // if speciesIndex==-1 consider all creatures, else recalculate only the indicated species if applicable
            List<Creature> creatures = creatureCollection.creatures;
            if (speciesIndex >= 0)
            {
                creatures = creatures.Where(c => c.species == Values.V.speciesNames[speciesIndex]).ToList();
            }
            createOwnerList();
            calculateTopStats(creatures);
            updateTreeListSpecies(creatureCollection.creatures);
            filterLib();
            toolStripStatusLabel.Text = creatureCollection.creatures.Count() + " creatures in Library. Version " + Application.ProductVersion + " / " + Values.V.version.ToString();
            breedingPlan1.currentSpecies = ""; // set to empty so creatures are loaded again if breeding plan is created
        }
Form1