Refactor skin tone description logic in AIImages mod to prioritize gene-based descriptions over color fallback. Update ColorDescriptionService to include new methods for gene skin tone extraction. Modify related services and UI components to utilize the updated skin tone logic. Update AIImages.dll to reflect these changes.
This commit is contained in:
@@ -79,12 +79,13 @@ namespace AIImages.Services
|
||||
prompt.Append(", ");
|
||||
}
|
||||
|
||||
// 7. Цвет кожи
|
||||
string skinTone = ColorDescriptionService.GetSkinToneDescription(
|
||||
appearanceData.SkinColor
|
||||
);
|
||||
prompt.Append(skinTone);
|
||||
prompt.Append(", ");
|
||||
// 7. Цвет кожи (сначала проверяем гены, затем используем цвет как fallback)
|
||||
string skinTone = GetSkinToneDescription(appearanceData);
|
||||
if (!string.IsNullOrEmpty(skinTone))
|
||||
{
|
||||
prompt.Append(skinTone);
|
||||
prompt.Append(", ");
|
||||
}
|
||||
|
||||
// 8. Волосы
|
||||
string hairDescription = GetHairDescription(appearanceData);
|
||||
@@ -200,6 +201,14 @@ namespace AIImages.Services
|
||||
};
|
||||
}
|
||||
|
||||
private string GetSkinToneDescription(PawnAppearanceData data)
|
||||
{
|
||||
// Этот метод будет использоваться в контексте генерации промптов
|
||||
// где у нас есть только данные внешности, но не сам Pawn
|
||||
// Поэтому используем fallback к определению по цвету
|
||||
return ColorDescriptionService.GetSkinToneDescription(data.SkinColor);
|
||||
}
|
||||
|
||||
private string GetHairDescription(PawnAppearanceData data)
|
||||
{
|
||||
if (string.IsNullOrEmpty(data.HairDefName))
|
||||
|
||||
Reference in New Issue
Block a user