Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Jul 17, 2022
2 parents e12881f + b72d79a commit 0135907
Show file tree
Hide file tree
Showing 56 changed files with 1,071 additions and 636 deletions.
2 changes: 2 additions & 0 deletions ARKBreedingStats/ARKBreedingStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>ARKSmartBreeding.ico</ApplicationIcon>
Expand Down Expand Up @@ -630,6 +631,7 @@
<Compile Include="utils\Debouncer.cs" />
<Compile Include="utils\ExportFolderLocation.cs" />
<Compile Include="utils\ExtensionMethods.cs" />
<Compile Include="utils\CreatureListSorter.cs" />
<Compile Include="utils\MessageBoxes.cs" />
<Compile Include="NamePatterns\NamePatternFunctions.cs" />
<Compile Include="utils\RepositoryInfo.cs" />
Expand Down
9 changes: 6 additions & 3 deletions ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,6 @@
<setting name="FilterOnlyIfColorId" serializeAs="String">
<value>0</value>
</setting>
<setting name="LibraryGroupBySpecies" serializeAs="String">
<value>True</value>
</setting>
<setting name="LibraryFilterWindowRect" serializeAs="String">
<value>50, 50, 800, 600</value>
</setting>
Expand Down Expand Up @@ -460,6 +457,12 @@
<setting name="ImportExportedBringToFrontOnIssue" serializeAs="String">
<value>False</value>
</setting>
<setting name="HideInvisibleColorRegions" serializeAs="String">
<value>False</value>
</setting>
<setting name="UseTribeFilterForBreedingPlan" serializeAs="String">
<value>False</value>
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
</configuration>
4 changes: 4 additions & 0 deletions ARKBreedingStats/Ark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public static class Ark
public const byte ColorMaxId = 200;
public const byte DyeFirstId = 201;
public const byte DyeMaxId = 255;
/// <summary>
/// When choosing a random color for a mutation, ARK can erroneously select an undefined color. Usually this is color id 227 (one too high to be defined).
/// </summary>
public const byte UndefinedColorId = 227;

/// <summary>
/// Number of possible color regions for all species.
Expand Down
307 changes: 154 additions & 153 deletions ARKBreedingStats/BreedingPlanning/BreedingPlan.Designer.cs

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions ARKBreedingStats/BreedingPlanning/BreedingPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,12 +1128,6 @@ public void SetLocalizations()
Loc.SetToolTip(cbBPTagExcludeDefault, _tt);
}

private void cbServerFilterLibrary_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.UseServerFilterForBreedingPlan = cbServerFilterLibrary.Checked;
CalculateBreedingScoresAndDisplayPairs();
}

private void btShowAllCreatures_Click(object sender, EventArgs e)
{
// remove restriction on manually selected creatures
Expand All @@ -1147,12 +1141,24 @@ private void btShowAllCreatures_Click(object sender, EventArgs e)
CalculateBreedingScoresAndDisplayPairs();
}

private void cbServerFilterLibrary_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.UseServerFilterForBreedingPlan = cbServerFilterLibrary.Checked;
CalculateBreedingScoresAndDisplayPairs();
}

private void cbOwnerFilterLibrary_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.UseOwnerFilterForBreedingPlan = cbOwnerFilterLibrary.Checked;
CalculateBreedingScoresAndDisplayPairs();
}

private void cbTribeFilterLibrary_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.UseTribeFilterForBreedingPlan = cbTribeFilterLibrary.Checked;
CalculateBreedingScoresAndDisplayPairs();
}

private void cbOnlyOneSuggestionForFemales_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.BreedingPlanOnlyBestSuggestionForEachFemale = cbBPOnlyOneSuggestionForFemales.Checked;
Expand Down
3 changes: 3 additions & 0 deletions ARKBreedingStats/CreatureBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,11 @@ public void Clear()
groupBox1.Text = string.Empty;
_creature = null;
LbMotherAndWildInfo.Text = string.Empty;
LbFather.Text = string.Empty;
statsDisplay1.Clear();
pictureBox1.Visible = false;
labelSpecies.Text = string.Empty;
labelNotes.Text = string.Empty;
regionColorChooser1.Clear();
}

Expand Down
18 changes: 9 additions & 9 deletions ARKBreedingStats/Form1.Designer.cs

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

12 changes: 2 additions & 10 deletions ARKBreedingStats/Form1.collection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Xml.Serialization;
using ARKBreedingStats.uiControls;
using ARKBreedingStats.utils;
using System.Diagnostics;

namespace ARKBreedingStats
{
Expand Down Expand Up @@ -531,15 +532,6 @@ private bool LoadCollectionFile(string filePath, bool keepCurrentCreatures = fal
// calculate creature values
RecalculateAllCreaturesValues();

// set flags for all creatures. this is needed for backwards compatibility (added 05/2020) TODO: remove in late 2021.
foreach (Creature c in _creatureCollection.creatures)
{
c.InitializeFlags();
c.RecalculateNewMutations();
if (c.ArkIdImported && c.ArkIdInGame == null)
c.ArkIdInGame = Utils.ConvertImportedArkIdToIngameVisualization(c.ArkId);
}

if (!keepCurrentSelections && _creatureCollection.creatures.Any())
tabControlMain.SelectedTab = tabPageLibrary;

Expand Down Expand Up @@ -568,7 +560,7 @@ private bool LoadCollectionFile(string filePath, bool keepCurrentCreatures = fal
FilterLibRecalculate();

// apply last sorting
listViewLibrary.Sort();
//listViewLibrary.Sort(); // TODO

UpdateTempCreatureDropDown();

Expand Down
Loading

0 comments on commit 0135907

Please sign in to comment.