Implement progress monitoring for image generation in AIImages mod, enhancing user experience with real-time updates. Add localized strings for new features in English and Russian. Refactor UI components for better organization and clarity. Update AIImages.dll to reflect these changes.
This commit is contained in:
31
Source/AIImages/Components/PawnPortraitComp.cs
Normal file
31
Source/AIImages/Components/PawnPortraitComp.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Verse;
|
||||
|
||||
namespace AIImages.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Компонент для хранения данных AI-сгенерированного портрета пешки
|
||||
/// </summary>
|
||||
public class PawnPortraitComp : ThingComp
|
||||
{
|
||||
/// <summary>
|
||||
/// Путь к сохраненному портрету
|
||||
/// </summary>
|
||||
public string PortraitPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Есть ли сохраненный портрет
|
||||
/// </summary>
|
||||
public bool HasPortrait => !string.IsNullOrEmpty(PortraitPath);
|
||||
|
||||
/// <summary>
|
||||
/// Сохранение/загрузка данных
|
||||
/// </summary>
|
||||
public override void PostExposeData()
|
||||
{
|
||||
base.PostExposeData();
|
||||
string portraitPath = PortraitPath;
|
||||
Scribe_Values.Look(ref portraitPath, "aiPortraitPath", null);
|
||||
PortraitPath = portraitPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user