Skip to content

Commit

Permalink
zero-padding for {tn} parameter in the naming-pattern. added option t…
Browse files Browse the repository at this point in the history
…o exclude all creatures in the breeding-plan if the tags don't say otherwise. added automatic testing for extraction-cases. merged the two imprinting-extraction-algorithms. added sex-filter for library. fixed rounding-errors during extraction. alias-list-entries now show the species to which they point.
  • Loading branch information
cadaei committed Mar 18, 2018
1 parent 5850eaf commit c5de35f
Show file tree
Hide file tree
Showing 35 changed files with 1,604 additions and 249 deletions.
20 changes: 20 additions & 0 deletions ARKBreedingStats/ARKBreedingStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<Compile Include="AboutBox1.Designer.cs">
<DependentUpon>AboutBox1.cs</DependentUpon>
</Compile>
<Compile Include="testCases\ExtractionTestCase.cs" />
<Compile Include="Importer.cs" />
<Compile Include="ocr\ArkOCR.cs" />
<Compile Include="ARKOverlay.cs">
Expand Down Expand Up @@ -171,6 +172,19 @@
<Compile Include="settings\customSoundChooser.Designer.cs">
<DependentUpon>customSoundChooser.cs</DependentUpon>
</Compile>
<Compile Include="testCases\ExtractionTestCases.cs" />
<Compile Include="testCases\ExtractionTestControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="testCases\ExtractionTestControl.Designer.cs">
<DependentUpon>ExtractionTestControl.cs</DependentUpon>
</Compile>
<Compile Include="testCases\TestCaseControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="testCases\TestCaseControl.Designer.cs">
<DependentUpon>TestCaseControl.cs</DependentUpon>
</Compile>
<Compile Include="uiControls\ButtonAddTime.cs">
<SubType>Component</SubType>
</Compile>
Expand Down Expand Up @@ -370,6 +384,12 @@
<EmbeddedResource Include="SpeciesSelector.resx">
<DependentUpon>SpeciesSelector.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="testCases\ExtractionTestControl.resx">
<DependentUpon>ExtractionTestControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="testCases\TestCaseControl.resx">
<DependentUpon>TestCaseControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\dhmsInput.resx">
<DependentUpon>dhmsInput.cs</DependentUpon>
</EmbeddedResource>
Expand Down
6 changes: 6 additions & 0 deletions ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@
<setting name="MutationLimitBreedingPlanner" serializeAs="String">
<value>20</value>
</setting>
<setting name="DevTools" serializeAs="String">
<value>False</value>
</setting>
<setting name="LastSaveFileTestCases" serializeAs="String">
<value />
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
</configuration>
34 changes: 24 additions & 10 deletions ARKBreedingStats/BreedingPlan.Designer.cs

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

18 changes: 12 additions & 6 deletions ARKBreedingStats/BreedingPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public BreedingPlan()
tt.SetToolTip(radioButtonBPHighStats, "Check for best next-generation-results.\nThe chance for an overall good creature is better.\nCheck if it's not important to have a Top-Stats-Offspring.");
tt.SetToolTip(buttonJustMated, "Click to create an incubation-entry in the Raising-tab");
tt.SetToolTip(nudMutationLimit, "Consider only creatures with at most this many mutations.\nSet to -1 for any number of mutation.");
tt.SetToolTip(cbTagExcludeDefault, "Check if all creatures should be excluded and only be included when have the include-mark on their tag.\nIf this checkbox is unchecked, all creatures will be included by default.");

statWeighting = statWeighting1;
breedingPlanNeedsUpdate = false;
Expand Down Expand Up @@ -127,18 +128,23 @@ public List<Creature> filterByTags(List<Creature> cl)
{
foreach (Creature c in cl)
{
bool exclude = false;
foreach (string t in c.tags)
if (excludingTagList.IndexOf(t) != -1)
bool exclude = cbTagExcludeDefault.Checked;
if (!exclude)
{
foreach (string t in c.tags)
{
exclude = true;
break;
if (excludingTagList.Contains(t))
{
exclude = true;
break;
}
}
}
if (exclude)
{
foreach (string t in c.tags)
{
if (includingTagList.IndexOf(t) != -1)
if (includingTagList.Contains(t))
{
exclude = false;
break;
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/CreatureBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void setCreature(Creature creature)
}
colorRegionUseds = colorRegions.Select(c => c.name != null).ToArray();

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

Expand Down
1 change: 1 addition & 0 deletions ARKBreedingStats/CreatureCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ namespace ARKBreedingStats
public List<string> tags = new List<string>();
[XmlArray]
public List<string> tagsInclude = new List<string>(); // which tags are checked for including in the breedingplan
[XmlArray]
public List<string> tagsExclude = new List<string>(); // which tags are checked for excluding in the breedingplan

public bool mergeCreatureList(List<Creature> creaturesToMerge, bool update = false)
Expand Down
Loading

0 comments on commit c5de35f

Please sign in to comment.