Humanoid fixes (#11538)

* humanoid sexmorph sprite restoration

can't believe i broke sex/gender AGAIN

* fixes default species appearances with no profile, tweaks randomization to no longer randomize species

* A

* fixes an oops

#11494
This commit is contained in:
Flipp Syder
2022-09-26 12:46:57 -07:00
committed by GitHub
parent 66e9c1975a
commit 0e1a190e0e
14 changed files with 107 additions and 31 deletions

View File

@@ -15,11 +15,10 @@ public static class SkinColor
}
/// <summary>
/// Get a human skin tone based on a scale of 0 to 100.
/// Get a human skin tone based on a scale of 0 to 100. The value is clamped between 0 and 100.
/// </summary>
/// <param name="tone">Skin tone. Valid range is 0 to 100, inclusive. 0 is gold/yellowish, 100 is dark brown.</param>
/// <returns>A human skin tone.</returns>
/// <exception cref="ArgumentException">Exception if the value is under 0 or over 100.</exception>
public static Color HumanSkinTone(int tone)
{
// 0 - 100, 0 being gold/yellowish and 100 being dark
@@ -31,10 +30,7 @@ public static class SkinColor
// 20 is 25 - 20 - 100
// 100 is 25 - 100 - 20
if (tone < 0 || tone > 100)
{
throw new ArgumentException("Skin tone value was under 0 or over 100.");
}
tone = Math.Clamp(tone, 0, 100);
var rangeOffset = tone - 20;