Moved PreceptDefs into a separate class

This commit is contained in:
amevarashi 2022-11-20 18:55:13 +05:00
parent 3bedfec30e
commit 765e6c0778
9 changed files with 47 additions and 37 deletions

View file

@ -213,14 +213,14 @@ namespace RJWSexperience.Ideology.Patches
Ideo mainideo = playerfaction.ideos.PrimaryIdeo;
if (mainideo != null)
{
if (mainideo.HasPrecept(VariousDefOf.BabyFaction_AlwaysFather))
if (mainideo.HasPrecept(RsiPreceptDefOf.BabyFaction_AlwaysFather))
{
Pawn parent = baby.GetFather() ?? baby.GetMother();
ideo = parent.Ideo;
return parent.Faction;
}
else if (mainideo.HasPrecept(VariousDefOf.BabyFaction_AlwaysColony))
else if (mainideo.HasPrecept(RsiPreceptDefOf.BabyFaction_AlwaysColony))
{
ideo = mainideo;
return playerfaction;
@ -241,7 +241,7 @@ namespace RJWSexperience.Ideology.Patches
if (props.pawn?.Ideo == null || !props.hasPartner())
return;
if (props.partner.Ideo?.HasPrecept(VariousDefOf.ProselyzingByOrgasm) == true)
if (props.partner.Ideo?.HasPrecept(RsiPreceptDefOf.ProselyzingByOrgasm) == true)
{
// Pawn is the one having the orgasm
// Partner is "giving" the orgasm, hence the pawn will be converted towards the partners ideology

View file

@ -83,20 +83,20 @@ namespace RJWSexperience.Ideology.Patches
BloodRelationDegree relationDegree = RelationHelpers.GetBloodRelationDegree(one, two);
if (incestuousPrecept == null ||
incestuousPrecept == VariousDefOf.Incestuos_Disapproved ||
incestuousPrecept == VariousDefOf.Incestuos_Forbidden)
incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved ||
incestuousPrecept == RsiPreceptDefOf.Incestuos_Forbidden)
{
return relationDegree < BloodRelationDegree.NotRelated;
}
else if (incestuousPrecept == VariousDefOf.Incestuos_Free)
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Free)
{
return false;
}
else if (incestuousPrecept == VariousDefOf.Incestuos_Disapproved_CloseOnly)
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved_CloseOnly)
{
return relationDegree == BloodRelationDegree.CloseRelative;
}
else if (incestuousPrecept == VariousDefOf.Incestuos_IncestOnly)
else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_IncestOnly)
{
return relationDegree == BloodRelationDegree.NotRelated;
}