mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
RJW can move breasts on some animals, and that seems to make the breast comp properties null, so test for that.
This commit is contained in:
parent
9ce08ceab8
commit
26ff5f3d6c
3 changed files with 4 additions and 2 deletions
Binary file not shown.
|
@ -10,6 +10,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
public class CompProperties_Breast : HediffCompProperties
|
||||
{
|
||||
public static readonly ColorInt DefaultBlacknippleColor = new ColorInt(55, 20, 0);
|
||||
public string BreastTex = "Breasts/Breast";
|
||||
public ColorInt BlacknippleColor = new ColorInt(55, 20, 0);
|
||||
|
||||
|
@ -349,7 +350,8 @@ namespace RJW_Menstruation
|
|||
cachedAreola = baseAreola + nippleProgress * nippleChange;
|
||||
cachedNipple = baseNipple + nippleProgress * nippleChange;
|
||||
|
||||
cachedColor = Colors.CMYKLerp(parent.pawn.story?.SkinColor ?? Color.white, Props.BlackNippleColor, Alpha);
|
||||
// For some reason, Props can go null when RJW relocates the chest (e.g. some animals), so catch that
|
||||
cachedColor = Colors.CMYKLerp(parent.pawn.story?.SkinColor ?? Color.white, (Props?.BlackNippleColor ?? CompProperties_Breast.DefaultBlacknippleColor.ToColor), Alpha);
|
||||
}
|
||||
|
||||
public void CopyBreastProperties(HediffComp_Breast original)
|
||||
|
|
|
@ -167,7 +167,7 @@ namespace RJW_Menstruation
|
|||
{
|
||||
HediffComp_Breast comp = hediff.TryGetComp<HediffComp_Breast>();
|
||||
string icon;
|
||||
if (comp != null) icon = comp.Props.BreastTex ?? "Breasts/Breast_Breast";
|
||||
if (comp != null) icon = comp.Props?.BreastTex ?? "Breasts/Breast_Breast";
|
||||
else
|
||||
{
|
||||
breast = ContentFinder<Texture2D>.Get("Breasts/Breast_Breast00", false);
|
||||
|
|
Loading…
Reference in a new issue