mirror of
				https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
				synced 2024-08-15 00:43:19 +00:00 
			
		
		
		
	Moved PreceptDefs into a separate class
This commit is contained in:
		
							parent
							
								
									3bedfec30e
								
							
						
					
					
						commit
						765e6c0778
					
				
					 9 changed files with 47 additions and 37 deletions
				
			
		| 
						 | 
				
			
			@ -12,9 +12,9 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
			if (ideo == null)
 | 
			
		||||
				return false;
 | 
			
		||||
 | 
			
		||||
			if (ideo.HasPrecept(VariousDefOf.Submissive_Female) && pawn.gender == Gender.Female)
 | 
			
		||||
			if (ideo.HasPrecept(RsiPreceptDefOf.Submissive_Female) && pawn.gender == Gender.Female)
 | 
			
		||||
				return true;
 | 
			
		||||
			else if (ideo.HasPrecept(VariousDefOf.Submissive_Male) && pawn.gender == Gender.Male)
 | 
			
		||||
			else if (ideo.HasPrecept(RsiPreceptDefOf.Submissive_Male) && pawn.gender == Gender.Male)
 | 
			
		||||
				return true;
 | 
			
		||||
 | 
			
		||||
			return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -63,6 +63,7 @@
 | 
			
		|||
    <Compile Include="RelationHelpers.cs" />
 | 
			
		||||
    <Compile Include="RomanceChanceFactorHelpers.cs" />
 | 
			
		||||
    <Compile Include="RsiHistoryEventDefOf.cs" />
 | 
			
		||||
    <Compile Include="RsiPreceptDefOf.cs" />
 | 
			
		||||
    <Compile Include="TwoPawnFilter.cs" />
 | 
			
		||||
    <Compile Include="SinglePawnFilter.cs" />
 | 
			
		||||
    <Compile Include="Precepts\Comp_SelfTookMemoryThought_Gendered.cs" />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
 | 
			
		||||
        public static bool CanBeBreeder(Pawn animal, Precept_Ritual precept)
 | 
			
		||||
        {
 | 
			
		||||
			if (precept != null && precept.ideo.HasPrecept(VariousDefOf.Bestiality_OnlyVenerated) && !precept.ideo.IsVeneratedAnimal(animal))
 | 
			
		||||
			if (precept != null && precept.ideo.HasPrecept(RsiPreceptDefOf.Bestiality_OnlyVenerated) && !precept.ideo.IsVeneratedAnimal(animal))
 | 
			
		||||
			{
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,7 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
 | 
			
		||||
			if (!relations.Any())
 | 
			
		||||
			{
 | 
			
		||||
				if (incestuousPrecept == VariousDefOf.Incestuos_IncestOnly)
 | 
			
		||||
				if (incestuousPrecept == RsiPreceptDefOf.Incestuos_IncestOnly)
 | 
			
		||||
				{
 | 
			
		||||
					return parentRomanceChanceFactor;
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			@ -46,16 +46,16 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
		/// </summary>
 | 
			
		||||
		public static float GetRomanceChanceFactor(PawnRelationDef relationDef, PreceptDef incestuousPrecept)
 | 
			
		||||
		{
 | 
			
		||||
			if (incestuousPrecept == null || incestuousPrecept == VariousDefOf.Incestuos_Disapproved) // Default game setup
 | 
			
		||||
			if (incestuousPrecept == null || incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved) // Default game setup
 | 
			
		||||
			{
 | 
			
		||||
				return relationDef.romanceChanceFactor;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			if (incestuousPrecept == VariousDefOf.Incestuos_Free)
 | 
			
		||||
			if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Free)
 | 
			
		||||
			{
 | 
			
		||||
				return 1f;
 | 
			
		||||
			}
 | 
			
		||||
			else if (incestuousPrecept == VariousDefOf.Incestuos_Disapproved_CloseOnly)
 | 
			
		||||
			else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Disapproved_CloseOnly)
 | 
			
		||||
			{
 | 
			
		||||
				if (relationDef.familyByBloodRelation && relationDef.importance > PawnRelationDefOf.Cousin.importance)
 | 
			
		||||
				{
 | 
			
		||||
| 
						 | 
				
			
			@ -66,14 +66,14 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
					return 1f;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			else if (incestuousPrecept == VariousDefOf.Incestuos_Forbidden)
 | 
			
		||||
			else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_Forbidden)
 | 
			
		||||
			{
 | 
			
		||||
				if (relationDef.familyByBloodRelation)
 | 
			
		||||
				{
 | 
			
		||||
					return parentRomanceChanceFactor;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			else if (incestuousPrecept == VariousDefOf.Incestuos_IncestOnly)
 | 
			
		||||
			else if (incestuousPrecept == RsiPreceptDefOf.Incestuos_IncestOnly)
 | 
			
		||||
			{
 | 
			
		||||
				if (!relationDef.familyByBloodRelation)
 | 
			
		||||
				{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,14 +5,14 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
	[DefOf]
 | 
			
		||||
	public static class RsiHistoryEventDefOf
 | 
			
		||||
	{
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_SexWithAnimal;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_Raped;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosMarriage;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_NonIncestuosSex;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_SexWithCorpse;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginTaken;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_VirginStolen;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_TookVirgin;
 | 
			
		||||
		[MayRequireIdeology] public static readonly HistoryEventDef RSI_Masturbated;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_SexWithAnimal;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_Raped;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_NonIncestuosMarriage;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_NonIncestuosSex;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_SexWithCorpse;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_VirginTaken;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_VirginStolen;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_TookVirgin;
 | 
			
		||||
		public static readonly HistoryEventDef RSI_Masturbated;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										20
									
								
								Source/IdeologyAddon/RsiPreceptDefOf.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Source/IdeologyAddon/RsiPreceptDefOf.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology
 | 
			
		||||
{
 | 
			
		||||
	[DefOf]
 | 
			
		||||
	public static class RsiPreceptDefOf
 | 
			
		||||
	{
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Free;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Disapproved_CloseOnly;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Disapproved;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Forbidden;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_IncestOnly;
 | 
			
		||||
		public static readonly PreceptDef Bestiality_OnlyVenerated;
 | 
			
		||||
		public static readonly PreceptDef BabyFaction_AlwaysFather;
 | 
			
		||||
		public static readonly PreceptDef BabyFaction_AlwaysColony;
 | 
			
		||||
		public static readonly PreceptDef Submissive_Male;
 | 
			
		||||
		public static readonly PreceptDef Submissive_Female;
 | 
			
		||||
		public static readonly PreceptDef ProselyzingByOrgasm;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -17,17 +17,6 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
		public static readonly MemeDef Rapist;
 | 
			
		||||
		public static readonly MemeDef Necrophile;
 | 
			
		||||
		public static readonly IssueDef Incestuos;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Free;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Disapproved_CloseOnly;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Disapproved;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_Forbidden;
 | 
			
		||||
		public static readonly PreceptDef Incestuos_IncestOnly;
 | 
			
		||||
		public static readonly PreceptDef Bestiality_OnlyVenerated;
 | 
			
		||||
		public static readonly PreceptDef BabyFaction_AlwaysFather;
 | 
			
		||||
		public static readonly PreceptDef BabyFaction_AlwaysColony;
 | 
			
		||||
		public static readonly PreceptDef Submissive_Male;
 | 
			
		||||
		public static readonly PreceptDef Submissive_Female;
 | 
			
		||||
		public static readonly PreceptDef ProselyzingByOrgasm;
 | 
			
		||||
		[MayRequireBiotech] public static readonly HediffDef PregnantHuman;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue