Files
ai-images/Source/AIImages/Models/PawnAppearanceData.cs

55 lines
1.8 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 List<string> SkinColorGeneDefNames { get; set; }
public List<string> HairColorGeneDefNames { get; set; }
public string HairStyle { get; set; }
public string HairDefName { get; set; }
public Color HairColor { get; set; }
public List<Trait> Traits { get; set; }
public List<ApparelData> Apparel { get; set; }
public string EventDescription { get; set; }
public PawnAppearanceData()
{
Traits = new List<Trait>();
Apparel = new List<ApparelData>();
SkinColorGeneDefNames = new List<string>();
HairColorGeneDefNames = new List<string>();
}
}
/// <summary>
/// Данные об одежде персонажа
/// </summary>
public class ApparelData
{
public string Label { get; set; }
public string DefName { get; set; }
public string Material { get; set; }
public string MaterialDefName { 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;
}
}