Skip to content

Commit

Permalink
added setting for max chart level. added stat-potential chart.
Browse files Browse the repository at this point in the history
  • Loading branch information
cadaei committed Feb 5, 2017
1 parent 72ff15d commit dcd1505
Show file tree
Hide file tree
Showing 15 changed files with 659 additions and 20 deletions.
18 changes: 18 additions & 0 deletions ARKBreedingStats/ARKBreedingStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@
</Compile>
<Compile Include="species\CreatureStat.cs" />
<Compile Include="species\Species.cs" />
<Compile Include="uiControls\StatPotential.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="uiControls\StatPotential.Designer.cs">
<DependentUpon>StatPotential.cs</DependentUpon>
</Compile>
<Compile Include="TamingControl.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down Expand Up @@ -214,6 +220,12 @@
<Compile Include="uiControls\dhmInput.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="uiControls\StatPotentials.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="uiControls\StatPotentials.Designer.cs">
<DependentUpon>StatPotentials.cs</DependentUpon>
</Compile>
<Compile Include="Utils.cs" />
<Compile Include="Values.cs" />
<Compile Include="Win32Stuff.cs" />
Expand All @@ -226,6 +238,9 @@
<EmbeddedResource Include="OffspringPossibilities.resx">
<DependentUpon>OffspringPossibilities.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\StatPotential.resx">
<DependentUpon>StatPotential.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="StatWeighting.resx">
<DependentUpon>StatWeighting.cs</DependentUpon>
</EmbeddedResource>
Expand All @@ -241,6 +256,9 @@
<EmbeddedResource Include="TribesControl.resx">
<DependentUpon>TribesControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="uiControls\StatPotentials.resx">
<DependentUpon>StatPotentials.cs</DependentUpon>
</EmbeddedResource>
<None Include="Resources\kofi.png" />
<Content Include="Resources\ARKExtractor.ico" />
<Content Include="Resources\lock.png" />
Expand Down
3 changes: 3 additions & 0 deletions ARKBreedingStats/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<setting name="celsius" serializeAs="String">
<value>True</value>
</setting>
<setting name="lastSpecies" serializeAs="String">
<value />
</setting>
</ARKBreedingStats.Properties.Settings>
</userSettings>
</configuration>
44 changes: 27 additions & 17 deletions ARKBreedingStats/Form1.Designer.cs

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

19 changes: 18 additions & 1 deletion ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ private void Form1_Load(object sender, EventArgs e)
tamingControl1.selectedSpeciesIndex = -1;
tamingControl1.selectedSpeciesIndex = 0;

int selectedSpecies = Values.V.speciesNames.IndexOf(Properties.Settings.Default.lastSpecies);
if (selectedSpecies >= 0)
{
comboBoxSpeciesExtractor.SelectedIndex = selectedSpecies;
cbbStatTestingSpecies.SelectedIndex = selectedSpecies;
}

clearAll();
// UI loaded

Expand Down Expand Up @@ -752,6 +759,8 @@ private void cbbStatTestingRace_SelectedIndexChanged(object sender, EventArgs e)
}
updateAllTesterValues();
creatureInfoInputTester.SpeciesIndex = i;
statPotentials1.speciesIndex = i;
statPotentials1.setLevels(testingIOs.Select(s => s.LevelWild).ToArray(), true);
}
//breedingInfo1.displayData(i);
setTesterInfoInputCreature();
Expand Down Expand Up @@ -1612,6 +1621,9 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e)
Properties.Settings.Default.customStatWeights = custWd.ToArray();
Properties.Settings.Default.customStatWeightNames = custWs.ToArray();

// save last selected species in combobox
Properties.Settings.Default.lastSpecies = comboBoxSpeciesExtractor.SelectedItem.ToString();

// save settings for next session
Properties.Settings.Default.Save();

Expand Down Expand Up @@ -2271,7 +2283,10 @@ private void statIOUpdateValue(StatIO sIo)
labelTesterTotalLevel.Text = "Total Levels: " + (testingIOs[7].LevelWild + domLevels + 1) + "/" + (testingIOs[7].LevelWild + 1 + creatureCollection.maxDomLevel);
creatureInfoInputTester.parentListValid = false;

radarChart1.setLevels(testingIOs.Select(s => s.LevelWild).ToArray());
int[] levelsWild = testingIOs.Select(s => s.LevelWild).ToArray();
if (!testingIOs[2].Enabled) levelsWild[2] = 0;
radarChart1.setLevels(levelsWild);
statPotentials1.setLevels(levelsWild, false);
}

private void onlinehelpToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down Expand Up @@ -2788,6 +2803,8 @@ private void applyLevelSettings()
}
breedingPlan1.maxWildLevels = creatureCollection.maxWildLevel;
radarChart1.initializeVariables(creatureCollection.maxChartLevel);
statPotentials1.levelDomMax = creatureCollection.maxDomLevel;
statPotentials1.levelGraphMax = creatureCollection.maxChartLevel;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("0.20.12")]
[assembly: AssemblyFileVersion("0.21.0")]
12 changes: 12 additions & 0 deletions ARKBreedingStats/Properties/Settings.Designer.cs

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

3 changes: 3 additions & 0 deletions ARKBreedingStats/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@
<Setting Name="celsius" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="lastSpecies" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
</Settings>
</SettingsFile>
1 change: 1 addition & 0 deletions ARKBreedingStats/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private void initStuff()
tt.SetToolTip(chkExperimentalOCR, "Experimental! Works well for 1920 and mostly for 1680. May not work for other resolutions at all.");
tt.SetToolTip(chkCollectionSync, "If checked, the tool automatically reloads the library if it was changed. Use if multiple persons editing the file, e.g. via a shared folder.\nIt's recommened to check this along with \"Auto Save\"");
tt.SetToolTip(checkBoxAutoSave, "If checked, the library is saved after each change automatically.\nIt's recommened to check this along with \"Auto Update Collection File\"");
tt.SetToolTip(numericUpDownMaxChartLevel, "This number defines the level that is shown as maximum in the charts. Usually it's good to set this value to one third of the max wild level.");
}

private void loadSettings(CreatureCollection cc)
Expand Down
Loading

0 comments on commit dcd1505

Please sign in to comment.