mirror of
https://gitgud.io/ll.mirrors/sizedapparel.git
synced 2024-08-15 00:43:40 +00:00
Mirror of 1.4.15 from Lovers Lab
This commit is contained in:
parent
9a3d9f4185
commit
a5ed05c17b
1180 changed files with 4378 additions and 1905 deletions
|
@ -11,6 +11,27 @@ using rjw;
|
|||
|
||||
namespace SizedApparel
|
||||
{
|
||||
public class BodyTypeAndPath
|
||||
{
|
||||
public string BodyType;
|
||||
public string Path;
|
||||
}
|
||||
|
||||
public class ApparelData
|
||||
{
|
||||
public string WornPath;
|
||||
public List<BodyTypeAndPath> Data;
|
||||
}
|
||||
public class PreDefinedApparelDate : Def
|
||||
{
|
||||
public string HediffName;
|
||||
public bool IsBreasts = false;
|
||||
public List<BodyTypeAndPath> Data;
|
||||
}
|
||||
public class PreDefinedBodyPartGraphicDate : Def
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static class SizedApparelsDatabase
|
||||
{
|
||||
|
@ -20,6 +41,12 @@ namespace SizedApparel
|
|||
|
||||
}
|
||||
|
||||
public static void LoadPreDefinedData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public struct SizedApparelDatabaseKey
|
||||
{
|
||||
|
@ -107,9 +134,9 @@ namespace SizedApparel
|
|||
public bool isUnsupportedHumanlikePath;
|
||||
public bool isCustomPose;
|
||||
public string hediffName;
|
||||
public Dictionary<string, BodyPartPoint> points;
|
||||
public SizedApparelTexturePointDef points;
|
||||
|
||||
public PathAndSize(string path, int index, bool unsupportedHumanlike = false, bool customPose = false, string hediff = null ,Dictionary<string, BodyPartPoint> pointsInput = null)
|
||||
public PathAndSize(string path, int index, bool unsupportedHumanlike = false, bool customPose = false, string hediff = null , SizedApparelTexturePointDef pointsInput = null)
|
||||
{
|
||||
this.pathWithSizeIndex = path;
|
||||
this.size = index;
|
||||
|
@ -151,7 +178,8 @@ namespace SizedApparel
|
|||
AlienRaceUseHumanlike.Add(raceDef.defName, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
public static bool GetAlienRaceUseHumanlike(string raceDef)
|
||||
{
|
||||
if (AlienRaceUseHumanlike.NullOrEmpty())
|
||||
|
@ -279,12 +307,18 @@ namespace SizedApparel
|
|||
|
||||
public static PathAndSize GetSupportedBodyPartPath(BodyPartDatabaseKey key, bool isBreast, string folderName, string defaultHediffName)
|
||||
{
|
||||
|
||||
PathAndSize result;
|
||||
if (SupportedBodyPartResultPath.ContainsKey(key))
|
||||
return SupportedBodyPartResultPath.TryGetValue(key);
|
||||
int currentSize = -1;
|
||||
string hediffResult;
|
||||
Graphic graphic = null;
|
||||
|
||||
//Find Points from result's path
|
||||
//TODO: Build SizedApparel DataBase separate?
|
||||
|
||||
|
||||
if (key.customPose != null)
|
||||
{
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName+"/CustomPose/"+key.customPose, defaultHediffName, out currentSize, out hediffResult, key.isHorny, null, key.variation, key.gender);
|
||||
|
@ -292,6 +326,11 @@ namespace SizedApparel
|
|||
{
|
||||
result = new PathAndSize(graphic.path, currentSize, false, true, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
if (key.bodyTypeName != null)
|
||||
|
@ -300,6 +339,11 @@ namespace SizedApparel
|
|||
{
|
||||
result = new PathAndSize(graphic.path, currentSize, false, true, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -307,8 +351,14 @@ namespace SizedApparel
|
|||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, null, key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, false, key.customPose == null ? true : false, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -316,6 +366,11 @@ namespace SizedApparel
|
|||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, null, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, null, key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, false, key.customPose == null ? true : false, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
return result;
|
||||
|
@ -325,7 +380,7 @@ namespace SizedApparel
|
|||
//SizedApparelMod.CheckAndLoadAlienRaces();
|
||||
//HumanLike Search
|
||||
var raceSetting = SizedApparelSettings.alienRaceSettings.FirstOrDefault((AlienRaceSetting s) => s.raceName == key.raceName);
|
||||
if (raceSetting !=null && !raceSetting.asHumanlike) //old: !SizedApparelSettings.UnsupportedRaceToUseHumanlike
|
||||
if (raceSetting !=null && key.raceName == "Human" || !raceSetting.asHuman) //old: !SizedApparelSettings.UnsupportedRaceToUseHumanlike
|
||||
{
|
||||
//Cannot find Any result
|
||||
result = new PathAndSize(null, -1);
|
||||
|
@ -335,35 +390,55 @@ namespace SizedApparel
|
|||
|
||||
if (key.customPose != null)
|
||||
{
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName + "/CustomPose/" + key.customPose, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Humanlike", key.variation, key.gender);
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName + "/CustomPose/" + key.customPose, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Human", key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, true, true, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
return result;
|
||||
}
|
||||
if (key.bodyTypeName != null)
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, null, key.hediffName, isBreast, key.targetSize, folderName + "/CustomPose/" + key.customPose, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Humanlike", key.variation, key.gender);
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, null, key.hediffName, isBreast, key.targetSize, folderName + "/CustomPose/" + key.customPose, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Human", key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, true, true, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Humanlike", key.variation, key.gender);
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, key.bodyTypeName, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Human", key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, true, key.customPose == null ? true : false, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
if (key.bodyTypeName != null)
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, null, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Humanlike", key.variation, key.gender);
|
||||
graphic = SizedApparelUtility.GetBodyPartGraphic(key.raceName, null, key.hediffName, isBreast, key.targetSize, folderName, defaultHediffName, out currentSize, out hediffResult, key.isHorny, "Human", key.variation, key.gender);
|
||||
if (graphic != null)
|
||||
{
|
||||
//SizedApparelTexturePointDef PointsDef = DefDatabase<SizedApparelTexturePointDef>.AllDefs.FirstOrDefault((SizedApparelTexturePointDef s) => s.Path == graphic.path);
|
||||
//if (SizedApparelSettings.Debug && PointsDef != null)
|
||||
//{
|
||||
// Log.Message("[SizedApparel] : Points Def Found : " + PointsDef.defName);
|
||||
//}
|
||||
result = new PathAndSize(graphic.path, currentSize, true, key.customPose == null ? true : false, hediffResult);
|
||||
SupportedBodyPartResultPath.SetOrAdd(key, result);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue