mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
HAR gained a builtin property copier, so use that instead
This commit is contained in:
parent
2dd86964d4
commit
4a41bb69f4
2 changed files with 3 additions and 13 deletions
|
@ -16,19 +16,8 @@ namespace RJW_Menstruation
|
|||
|
||||
public static void CopyHARProperties(Pawn baby, Pawn original)
|
||||
{
|
||||
AlienPartGenerator.AlienComp babyHARComp = baby?.TryGetComp<AlienPartGenerator.AlienComp>();
|
||||
AlienPartGenerator.AlienComp originalHARComp = original?.TryGetComp<AlienPartGenerator.AlienComp>();
|
||||
if (babyHARComp == null || originalHARComp == null) return;
|
||||
|
||||
babyHARComp.addonVariants = new List<int>(originalHARComp.addonVariants);
|
||||
foreach (KeyValuePair<string, AlienPartGenerator.ExposableValueTuple<Color, Color>> channel in originalHARComp.ColorChannels)
|
||||
{
|
||||
babyHARComp.OverwriteColorChannel(channel.Key, channel.Value.first, channel.Value.second);
|
||||
}
|
||||
babyHARComp.headVariant = originalHARComp.headVariant;
|
||||
babyHARComp.bodyVariant = originalHARComp.bodyVariant;
|
||||
babyHARComp.headMaskVariant = originalHARComp.headMaskVariant;
|
||||
babyHARComp.bodyMaskVariant = originalHARComp.bodyMaskVariant;
|
||||
if (!baby.HasComp<AlienPartGenerator.AlienComp>() || !original.HasComp<AlienPartGenerator.AlienComp>()) return;
|
||||
AlienPartGenerator.AlienComp.CopyAlienData(original, baby);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -457,6 +457,7 @@ namespace RJW_Menstruation
|
|||
return Color.white;
|
||||
}
|
||||
}
|
||||
|
||||
public static ThingDef BloodDef(Pawn pawn)
|
||||
{
|
||||
if (pawn == null) return ThingDefOf.Filth_Blood;
|
||||
|
|
Loading…
Reference in a new issue