mirror of
https://gitgud.io/ll.mirrors/sizedapparel.git
synced 2024-08-15 00:43:40 +00:00
Mirror of 1.4.22 from Lovers Lab
This commit is contained in:
parent
5d0da3bc88
commit
b501ddfb0f
1119 changed files with 12505 additions and 2543 deletions
58
1.3/source/SizedApparel/SizedApparelDef.cs
Normal file
58
1.3/source/SizedApparel/SizedApparelDef.cs
Normal file
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using HarmonyLib;
|
||||
//using AlienRace;
|
||||
using UnityEngine;
|
||||
using rjw;
|
||||
|
||||
namespace SizedApparel
|
||||
{
|
||||
|
||||
//for avoid first hitch. some day it might need make pre def for fast cache...
|
||||
|
||||
public class ApparelTexture
|
||||
{
|
||||
public BodyTypeDef bodytype;
|
||||
public List<string> textures;
|
||||
|
||||
public string GetTexturePath(int level, out int result)
|
||||
{
|
||||
result = -1;
|
||||
if (level < 0)
|
||||
return null;
|
||||
if (textures.Count > level)
|
||||
{
|
||||
result = level;
|
||||
return textures[level];
|
||||
}
|
||||
if (!textures.NullOrEmpty())
|
||||
{
|
||||
result = textures.Count - 1;
|
||||
return textures[result]; //return biggest as supported
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public class SizedApparelDef : Def
|
||||
{
|
||||
//def name must be match with apparels DefName
|
||||
public bool hidingGenitals = false; // pants must be true
|
||||
public List<ApparelTexture> SizedTextures;
|
||||
|
||||
public ApparelTexture GetApparelTexture(BodyTypeDef bodytype)
|
||||
{
|
||||
if(SizedTextures != null)
|
||||
{
|
||||
return SizedTextures.FirstOrDefault(a => a.bodytype == bodytype);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue