Skip to content

Commit 9565d1a

Browse files
committed
option to display zero mutation levels in library
1 parent acda4ca commit 9565d1a

File tree

7 files changed

+3297
-3263
lines changed

7 files changed

+3297
-3263
lines changed

ARKBreedingStats/App.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@
514514
<setting name="StreamerMode" serializeAs="String">
515515
<value>False</value>
516516
</setting>
517+
<setting name="LibraryDisplayZeroMutationLevels" serializeAs="String">
518+
<value>False</value>
519+
</setting>
517520
</ARKBreedingStats.Properties.Settings>
518521
</userSettings>
519522
</configuration>

ARKBreedingStats/Form1.library.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ private ListViewItem CreateCreatureLvItem(Creature cr, bool displayIndex = false
10721072
ListViewItem lvi = new ListViewItem(subItems) { Tag = cr };
10731073

10741074
// apply colors to the subItems
1075+
var displayZeroMutationLevels = Properties.Settings.Default.LibraryDisplayZeroMutationLevels;
10751076

10761077
for (int s = 0; s < Stats.StatsCount; s++)
10771078
{
@@ -1092,14 +1093,14 @@ private ListViewItem CreateCreatureLvItem(Creature cr, bool displayIndex = false
10921093
_considerStatHighlight[s] ? cr.IsTopStat(s) ? 0.2 : 0.75 : 0.93);
10931094

10941095
// mutated levels
1095-
if (cr.levelsMutated == null || cr.levelsMutated[s] == 0)
1096+
if (cr.levelsMutated == null || (!displayZeroMutationLevels && cr.levelsMutated[s] == 0))
10961097
{
10971098
lvi.SubItems[ColumnIndexFirstStat + Stats.StatsCount + s].ForeColor = Color.White;
10981099
lvi.SubItems[ColumnIndexFirstStat + Stats.StatsCount + s].BackColor = Color.White;
10991100
}
11001101
else
11011102
lvi.SubItems[ColumnIndexFirstStat + Stats.StatsCount + s].BackColor = Utils.GetColorFromPercent((int)(cr.levelsMutated[s] * colorFactor),
1102-
_considerStatHighlight[s] ? cr.IsTopMutationStat(s) ? 0.4 : 0.8 : 0.93, true);
1103+
_considerStatHighlight[s] ? cr.IsTopMutationStat(s) ? 0.5 : 0.8 : 0.93, true);
11031104
}
11041105
lvi.SubItems[ColumnIndexSex].BackColor = cr.flags.HasFlag(CreatureFlags.Neutered) ? Color.FromArgb(220, 220, 220) :
11051106
cr.sex == Sex.Female ? Color.FromArgb(255, 230, 255) :
@@ -1165,7 +1166,7 @@ private ListViewItem CreateCreatureLvItem(Creature cr, bool displayIndex = false
11651166
if (cr.levelFound == 0)
11661167
lvi.SubItems[ColumnIndexWildLevel].ForeColor = Color.LightGray;
11671168

1168-
// color for mutation
1169+
// color for mutations counter
11691170
if (cr.Mutations > 0)
11701171
{
11711172
if (cr.Mutations < Ark.MutationPossibleWithLessThan)

ARKBreedingStats/Properties/Settings.Designer.cs

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ARKBreedingStats/Properties/Settings.settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,5 +575,8 @@
575575
<Setting Name="StreamerMode" Type="System.Boolean" Scope="User">
576576
<Value Profile="(Default)">False</Value>
577577
</Setting>
578+
<Setting Name="LibraryDisplayZeroMutationLevels" Type="System.Boolean" Scope="User">
579+
<Value Profile="(Default)">False</Value>
580+
</Setting>
578581
</Settings>
579582
</SettingsFile>

0 commit comments

Comments
 (0)