Skip to content

Commit

Permalink
removed rough estimation of food spoiling for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Nov 26, 2021
1 parent f43220a commit fa6d587
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ARKBreedingStats/raising/RaisingControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public void UpdateRaisingData(Species species, bool forceUpdate = false)
_ignoreChangedFood = false;
var selectIndex = string.IsNullOrEmpty(_lastSelectedFood) ? 0 : eats.IndexOf(_lastSelectedFood);
if (selectIndex == -1) selectIndex = 0;
CbGrowingFood.SelectedIndex = selectIndex;
if (CbGrowingFood.Items.Count > 0)
CbGrowingFood.SelectedIndex = selectIndex;

if (Raising.GetRaisingTimes(_selectedSpecies, out TimeSpan matingTime, out string incubationMode,
out TimeSpan incubationTime, out _babyTime, out _maturationTime, out TimeSpan nextMatingMin,
Expand Down Expand Up @@ -177,7 +178,7 @@ string FoodAmountString(string _foodName)
+ $"\nTotal Food for maturation: ~{Math.Ceiling(totalFood / foodValue)} {_foodName}";
}

foodAmount += "\n - Loss by spoiling is only a rough estimate and may vary.";
foodAmount += "\n - Loss by spoiling is not considered!";
}

LbFoodInfoGeneral.Text = foodAmount;
Expand Down
5 changes: 1 addition & 4 deletions ARKBreedingStats/uiControls/Trough.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public class Trough

/// <summary>
/// Calculates the needed food from a specific maturation to a specific maturation.
/// The returned value adds 10 % to compensate for spoiling.
/// </summary>
public static bool FoodAmountFromUntil(Species species, double babyFoodConsumptionSpeedMultiplier, double currentMaturation, double untilMaturation, out double totalFood)
{
Expand All @@ -52,9 +51,7 @@ public static bool FoodAmountFromUntil(Species species, double babyFoodConsumpti
// calculate area of rectangle and triangle on top to get the total food needed
// assuming foodRateStart > foodRateEnd
totalFood = species.breeding.maturationTimeAdjusted * ((untilMaturation - currentMaturation) * (foodRateEnd + 0.5 * (foodRateStart - foodRateEnd)));

totalFood *= 1.1; // rough estimation of spoiling


return true;
}
}
Expand Down

0 comments on commit fa6d587

Please sign in to comment.