Slightly more efficient comp copier for menstruation and breast

This commit is contained in:
lutepickle 2022-07-27 14:41:17 -07:00
parent 3cca6db53e
commit 9b0363aec2

View file

@ -204,17 +204,15 @@ namespace RJW_Menstruation
comp.FluidModifier = originalComp.FluidModifier; comp.FluidModifier = originalComp.FluidModifier;
} }
HediffComp_Menstruation menstruationComp = part.GetMenstruationComp();
HediffComp_Menstruation originalMenstruationComp = originalPart.GetMenstruationComp(); HediffComp_Menstruation originalMenstruationComp = originalPart.GetMenstruationComp();
if (menstruationComp != null && originalMenstruationComp != null) if (originalMenstruationComp != null)
{ {
menstruationComp.CopyCycleProperties(originalMenstruationComp); part.GetMenstruationComp()?.CopyCycleProperties(originalMenstruationComp);
} }
HediffComp_Breast breastComp = part.GetBreastComp();
HediffComp_Breast originalBreastComp = originalPart.GetBreastComp(); HediffComp_Breast originalBreastComp = originalPart.GetBreastComp();
if (breastComp != null && originalBreastComp != null) if (originalBreastComp != null)
{ {
breastComp.CopyBreastProperties(originalBreastComp); part.GetBreastComp()?.CopyBreastProperties(originalBreastComp);
} }
} }