Skip to content

Commit

Permalink
updated SP default stat-multipliers. fixed issue with stat-OCR when f…
Browse files Browse the repository at this point in the history
…irst number had a comma instead of a dot. added stats of parents in the raising-tab. improved handling of hidden-stats (oxygen and speed for aquatics) and torpor in tester. text in note-field now gets saved when adding new creature.
  • Loading branch information
cadaei committed Jul 20, 2017
1 parent 69bb8d5 commit e43d5e9
Show file tree
Hide file tree
Showing 16 changed files with 563 additions and 13 deletions.
18 changes: 18 additions & 0 deletions ARKBreedingStats/ARKBreedingStats.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@
<Compile Include="RadarChart.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="raising\ParentStats.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="raising\ParentStats.Designer.cs">
<DependentUpon>ParentStats.cs</DependentUpon>
</Compile>
<Compile Include="raising\ParentStatValues.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="raising\ParentStatValues.Designer.cs">
<DependentUpon>ParentStatValues.cs</DependentUpon>
</Compile>
<Compile Include="species\BreedingData.cs" />
<Compile Include="species\ColorRegion.cs" />
<Compile Include="Creature.cs" />
Expand Down Expand Up @@ -301,6 +313,12 @@
<EmbeddedResource Include="OffspringPossibilities.resx">
<DependentUpon>OffspringPossibilities.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="raising\ParentStats.resx">
<DependentUpon>ParentStats.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="raising\ParentStatValues.resx">
<DependentUpon>ParentStatValues.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="settings\customSoundChooser.resx">
<DependentUpon>customSoundChooser.cs</DependentUpon>
</EmbeddedResource>
Expand Down
8 changes: 4 additions & 4 deletions ARKBreedingStats/Form1.Designer.cs

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

15 changes: 14 additions & 1 deletion ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public partial class Form1 : Form
private DateTime lastAutoSaveBackup = DateTime.Now.AddDays(-1);
private int autoSaveMinutes;
private Creature creatureTesterEdit;
private int hiddenLevelsCreatureTester;
private FileSync fileSync;
private Extraction extractor;
private bool oxygenForAll;
Expand Down Expand Up @@ -241,6 +242,7 @@ private void Form1_Load(object sender, EventArgs e)
tt.SetToolTip(labelListening, "red: listening, grey: deactivated\nSay \"[species] [level]\", e.g. \"Rex level 30\" or \"Brontosaurus 50\"\nto get taming-infos in the overlay");
tt.SetToolTip(cbExactlyImprinting, "Check this if you have exactly 100% imprinting.");

// was used to calculate the growing-progress
creatureInfoInputExtractor.weightStat = statIOs[4];
creatureInfoInputTester.weightStat = testingIOs[4];

Expand Down Expand Up @@ -895,6 +897,7 @@ private void comboBoxSpeciesGlobal_SelectedIndexChanged(object sender, EventArgs
raisingControl1.updateRaisingData(comboBoxSpeciesGlobal.SelectedIndex);
}
}
hiddenLevelsCreatureTester = 0;
}

private void listViewPossibilities_SelectedIndexChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -1096,6 +1099,8 @@ private void add2Lib(bool fromExtractor = true)
creature.cooldownUntil = input.Cooldown;
creature.growingUntil = input.Grown;

creature.note = input.CreatureNote;

creature.domesticatedAt = input.domesticatedAt;
creature.mutationCounter = input.MutationCounter;

Expand Down Expand Up @@ -2494,6 +2499,13 @@ private void editCreatureInTester(Creature c, bool virtualCreature = false)
radioButtonTesterTamed.Checked = true;
else radioButtonTesterWild.Checked = true;

hiddenLevelsCreatureTester = c.levelsWild[7];
for (int s = 0; s < 7; s++)
{
if (c.levelsWild[s] > 0)
hiddenLevelsCreatureTester -= c.levelsWild[s];
}

