private void comboBoxSpecies_SelectedIndexChanged(object sender, EventArgs e)
{
int sI = comboBoxSpecies.SelectedIndex;
if (sI >= 0 && Values.V.species[sI].taming != null)
{
this.SuspendLayout();
foreach (TamingFoodControl f in foodControls)
Controls.Remove(f);
foodControls.Clear();
TamingFoodControl tf;
int i = 0;
foreach (string f in Values.V.species[sI].taming.eats)
{
tf = new TamingFoodControl(f);
if (f == "Kibble")
tf.foodNameDisplay = "Kibble (" + Values.V.species[sI].taming.favoriteKibble + " Egg)";
tf.Location = new Point(20, 80 + 45 * i);
tf.valueChanged += new TamingFoodControl.ValueChangedEventHandler(updateTamingData);
tf.Clicked += new TamingFoodControl.ClickedEventHandler(onlyOneFood);
foodControls.Add(tf);
Controls.Add(tf);
i++;
}
this.ResumeLayout();
if (foodControls.Count > 0)
{
foodControls[0].amount = Taming.foodAmountNeeded(sI, (int)nudLevel.Value, foodControls[0].foodName, Values.V.species[sI].taming.nonViolent);
}
}
}