Enhance AIImages mod with settings support and improved UI for image generation. Update localized strings in English and Russian for better clarity. Refactor code for better organization and maintainability.

This commit is contained in:
Leonid Pershin
2025-10-26 18:09:30 +03:00
parent 990c8695b7
commit 0f60721162
17 changed files with 1907 additions and 335 deletions

View File

@@ -0,0 +1,46 @@
using System.Collections.Generic;
using RimWorld;
using UnityEngine;
using Verse;
namespace AIImages.Models
{
/// <summary>
/// Модель данных внешности персонажа для генерации промптов
/// </summary>
public class PawnAppearanceData
{
public string Name { get; set; }
public Gender Gender { get; set; }
public int Age { get; set; }
public string BodyType { get; set; }
public Color SkinColor { get; set; }
public string HairStyle { get; set; }
public Color HairColor { get; set; }
public List<Trait> Traits { get; set; }
public List<ApparelData> Apparel { get; set; }
public PawnAppearanceData()
{
Traits = new List<Trait>();
Apparel = new List<ApparelData>();
}
}
/// <summary>
/// Данные об одежде персонажа
/// </summary>
public class ApparelData
{
public string Label { get; set; }
public string Material { get; set; }
public QualityCategory? Quality { get; set; }
public Color Color { get; set; }
public string LayerType { get; set; }
public int Durability { get; set; }
public int MaxDurability { get; set; }
public float DurabilityPercent =>
MaxDurability > 0 ? (float)Durability / MaxDurability : 1f;
}
}