2024-05-26 09:52:18 +00:00
|
|
|
using rjw;
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
{
|
|
|
|
// bleh plural attributive noun in keeping with naming convention
|
|
|
|
public class Gene_GenitaliaType : RJW_Gene
|
|
|
|
{
|
|
|
|
public override void PostMake()
|
|
|
|
{
|
|
|
|
base.PostMake();
|
2024-05-29 11:00:55 +00:00
|
|
|
|
2024-05-26 09:52:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public override void PostAdd()
|
|
|
|
{
|
|
|
|
base.PostAdd();
|
|
|
|
Apply();
|
|
|
|
}
|
|
|
|
|
|
|
|
protected virtual void Apply()
|
|
|
|
{
|
2024-05-29 11:00:55 +00:00
|
|
|
if (this.Active)
|
2024-05-26 09:52:18 +00:00
|
|
|
{
|
2024-05-29 11:00:55 +00:00
|
|
|
GenitaliaTypeExtension genitals = def.GetModExtension<GenitaliaTypeExtension>();
|
|
|
|
if (genitals == null && RJW_Genes_Settings.rjw_genes_detailed_debug)
|
|
|
|
{
|
|
|
|
ModLog.Error($"Gene {def} failed to change genitals - Need a modExtension with Class=\"{typeof(GenitaliaTypeExtension).FullName}\".");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
GenitaliaChanger.ChangeGenitalia(pawn, genitals.penis, genitals.vagina, genitals.anus);
|
2024-05-26 09:52:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|