18
18
using ARKBreedingStats . mods ;
19
19
using ARKBreedingStats . NamePatterns ;
20
20
using ARKBreedingStats . StatsOptions ;
21
- using ARKBreedingStats . StatsOptions . LevelColorSettings ;
22
21
using ARKBreedingStats . StatsOptions . TopStatsSettings ;
23
22
using ARKBreedingStats . utils ;
24
23
using static ARKBreedingStats . settings . Settings ;
@@ -2228,13 +2227,18 @@ private void StatIOQuickWildLevelCheck(StatIO sIo)
2228
2227
{
2229
2228
_clearExtractionCreatureData =
2230
2229
true ; // as soon as the user changes stat-values, it's assumed it's not an exported creature anymore
2231
- if ( sIo . statIndex == Stats . Torpidity && rbWildExtractor . Checked )
2230
+
2231
+ if ( sIo . statIndex == Stats . Torpidity
2232
+ && rbWildExtractor . Checked
2233
+ && Properties . Settings . Default . ExtractorConvertWildTorporTotalLevel
2234
+ && speciesSelector1 . SelectedSpecies ? . stats is SpeciesStat [ ] speciesStats )
2232
2235
{
2233
- if ( ! ( speciesSelector1 . SelectedSpecies ? . stats is SpeciesStat [ ] speciesStats ) ) return ;
2234
- var trp = speciesStats [ Stats . Torpidity ] ;
2235
- if ( trp == null || trp . BaseValue == 0 || trp . IncPerWildLevel == 0 ) return ;
2236
- numericUpDownLevel . ValueSaveDouble = ( sIo . Input / trp . BaseValue - 1 ) / trp . IncPerWildLevel ;
2237
- return ;
2236
+ var torpidity = speciesStats [ Stats . Torpidity ] ;
2237
+ if ( torpidity != null && torpidity . BaseValue != 0 && torpidity . IncPerWildLevel != 0 )
2238
+ {
2239
+ numericUpDownLevel . ValueSaveDouble =
2240
+ Math . Round ( ( sIo . Input / torpidity . BaseValue - 1 ) / torpidity . IncPerWildLevel + 1 ) ;
2241
+ }
2238
2242
}
2239
2243
2240
2244
if ( ! cbQuickWildCheck . Checked ) return ;
@@ -3733,16 +3737,19 @@ private async void DisplayUpdateModules(bool onlyShowDialogIfUpdatesAreAvailable
3733
3737
{
3734
3738
if ( ! modules . UpdateAvailable && ! selectDefaultImagesIfNotYet && onlyShowDialogIfUpdatesAreAvailable )
3735
3739
{
3736
- if ( initializeImages ) InitializeImages ( ) ;
3740
+ InitializeImages ( ! initializeImages ) ;
3737
3741
return ;
3738
3742
}
3739
3743
3740
3744
if ( selectDefaultImagesIfNotYet )
3741
3745
modules . SelectDefaultImages ( ) ;
3742
3746
3743
3747
modules . ShowDialog ( ) ;
3744
- if ( modules . DialogResult != DialogResult . OK )
3745
- return ;
3748
+ var dialogResult = modules . DialogResult ;
3749
+
3750
+ InitializeImages ( true ) ;
3751
+
3752
+ if ( dialogResult != DialogResult . OK ) return ;
3746
3753
3747
3754
var result = await modules . DownloadRequestedModulesAsync ( ) ;
3748
3755
@@ -3757,12 +3764,15 @@ private async void DisplayUpdateModules(bool onlyShowDialogIfUpdatesAreAvailable
3757
3764
InitializeImages ( ) ;
3758
3765
}
3759
3766
3760
- void InitializeImages ( )
3767
+ void InitializeImages ( bool onlyIfNotYetSet = false )
3761
3768
{
3769
+ if ( onlyIfNotYetSet && ! string . IsNullOrEmpty ( Properties . Settings . Default . SpeciesImagesFolder ) )
3770
+ return ;
3771
+
3762
3772
Properties . Settings . Default . SpeciesImagesFolder = modules . GetSpeciesImagesFolder ( ) ;
3763
3773
CreatureColored . InitializeSpeciesImageLocation ( ) ;
3764
3774
3765
- if ( Properties . Settings . Default . SpeciesImagesFolder != null )
3775
+ if ( ! string . IsNullOrEmpty ( Properties . Settings . Default . SpeciesImagesFolder ) )
3766
3776
speciesSelector1 . InitializeSpeciesImages ( Values . V . species ) ;
3767
3777
}
3768
3778
}
0 commit comments