Mirror of 1.4.23 from Lovers Lab

This commit is contained in:
ghostclinic3YTB 2023-04-03 21:48:56 -04:00
parent b501ddfb0f
commit e47a1fc4f0
730 changed files with 646 additions and 182 deletions

View file

@ -273,7 +273,17 @@ namespace SizedApparel
else
targetRaceName = key.raceName;*/
AlienRaceSetting raceSetting;
raceSetting = SizedApparelSettings.alienRaceSettings.FirstOrDefault((AlienRaceSetting s) => s.raceName == key.raceName);
targetRaceName = key.raceName;
if(raceSetting != null && raceSetting.allowRaceNamedApparel == false)
{
targetRaceName = null;
}
Graphic graphic = null;
graphic = SizedApparelUtility.GetSizedApparelGraphic(sourceGraphic, SizedApparelUtility.BreastSizeIndexToSeverity(key.targetSize), out indexOut, out currentSeverityOut, out flag, out hediffResult, targetRaceName, key.hediffName, key.customPose, key.gender);//key.customPose
if(graphic == null && key.gender != Gender.None)
@ -299,12 +309,43 @@ namespace SizedApparel
result = new PathAndSize(graphic.path, indexOut, false, customPose, hediffResult, key.bodyTypeName, key.raceName);
SupportedApparelResultPath.SetOrAdd(key, result);
SupportedApparelOriginalPath.SetOrAdd(result.pathWithSizeIndex, key.pathWithoutSizeIndex);
return result;
}
else
{
//Try Search Human Apparel. then null
if (key.raceName != "Human" && key.raceName != null) // null check for avoid infinite loop
{
if (raceSetting != null && raceSetting.asHuman)
{
var newKey = new SizedApparelDatabaseKey(key.pathWithoutSizeIndex, "Human", key.bodyTypeName, key.gender, key.hediffName, key.targetSize, key.isHorny, key.customPose, key.variation);
result = GetSupportedApparelSizedPath(newKey, out indexOut, out currentSeverityOut);
SupportedApparelResultPath.SetOrAdd(key, result);
SupportedApparelOriginalPath.SetOrAdd(key.pathWithoutSizeIndex, key.pathWithoutSizeIndex);
return result;
}
else
{
var newKey = new SizedApparelDatabaseKey(key.pathWithoutSizeIndex, null, key.bodyTypeName, key.gender, key.hediffName, key.targetSize, key.isHorny, key.customPose, key.variation);
result = GetSupportedApparelSizedPath(newKey, out indexOut, out currentSeverityOut);
SupportedApparelResultPath.SetOrAdd(key, result);
SupportedApparelOriginalPath.SetOrAdd(key.pathWithoutSizeIndex, key.pathWithoutSizeIndex);
return result;
}
}
if (key.raceName == "Human")
{
var newKey = new SizedApparelDatabaseKey(key.pathWithoutSizeIndex, null, key.bodyTypeName, key.gender, key.hediffName, key.targetSize, key.isHorny, key.customPose, key.variation);
result = GetSupportedApparelSizedPath(newKey, out indexOut, out currentSeverityOut);
SupportedApparelResultPath.SetOrAdd(key, result);
SupportedApparelOriginalPath.SetOrAdd(key.pathWithoutSizeIndex, key.pathWithoutSizeIndex);
return result;
}
result = new PathAndSize(null, -1);
SupportedApparelResultPath.SetOrAdd(key, result);
SupportedApparelOriginalPath.SetOrAdd(key.pathWithoutSizeIndex, key.pathWithoutSizeIndex);
return result;
}
return result;
}