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:
Leonid Pershin
2025-10-26 22:56:38 +03:00
parent b9d7ea0c04
commit d67ec8c0ac
11 changed files with 470 additions and 94 deletions

View 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;
}
}
}