Skip to content

Commit

Permalink
wait for extraction-process to be finished before trying to import. f…
Browse files Browse the repository at this point in the history
…ix for speed-level-calculation (#621). fixed info-display when selecting multiple creatures in the library. unknown ancestors now get a descriptive name if it is unknown. Fixed topness calculation for unknown stats. fixed bug where unavailable creatures caused an exception if checked for best breeding-partners (#576). unique number in generated names now consists of at least 2 digits, i.e. numbers <10 have a prefixed 0, for better sorting (#614). added color-regions for ovis (#528). Updated roo-weight (#622). Stat-names are now changed in the library if a glow-species is selected (#626).
  • Loading branch information
cadaei committed Feb 18, 2018
1 parent 47cb504 commit b8d2f21
Show file tree
Hide file tree
Showing 17 changed files with 179 additions and 143 deletions.
2 changes: 1 addition & 1 deletion ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<value />
</setting>
<setting name="importChangeCreatureStatus" serializeAs="String">
<value>False</value>
<value>True</value>
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
Expand Down
7 changes: 5 additions & 2 deletions ARKBreedingStats/BreedingPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ public void determineBestBreeding(Creature chosenCreature = null, bool forceUpda
breedingPlanNeedsUpdate = true;
}
if (forceUpdate || breedingPlanNeedsUpdate)
Creatures = creatureCollection.creatures.Where(c => (c != null && c == chosenCreature)
|| (c.species == selectedSpecies && c.status == CreatureStatus.Available && !c.neutered && (checkBoxIncludeCooldowneds.Checked || (c.cooldownUntil < DateTime.Now && c.growingUntil < DateTime.Now)))).ToList();
Creatures = creatureCollection.creatures.Where(
c => (c != null && c == chosenCreature)
|| (c.species == selectedSpecies && c.status == CreatureStatus.Available && !c.neutered
&& (checkBoxIncludeCooldowneds.Checked || (c.cooldownUntil < DateTime.Now && c.growingUntil < DateTime.Now)))
).ToList();

statWeights = statWeighting1.Weightings;
BreedingMode bm = BreedingMode.TopStatsConservative;
Expand Down
15 changes: 7 additions & 8 deletions ARKBreedingStats/CreatureBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ private void initializeVars()
this.creature = null;
stats = new StatDisplay[] { statDisplayHP, statDisplaySt, statDisplayOx, statDisplayFo, statDisplayWe, statDisplayDm, statDisplaySp, statDisplayTo };
numUDLevelsDom = new NumericUpDown[] { numericUpDown1, numericUpDown2, numericUpDown3, numericUpDown4, numericUpDown5, numericUpDown6, numericUpDown7 };
stats[0].Title = "HP";
stats[1].Title = "St";
stats[2].Title = "Ox";
stats[3].Title = "Fo";
stats[4].Title = "We";
stats[5].Title = "Dm";
stats[6].Title = "Sp";
stats[7].Title = "To";
for (int s = 0; s < 8; s++)
stats[s].Title = Utils.statName(s, true);
stats[5].Percent = true;
stats[6].Percent = true;
statDisplayTo.ShowBars = false;
Expand Down Expand Up @@ -96,6 +90,11 @@ public void setCreature(Creature creature)
}
}
colorRegionUseds = colorRegions.Select(c => c.name != null).ToArray();

bool glowSpecies = Values.V.glowSpecies.IndexOf(creature.species) != -1;
for (int s = 0; s < 8; s++)
stats[s].Title = Utils.statName(s, true, glowSpecies);

updateLabel();
renewLargeImage = true;
}
Expand Down
8 changes: 2 additions & 6 deletions ARKBreedingStats/Extraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public int filterResultsByFixed(int dontFix = -1)
}

public void extractLevels(int speciesI, int level, List<StatIO> statIOs, double lowerTEBound, double upperTEBound, bool autoDetectTamed,
bool tamed, bool justTamed, bool bred, double imprintingBonusRounded, bool adjustImprinting, bool allowMoreThanHundredImprinting, bool extractImprintingFromTorpor, double imprintingBonusMultiplier, double cuddleIntervalMultiplier,
bool tamed, bool bred, double imprintingBonusRounded, bool adjustImprinting, bool allowMoreThanHundredImprinting, bool extractImprintingFromTorpor, double imprintingBonusMultiplier, double cuddleIntervalMultiplier,
bool considerWildLevelSteps, int wildLevelSteps, out bool imprintingChanged)
{
List<CreatureStat> stats = Values.V.species[speciesI].stats;
Expand Down Expand Up @@ -228,11 +228,7 @@ public void extractLevels(int speciesI, int level, List<StatIO> statIOs, double

torporLevelTamingMultMax = 1;
torporLevelTamingMultMin = 1;
if (postTamed && justTamed && !bred)
{
torporLevelTamingMultMax = (2 + upperTEBound) / (4 + upperTEBound);
torporLevelTamingMultMin = (2 + lowerTEBound) / (4 + lowerTEBound);
}

levelWildFromTorporRange[0] = (int)Math.Round((statIOs[7].Input / imprintingMultiplier - (postTamed ? stats[7].AddWhenTamed : 0) - stats[7].BaseValue) * torporLevelTamingMultMin / (stats[7].BaseValue * stats[7].IncPerWildLevel), 0);
levelWildFromTorporRange[1] = (int)Math.Round((statIOs[7].Input / imprintingMultiplier - (postTamed ? stats[7].AddWhenTamed : 0) - stats[7].BaseValue) * torporLevelTamingMultMax / (stats[7].BaseValue * stats[7].IncPerWildLevel), 0);

Expand Down
120 changes: 60 additions & 60 deletions ARKBreedingStats/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b8d2f21

Please sign in to comment.