mirror of
				https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
				synced 2024-08-15 00:43:19 +00:00 
			
		
		
		
	Compare commits
	
		
			7 commits
		
	
	
		
			38f5b6f0cc
			...
			f5ec31f8e7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						f5ec31f8e7 | ||
| 
							 | 
						b6942e3c10 | ||
| 
							 | 
						450c835d2b | ||
| 
							 | 
						bf7f6a29fb | ||
| 
							 | 
						d483924c47 | ||
| 
							 | 
						36f879e0b6 | ||
| 
							 | 
						ac5bbc7519 | 
					 17 changed files with 63 additions and 21 deletions
				
			
		
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 | 
			
		||||
<Manifest>
 | 
			
		||||
	<identifier>RJWSexperienceIdeology</identifier>
 | 
			
		||||
	<version>1.0.1.0</version>
 | 
			
		||||
	<version>1.0.1.1</version>
 | 
			
		||||
	<dependencies>
 | 
			
		||||
		<li>RimJobWorld >= 5.3.0</li>
 | 
			
		||||
	</dependencies>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,9 @@
 | 
			
		|||
## Version 1.0.1.1
 | 
			
		||||
* Fixed Ideology overwriting Sexperience's mod settings label
 | 
			
		||||
* Fixed submissive gender can't be marked for comfort
 | 
			
		||||
* Fixed new precepts adding thoughts to children
 | 
			
		||||
* Fixed Sexual Proselyzing precept
 | 
			
		||||
* Fixed biotech pregnancy not counting for pregnancy precepts
 | 
			
		||||
## Version 1.0.1.0
 | 
			
		||||
* Rimworld 1.4
 | 
			
		||||
