@@ -212,7 +212,7 @@ private Creature ImportExportedAddIfPossible(string filePath)
212
212
&& Properties . Settings . Default . OnAutoImportAddToLibrary )
213
213
{
214
214
creature = AddCreatureToCollection ( true , goToLibraryTab : Properties . Settings . Default . AutoImportGotoLibraryAfterSuccess ) ;
215
- SetMessageLabelText ( $ "Successful { ( alreadyExists ? "updated" : "added" ) } { creature . name } ({ species . name } ) of the exported file" + Environment . NewLine + filePath , MessageBoxIcon . Information , filePath ) ;
215
+ SetMessageLabelText ( $ "Successful { ( alreadyExists ? "updated" : "added" ) } { creature . name } ({ species . Name ( creature . sex ) } ) of the exported file" + Environment . NewLine + filePath , MessageBoxIcon . Information , filePath ) ;
216
216
addedToLibrary = true ;
217
217
}
218
218
break ;
@@ -235,7 +235,7 @@ private Creature ImportExportedAddIfPossible(string filePath)
235
235
creature = GetCreatureFromInput ( true , species , levelStep ) ;
236
236
}
237
237
238
- OverlayFeedbackForImport ( creature , uniqueExtraction , alreadyExists , addedToLibrary , copiedNameToClipboard ) ;
238
+ OverlayFeedbackForImport ( creature , uniqueExtraction , alreadyExistingCreature , addedToLibrary , copiedNameToClipboard ) ;
239
239
240
240
if ( addedToLibrary )
241
241
{
@@ -374,7 +374,7 @@ private bool CopyCreatureNameToClipboardOnImportIfSetting(string creatureName, b
374
374
/// <summary>
375
375
/// Give feedback in overlay for imported creature.
376
376
/// </summary>
377
- private void OverlayFeedbackForImport ( Creature creature , bool uniqueExtraction , bool alreadyExists , bool addedToLibrary ,
377
+ private void OverlayFeedbackForImport ( Creature creature , bool uniqueExtraction , Creature alreadyExistingCreature , bool addedToLibrary ,
378
378
bool copiedNameToClipboard )
379
379
{
380
380
string infoText ;
@@ -383,7 +383,7 @@ private void OverlayFeedbackForImport(Creature creature, bool uniqueExtraction,
383
383
if ( uniqueExtraction )
384
384
{
385
385
var sb = new StringBuilder ( ) ;
386
- sb . AppendLine ( $ "{ creature . Species . name } \" { creature . name } \" { ( alreadyExists ? "updated in " : "added to" ) } the library.") ;
386
+ sb . AppendLine ( $ "{ creature . SpeciesName } \" { creature . name } \" { ( alreadyExistingCreature != null ? "updated in " : "added to" ) } the library.") ;
387
387
if ( addedToLibrary && copiedNameToClipboard )
388
388
sb . AppendLine ( "Name copied to clipboard." ) ;
389
389
@@ -407,6 +407,20 @@ private void OverlayFeedbackForImport(Creature creature, bool uniqueExtraction,
407
407
408
408
if ( _overlay != null )
409
409
{
410
+ var overlayPattern = Properties . Settings . Default . OverlayImportPattern ;
411
+ if ( ! string . IsNullOrEmpty ( overlayPattern ) )
412
+ {
413
+ var overlayPatternResult = NamePattern . GenerateCreatureName ( creature , alreadyExistingCreature ,
414
+ _creatureCollection . creatures . Where ( c => c . Species == creature . Species ) . ToArray ( ) ,
415
+ _topLevels . TryGetValue ( creature . Species , out var tl ) ? tl : null ,
416
+ _customReplacingNamingPattern , false , - 1 , false , overlayPattern ,
417
+ false , colorsExisting : _creatureCollection . ColorAlreadyAvailable ( creature . Species , creature . colors , out _ ) ,
418
+ libraryCreatureCount : _creatureCollection . GetTotalCreatureCount ( ) ) ;
419
+
420
+ if ( ! string . IsNullOrEmpty ( overlayPatternResult ) )
421
+ infoText += Environment . NewLine + Environment . NewLine + overlayPatternResult ;
422
+ }
423
+
410
424
_overlay . SetInfoText ( infoText , textColor ) ;
411
425
if ( Properties . Settings . Default . DisplayInheritanceInOverlay )
412
426
_overlay . SetInheritanceCreatures ( creature , creature . Mother , creature . Father ) ;
0 commit comments