Skip to content

Commit e37a9c3

Browse files
committed
Merge branch 'dev'
2 parents 025d62b + 04e8bb5 commit e37a9c3

14 files changed

+785
-609
lines changed

ARKBreedingStats/ARKBreedingStats.csproj

+3-2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
<Compile Include="Pedigree\PedigreeCreatureCompact.cs">
122122
<SubType>Component</SubType>
123123
</Compile>
124+
<Compile Include="uiControls\LibraryInfo.cs" />
124125
<Compile Include="uiControls\StatSelector.cs">
125126
<SubType>UserControl</SubType>
126127
</Compile>
@@ -954,10 +955,10 @@
954955
</ItemGroup>
955956
<ItemGroup>
956957
<PackageReference Include="FluentFTP">
957-
<Version>37.0.3</Version>
958+
<Version>44.0.1</Version>
958959
</PackageReference>
959960
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
960-
<Version>3.3.3</Version>
961+
<Version>3.3.4</Version>
961962
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
962963
<PrivateAssets>all</PrivateAssets>
963964
</PackageReference>

ARKBreedingStats/App.config

+3
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,9 @@
478478
<setting name="LibraryGroupBySpecies" serializeAs="String">
479479
<value>True</value>
480480
</setting>
481+
<setting name="LibraryColorInfoUseFilter" serializeAs="String">
482+
<value>False</value>
483+
</setting>
481484
</ARKBreedingStats.Properties.Settings>
482485
</userSettings>
483486
</configuration>

ARKBreedingStats/Form1.Designer.cs

+509-467
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ARKBreedingStats/Form1.cs

+20-2
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ private void Form1_Load(object sender, EventArgs e)
222222

223223
LoadListViewSettings(tribesControl1.ListViewPlayers, "PlayerListColumnWidths", "PlayerListColumnDisplayIndices", "PlayerListSortColumn", "PlayerListSortAsc");
224224

225+
CbLibraryInfoUseFilter.Checked = Properties.Settings.Default.LibraryColorInfoUseFilter;
226+
225227
// load stat weights
226228
double[][] custWd = Properties.Settings.Default.customStatWeights;
227229
string[] custWs = Properties.Settings.Default.customStatWeightNames;
@@ -674,6 +676,10 @@ private void SpeciesSelector1OnSpeciesSelected(bool speciesChanged)
674676
if (Properties.Settings.Default.ApplyGlobalSpeciesToLibrary)
675677
listBoxSpeciesLib.SelectedItem = species;
676678
}
679+
else if (tabControlMain.SelectedTab == tabPageLibraryInfo)
680+
{
681+
LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList<Creature>)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo);
682+
}
677683
else if (tabControlMain.SelectedTab == tabPagePedigree)
678684
{
679685
pedigree1.SetSpecies(species);
@@ -920,6 +926,7 @@ private void UpdateCreatureListings(Species species = null, bool keepCurrentlySe
920926
breedingPlan1.BreedingPlanNeedsUpdate = true;
921927
pedigree1.SetSpecies(forceUpdate: true);
922928
raisingControl1.RecreateList();
929+
LibraryInfo.ClearInfo();
923930
}
924931

925932
/// <summary>
@@ -1292,6 +1299,7 @@ private void Form1_FormClosed(object sender, FormClosedEventArgs e)
12921299
Properties.Settings.Default.DisabledVariants = speciesSelector1.VariantSelector?.DisabledVariants?.ToArray();
12931300

12941301
Properties.Settings.Default.RaisingFoodLastSelected = raisingControl1.LastSelectedFood;
1302+
Properties.Settings.Default.LibraryColorInfoUseFilter = CbLibraryInfoUseFilter.Checked;
12951303

12961304
/////// save settings for next session
12971305
Properties.Settings.Default.Save();
@@ -1519,6 +1527,10 @@ private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
15191527
else if (_libraryNeedsUpdate)
15201528
FilterLibRecalculate();
15211529
}
1530+
else if (tabControlMain.SelectedTab == tabPageLibraryInfo)
1531+
{
1532+
LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList<Creature>)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo);
1533+
}
15221534
else if (tabControlMain.SelectedTab == tabPagePedigree)
15231535
{
15241536
pedigree1.SetSpeciesIfNotSet(speciesSelector1.SelectedSpecies);
@@ -3630,11 +3642,17 @@ private void colorDefinitionsToClipboardToolStripMenuItem_Click(object sender, E
36303642
Clipboard.SetText(string.Join("\n", Values.V.Colors.ColorsList.Select(c => $"{c.Id,3}: {c}")));
36313643
}
36323644

3633-
private void copyColorInformationToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
3645+
private void BtCopyLibraryColorToClipboard_Click(object sender, EventArgs e)
36343646
{
3635-
var colorInfo = _creatureCollection.GetColorInfo(speciesSelector1.SelectedSpecies);
3647+
LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList<Creature>)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked);
3648+
var colorInfo = LibraryInfo.GetSpeciesInfo();
36363649
Clipboard.SetText(string.IsNullOrEmpty(colorInfo) ? $"no color info available for species {speciesSelector1.SelectedSpecies}" : colorInfo);
36373650
SetMessageLabelText($"Color information about {speciesSelector1.SelectedSpecies} has been copied to the clipboard, you can paste it in a text editor to view it.", MessageBoxIcon.Information);
36383651
}
3652+
3653+
private void CbLibraryInfoUseFilter_CheckedChanged(object sender, EventArgs e)
3654+
{
3655+
LibraryInfo.SetColorInfo(speciesSelector1.SelectedSpecies, CbLibraryInfoUseFilter.Checked ? (IList<Creature>)ApplyLibraryFilterSettings(_creatureCollection.creatures).ToArray() : _creatureCollection.creatures, CbLibraryInfoUseFilter.Checked, tlpLibraryInfo);
3656+
}
36393657
}
36403658
}

ARKBreedingStats/Form1.importSave.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Threading.Tasks;
1414
using System.Windows.Forms;
1515
using ARKBreedingStats.utils;
16+
using FluentFTP.Exceptions;
1617

1718
namespace ARKBreedingStats
1819
{
@@ -176,7 +177,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
176177
}
177178
}
178179
}
179-
var client = new FtpClient(ftpUri.Host, ftpUri.Port, credentials.Username, credentials.Password);
180+
var client = new AsyncFtpClient(ftpUri.Host, credentials.Username, credentials.Password, ftpUri.Port);
180181
string ftpPath = null;
181182

182183
try
@@ -193,7 +194,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
193194
// TaskCanceledException
194195
// on cancelling it throws
195196
// Cannot access a disposed object. Object name: 'System.Net.Sockets.Socket'.
196-
await client.ConnectAsync(token: cancellationTokenSource.Token);
197+
await client.Connect(token: cancellationTokenSource.Token);
197198

198199
progressDialog.StatusText = "Finding most recent file";
199200
await Task.Yield();
@@ -219,7 +220,7 @@ await ImportSavegame.ImportCollectionFromSavegame(_creatureCollection, workingCo
219220
await Task.Yield();
220221

221222
var filePath = Path.Combine(workingCopyFolder, Path.GetFileName(ftpPath));
222-
await client.DownloadFileAsync(filePath, ftpPath, FtpLocalExists.Overwrite, FtpVerify.Retry, progressDialog, token: cancellationTokenSource.Token);
223+
await client.DownloadFile(filePath, ftpPath, FtpLocalExists.Overwrite, FtpVerify.Retry, progressDialog, token: cancellationTokenSource.Token);
223224
await Task.Delay(500, cancellationTokenSource.Token);
224225

225226
if (filePath.EndsWith(".gz"))
@@ -302,10 +303,10 @@ private async Task<string> DecompressGZippedFileAsync(string filePath, Cancellat
302303
return newFileName;
303304
}
304305

305-
public async Task<FtpListItem> GetLastModifiedFileAsync(FtpClient client, Uri ftpUri, string fileRegex, CancellationToken cancellationToken)
306+
public async Task<FtpListItem> GetLastModifiedFileAsync(AsyncFtpClient client, Uri ftpUri, string fileRegex, CancellationToken cancellationToken)
306307
{
307308
var folderUri = new Uri(ftpUri, ".");
308-
var listItems = await client.GetListingAsync(folderUri.AbsolutePath, cancellationToken);
309+
var listItems = await client.GetListing(folderUri.AbsolutePath, cancellationToken);
309310

310311
Regex fileNameRegex;
311312
if (!fileRegex.Contains("(?<"))

ARKBreedingStats/Properties/AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
// Revision
3131
//
3232
[assembly: AssemblyVersion("1.0.0.0")]
33-
[assembly: AssemblyFileVersion("0.50.9.0")]
33+
[assembly: AssemblyFileVersion("0.50.10.0")]
3434
[assembly: NeutralResourcesLanguage("en")]
3535

ARKBreedingStats/Properties/Settings.Designer.cs

+13-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ARKBreedingStats/Properties/Settings.settings

+3
Original file line numberDiff line numberDiff line change
@@ -536,5 +536,8 @@
536536
<Setting Name="LibraryGroupBySpecies" Type="System.Boolean" Scope="User">
537537
<Value Profile="(Default)">True</Value>
538538
</Setting>
539+
<Setting Name="LibraryColorInfoUseFilter" Type="System.Boolean" Scope="User">
540+
<Value Profile="(Default)">False</Value>
541+
</Setting>
539542
</Settings>
540543
</SettingsFile>

ARKBreedingStats/_manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ARK Smart Breeding": {
55
"Id": "ARK Smart Breeding",
66
"Category": "main",
7-
"version": "0.50.9.0"
7+
"version": "0.50.10.0"
88
},
99
"SpeciesColorImages": {
1010
"Id": "SpeciesColorImages",

ARKBreedingStats/json/values/_manifest.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"mod": { "id": "1083349027", "tag": "SpeedyFlyers", "title": "Najs Speedy Flyers" }
77
},
88
"1090809604-Pyria.json": {
9-
"version": "351.6.1667005010",
9+
"version": "356.5.1671741134.1",
1010
"mod": { "id": "1090809604", "tag": "Pyria", "title": "Pyria: Mythos Evolved" }
1111
},
1212
"1092784125-Gryphons.json": {
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"1125442531-Gaia.json": {
26-
"version": "340.3.1630493486.1",
26+
"version": "356.5.1630493486",
2727
"mod": { "id": "1125442531", "tag": "Gaia", "title": "Gaia" }
2828
},
2929
"1136390783-PhoenixBreeding.json": {
@@ -35,7 +35,7 @@
3535
"mod": { "id": "1139775728", "tag": "Confuciusornis", "title": "Confuciusornis" }
3636
},
3737
"1169020368-Trex.json": {
38-
"version": "356.4.1675003923",
38+
"version": "356.5.1675401434",
3939
"mod": { "id": "1169020368", "tag": "Trex", "title": "Ark Creature Rebalance (AG Reborn)" }
4040
},
4141
"1178308359-ShadDragon.json": {
@@ -72,7 +72,7 @@
7272
"mod": { "id": "1356703358", "tag": "Primal_Fear_Noxious_Creatures", "title": "Primal Fear Noxious Creatures" }
7373
},
7474
"1373744537-AC2.json": {
75-
"version": "355.16.1674258851",
75+
"version": "356.5.1675373582",
7676
"mod": { "id": "1373744537", "tag": "AC2", "title": "Additional Creatures 2: Wild Ark" }
7777
},
7878
"1405944717-Project_Evolution.json": {
@@ -104,11 +104,11 @@
104104
"mod": { "id": "1523045986", "tag": "Paranoia", "title": "Additional Creatures 2: Paranoia!" }
105105
},
106106
"1565015734-BetterDinosTest.json": {
107-
"version": "348.7.1659637030",
107+
"version": "356.5.1659982227",
108108
"mod": { "id": "1565015734", "tag": "BetterDinosTest", "title": "Better Dinos" }
109109
},
110110
"1576299694-ElementalDinos.json": {
111-
"version": "355.3.1667827331",
111+
"version": "356.5.1667827331",
112112
"mod": { "id": "1576299694", "tag": "ElementalDinos", "title": "Elemental Ark" }
113113
},
114114
"1587391872-FasterFlyers.json": {
@@ -129,7 +129,7 @@
129129
"mod": { "id": "1633860796", "tag": "DE_Breedable_RockDrakes", "title": "Dark Edges Breedable Rock Drakes" }
130130
},
131131
"1652120435-AtlasPort.json": {
132-
"version": "354.4.1669849853",
132+
"version": "356.5.1672480004",
133133
"mod": { "id": "1652120435", "tag": "AtlasPort", "title": "Shad's Atlas Imports" }
134134
},
135135
"1654255131-AtlasImports.json": {
@@ -166,7 +166,7 @@
166166
"mod": { "id": "1729512589", "tag": "Brachiosaurus", "title": "ARK Additions: Brachiosaurus!" }
167167
},
168168
"1734595558-Pyria2.json": {
169-
"version": "354.4.1669482607",
169+
"version": "356.5.1669482607",
170170
"mod": { "id": "1734595558", "tag": "Pyria2", "title": "Pyria: The Second Chapter" }
171171
},
172172
"1768499278-BalancedJPE.json": {
@@ -235,7 +235,7 @@
235235
"mod": { "id": "2000326197", "tag": "ExtraResources", "title": "Event Assets" }
236236
},
237237
"2003934830-Beasts.json": {
238-
"version": "355.16.1674245153",
238+
"version": "356.5.1674614859",
239239
"mod": { "id": "2003934830", "tag": "Beasts", "title": "Prehistoric Beasts" }
240240
},
241241
"2019846325-ApexMod.json": {
@@ -259,7 +259,7 @@
259259
"mod": { "id": "2117881804", "tag": "FiresFixes", "title": "Fire's Fixes" }
260260
},
261261
"2135314513-CI_Dinos.json": {
262-
"version": "340.3.1623948861",
262+
"version": "356.5.1623948861",
263263
"mod": { "id": "2135314513", "tag": "CI_Dinos", "title": "Crystal Isles Dino Addition" }
264264
},
265265
"2447186973-ArkOmega.json": {
@@ -279,15 +279,15 @@
279279
"mod": { "id": "814833973", "tag": "Wyvern_Mating", "title": "Wyvern Mating" }
280280
},
281281
"839162288-Primal_Fear.json": {
282-
"version": "345.19.1651177976",
282+
"version": "356.5.1651177976",
283283
"mod": { "id": "839162288", "tag": "Primal_Fear", "title": "Primal Fear" }
284284
},
285285
"883957187-WyvernWorld.json": {
286286
"version": "342.13.1638248815",
287287
"mod": { "id": "883957187", "tag": "WyvernWorld", "title": "Wyvern World" }
288288
},
289289
"893735676-AE.json": {
290-
"version": "355.12.1672955615",
290+
"version": "356.5.1672955615.1",
291291
"mod": { "id": "893735676", "tag": "AE", "title": "Ark Eternal" }
292292
},
293293
"895711211-ClassicFlyers.json": {
@@ -317,7 +317,7 @@
317317
}
318318
},
319319
"values.json": {
320-
"version": "355.3.10136424"
320+
"version": "356.5.10438696"
321321
}
322322
}
323323
}

0 commit comments

Comments
 (0)