for (int s = 0; s < 7; s++)
{
testingIOs[s].LevelWild = c.levelsWild[s];
Expand Down Expand Up @@ -2593,7 +2605,7 @@ private void testingStatIOValueUpdate(StatIO sIo)
{
torporLvl += testingIOs[s].LevelWild;
}
testingIOs[7].LevelWild = torporLvl;
testingIOs[7].LevelWild = torporLvl + hiddenLevelsCreatureTester;
}
int domLevels = 0;
for (int s = 0; s < 8; s++)
Expand Down Expand Up @@ -3098,6 +3110,7 @@ private void setTesterInfoInputCreature(Creature c = null, bool virtualCreature
creatureInfoInputTester.CreatureName = "";
creatureInfoInputTester.CreatureSex = Sex.Unknown;
creatureInfoInputTester.CreatureStatus = CreatureStatus.Available;
creatureInfoInputTester.CreatureNote = "";
creatureInfoInputTester.Cooldown = DateTime.Now.AddHours(-1);
creatureInfoInputTester.Grown = DateTime.Now.AddHours(-1);
creatureInfoInputTester.domesticatedAt = DateTime.Now;
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.23.11")]
[assembly: AssemblyFileVersion("0.23.12")]
18 changes: 14 additions & 4 deletions ARKBreedingStats/RaisingControl.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/RaisingControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,15 @@ private void listViewBabies_SelectedIndexChanged(object sender, EventArgs e)
nudTotalWeight.Value = (decimal)c.valuesBreeding[4];
}
}
parentStats1.setParentValues(c.Mother, c.Father);
}
else if (listViewBabies.SelectedItems[0].Tag.GetType() == typeof(IncubationTimerEntry))
{
IncubationTimerEntry ite = (IncubationTimerEntry)listViewBabies.SelectedItems[0].Tag;
int sI = Values.V.speciesNames.IndexOf(ite.mother.species);
setSpeciesIndex?.Invoke(sI);

parentStats1.setParentValues(ite.mother, ite.father);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ARKBreedingStats/json/values.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ARKBreedingStats/ocr/ArkOCR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ public float[] doOCR(out string OCRText, out string dinoName, out string species
r = new Regex(@".*:(\d+)");
else
{
r = new Regex(@"(?:\d+\.[\d\/]%?[\/1])?(\d+[\.,']?\d?\d?)(%)?"); // only the second numbers is interesting after the current weight is not shown anymore
r = new Regex(@"(?:\d+[\.,'][\d\/]%?[\/1])?(\d+[\.,']?\d?\d?)(%)?"); // only the second numbers is interesting after the current weight is not shown anymore

//if (onlyNumbers)
//r = new Regex(@"((\d*[\.,']?\d?\d?)\/)?(\d*[\.,']?\d?\d?)");
Expand Down
81 changes: 81 additions & 0 deletions ARKBreedingStats/raising/ParentStatValues.Designer.cs

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

45 changes: 45 additions & 0 deletions ARKBreedingStats/raising/ParentStatValues.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ARKBreedingStats.raising
{
public partial class ParentStatValues : UserControl
{
public ParentStatValues()
{
InitializeComponent();
labelM.TextAlign = ContentAlignment.MiddleRight;
labelF.TextAlign = ContentAlignment.MiddleRight;
}

public string StatName { set { label1.Text = value; } }

internal void setValues(string sMother, string sFather, int highlight)
{
labelM.Text = sMother;
labelF.Text = sFather;
switch (highlight)
{
case 1:
labelM.ForeColor = Color.DarkBlue;
labelF.ForeColor = Color.DarkRed;
break;
case 2:
labelF.ForeColor = Color.DarkBlue;
labelM.ForeColor = Color.DarkRed;
break;
default:
labelM.ForeColor = Color.Black;
labelF.ForeColor = Color.Black;
break;
}
}
}
}
Loading

0 comments on commit e43d5e9

Please sign in to comment.