### by Twonki
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LanguageData>
 | 
			
		||||
  <RS_Mod_Title>RJW 性经验</RS_Mod_Title>
 | 
			
		||||
  <RSI_Mod_Title>RJW 性经验</RSI_Mod_Title>
 | 
			
		||||
 | 
			
		||||
  <MemeStatFactor>迷因</MemeStatFactor>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LanguageData>
 | 
			
		||||
  <RS_Mod_Title>RJW Sexperience Ideology</RS_Mod_Title>
 | 
			
		||||
  <RSI_Mod_Title>RJW Sexperience Ideology</RSI_Mod_Title>
 | 
			
		||||
 | 
			
		||||
  <MemeStatFactor>Meme</MemeStatFactor>
 | 
			
		||||
  <RSVictimCondition>slave, prisoner, submissive gender only</RSVictimCondition>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LanguageData>
 | 
			
		||||
  <RS_Mod_Title>RJW Sexperience Ideology</RS_Mod_Title>
 | 
			
		||||
  <RSI_Mod_Title>RJW Sexperience Ideology</RSI_Mod_Title>
 | 
			
		||||
 | 
			
		||||
  <MemeStatFactor>문화 요소</MemeStatFactor>
 | 
			
		||||
  <RSVictimCondition>노예, 죄수, 순종적인 성별만 가능합니다.</RSVictimCondition>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<LanguageData>
 | 
			
		||||
  <RS_Mod_Title>RJW Sexperience</RS_Mod_Title>
 | 
			
		||||
  <RSI_Mod_Title>RJW Sexperience</RSI_Mod_Title>
 | 
			
		||||
 | 
			
		||||
  <MemeStatFactor>Принцип идеологии</MemeStatFactor>
 | 
			
		||||
  <RSVictimCondition>раб, заключенный, подчиненный только по полу</RSVictimCondition>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,5 +80,18 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
 | 
			
		||||
			return bestSeenSize;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public static bool IsVisiblyPregnant(Pawn pawn)
 | 
			
		||||
		{
 | 
			
		||||
			Hediff pregnancy = PregnancyHelper.GetPregnancy(pawn);
 | 
			
		||||
 | 
			
		||||
			// Currently RJW does not check Biotech pregnancy
 | 
			
		||||
			if (pregnancy == null && VariousDefOf.PregnantHuman != null)
 | 
			
		||||
			{
 | 
			
		||||
				pregnancy = pawn.health.hediffSet.GetFirstHediffOfDef(HediffDefOf.PregnantHuman);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			return pregnancy?.Visible == true;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -32,7 +32,7 @@
 | 
			
		|||
  </PropertyGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\rjw\1.3\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <HintPath>..\..\..\rjw\1.4\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="System.Core" />
 | 
			
		||||
| 
						 | 
				
			
			@ -94,7 +94,7 @@
 | 
			
		|||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <PackageReference Include="Krafs.Rimworld.Ref">
 | 
			
		||||
      <Version>1.4.3524</Version>
 | 
			
		||||
      <Version>1.4.3530</Version>
 | 
			
		||||
    </PackageReference>
 | 
			
		||||
    <PackageReference Include="Lib.Harmony">
 | 
			
		||||
      <Version>2.2.2</Version>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -156,10 +156,11 @@ namespace RJWSexperience.Ideology.Patches
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(PawnDesignations_Comfort), nameof(PawnDesignations_Comfort.UpdateCanDesignateComfort))]
 | 
			
		||||
	public static class RJW_PatchUpdateCanDesignateComfort
 | 
			
		||||
	[HarmonyPatch(typeof(PawnDesignations_Comfort))]
 | 
			
		||||
	public static class RJW_Patch_PawnDesignations_Comfort_Submissive
 | 
			
		||||
	{
 | 
			
		||||
		public static void Postfix(Pawn pawn, ref bool __result)
 | 
			
		||||
		[HarmonyPostfix, HarmonyPatch(nameof(PawnDesignations_Comfort.UpdateCanDesignateComfort))]
 | 
			
		||||
		public static void UpdateCanDesignateComfort(Pawn pawn, ref bool __result)
 | 
			
		||||
		{
 | 
			
		||||
			if (pawn.IsSubmissive())
 | 
			
		||||
			{
 | 
			
		||||
| 
						 | 
				
			
			@ -167,6 +168,25 @@ namespace RJWSexperience.Ideology.Patches
 | 
			
		|||
				__result = true;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// RJW undesignates if it thinks that the pawn can't be a comfort pawn.
 | 
			
		||||
		/// Why the hell checker method changes the state?
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		/// <param name="pawn">Pawn to check</param>
 | 
			
		||||
		/// <param name="__result">Is pawn currenlty designated as comfort</param>
 | 
			
		||||
		/// <returns>Run the original method</returns>
 | 
			
		||||
		[HarmonyPrefix, HarmonyPatch(nameof(PawnDesignations_Comfort.IsDesignatedComfort))]
 | 
			
		||||
		public static bool IsDesignatedComfort(Pawn pawn, ref bool __result)
 | 
			
		||||
		{
 | 
			
		||||
			if (pawn.IsSubmissive() && !pawn.Dead)
 | 
			
		||||
			{
 | 
			
		||||
				__result = pawn.GetRJWPawnData().Comfort;
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(Hediff_BasePregnancy), nameof(Hediff_BasePregnancy.PostBirth))]
 | 
			
		||||
| 
						 | 
				
			
			@ -218,7 +238,7 @@ namespace RJWSexperience.Ideology.Patches
 | 
			
		|||
		public static void Postfix(SexProps props)
 | 
			
		||||
		{
 | 
			
		||||
			// ShortCuts: Exit Early if Pawn or Partner are null (can happen with Animals or Masturbation)
 | 
			
		||||
			if (props.pawn != null && props.hasPartner())
 | 
			
		||||
			if (props.pawn == null || !props.hasPartner())
 | 
			
		||||
				return;
 | 
			
		||||
 | 
			
		||||
			if (props.partner.Ideo?.HasPrecept(VariousDefOf.ProselyzingByOrgasm) == true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			if (p != null && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
 | 
			
		||||
			if (p?.DevelopmentalStage == DevelopmentalStage.Adult && Genital_Helper.get_AllPartsHediffList(p).Count > 0)
 | 
			
		||||
			{
 | 
			
		||||
				float bestSize = IdeoUtility.GetGenitalSize(p);
 | 
			
		||||
				return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
		// Important Note: For the Social Worker, we measure otherPawns genitalia 
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
 | 
			
		||||
		{
 | 
			
		||||
			if (otherPawn != null && Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
 | 
			
		||||
			if (otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				p?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				Genital_Helper.get_AllPartsHediffList(otherPawn).Count > 0)
 | 
			
		||||
			{
 | 
			
		||||
				float bestSize = IdeoUtility.GetGenitalSize(otherPawn);
 | 
			
		||||
				return ThoughtState.ActiveAtStage(StageFromValue.GetStageIndex(bestSize));
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		||||
| 
						 | 
				
			
			@ -15,7 +14,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
		/// <returns></returns>
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			return PregnancyHelper.GetPregnancy(p)?.Visible != true;
 | 
			
		||||
			return p?.DevelopmentalStage == DevelopmentalStage.Adult && !IdeoUtility.IsVisiblyPregnant(p);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		||||
| 
						 | 
				
			
			@ -16,7 +15,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
		/// <returns></returns>
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
 | 
			
		||||
		{
 | 
			
		||||
			return PregnancyHelper.GetPregnancy(otherPawn)?.Visible != true;
 | 
			
		||||
			return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				p?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				!IdeoUtility.IsVisiblyPregnant(otherPawn);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		||||
| 
						 | 
				
			
			@ -15,7 +14,7 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
		/// <returns></returns>
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p)
 | 
			
		||||
		{
 | 
			
		||||
			return PregnancyHelper.GetPregnancy(p)?.Visible == true;
 | 
			
		||||
			return p?.DevelopmentalStage == DevelopmentalStage.Adult && IdeoUtility.IsVisiblyPregnant(p);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,4 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
 | 
			
		||||
namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		||||
| 
						 | 
				
			
			@ -16,7 +15,9 @@ namespace RJWSexperience.Ideology.PreceptWorkers
 | 
			
		|||
		/// <returns></returns>
 | 
			
		||||
		protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
 | 
			
		||||
		{
 | 
			
		||||
			return PregnancyHelper.GetPregnancy(otherPawn)?.Visible == true;
 | 
			
		||||
			return otherPawn?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				p?.DevelopmentalStage == DevelopmentalStage.Adult &&
 | 
			
		||||
				IdeoUtility.IsVisiblyPregnant(otherPawn);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,5 +22,6 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
		[MayRequireIdeology] public static readonly PreceptDef Submissive_Male;
 | 
			
		||||
		[MayRequireIdeology] public static readonly PreceptDef Submissive_Female;
 | 
			
		||||
		[MayRequireIdeology] public static readonly PreceptDef ProselyzingByOrgasm;
 | 
			
		||||
		[MayRequireBiotech] public static readonly HediffDef PregnantHuman;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue