mirror of
				https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
				synced 2024-08-15 00:43:19 +00:00 
			
		
		
		
	initial 1.5
This commit is contained in:
		
							parent
							
								
									e19b6d8ff3
								
							
						
					
					
						commit
						2f7a1c0883
					
				
					 48 changed files with 6295 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using rjw;
 | 
			
		||||
using LudeonTK;
 | 
			
		||||
using rjw;
 | 
			
		||||
using RJWSexperience.Ideology.HistoryEvents;
 | 
			
		||||
using RJWSexperience.Ideology.Patches;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,25 +6,27 @@
 | 
			
		|||
    <AssemblyName>RJWSexperience.Ideology</AssemblyName>
 | 
			
		||||
    <TargetFramework>net48</TargetFramework>
 | 
			
		||||
    <Optimize>true</Optimize>
 | 
			
		||||
    <OutputPath>..\..\1.4\Assemblies\</OutputPath>
 | 
			
		||||
    <OutputPath>..\..\1.5\Assemblies\</OutputPath>
 | 
			
		||||
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
 | 
			
		||||
    <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
 | 
			
		||||
    <DebugSymbols>false</DebugSymbols>
 | 
			
		||||
    <DebugType>none</DebugType>
 | 
			
		||||
    <LangVersion>8.0</LangVersion>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\rjw\1.4\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <HintPath>..\..\..\rjw\1.5\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <PackageReference Include="Krafs.Rimworld.Ref">
 | 
			
		||||
      <Version>1.4.*</Version>
 | 
			
		||||
      <Version>1.5.*</Version>
 | 
			
		||||
    </PackageReference>
 | 
			
		||||
    <PackageReference Include="Lib.Harmony">
 | 
			
		||||
      <Version>2.2.*</Version>
 | 
			
		||||
      <Version>2.*</Version>
 | 
			
		||||
      <ExcludeAssets>runtime</ExcludeAssets>
 | 
			
		||||
      <IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
 | 
			
		||||
    </PackageReference>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
using rjw;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using Verse;
 | 
			
		||||
using Verse.AI;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +36,7 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
		{
 | 
			
		||||
			if (duty != null)
 | 
			
		||||
			{
 | 
			
		||||
				List<Pawn> pawns = pawn.Map.mapPawns.AllPawnsSpawned.FindAll(x => x.mindState?.duty?.def == duty.def);
 | 
			
		||||
				IEnumerable<Pawn> pawns = pawn.Map.mapPawns.AllPawnsSpawned.Where(x => x.mindState?.duty?.def == duty.def);
 | 
			
		||||
				return pawns.RandomElementByWeightWithDefault(x => SexAppraiser.would_fuck(pawn, x), 0.1f);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -190,7 +191,14 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
			get_loved.AddFinishAction(delegate
 | 
			
		||||
			{
 | 
			
		||||
				if (xxx.is_human(pawn))
 | 
			
		||||
					pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
 | 
			
		||||
				{
 | 
			
		||||
					CompRJW comp = CompRJW.Comp(pawn);
 | 
			
		||||
					if (comp != null)
 | 
			
		||||
					{
 | 
			
		||||
						comp.drawNude = false;
 | 
			
		||||
						pawn.Drawer.renderer.SetAllGraphicsDirty();
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
			get_loved.socialMode = RandomSocialMode.Off;
 | 
			
		||||
			return get_loved;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -135,7 +135,14 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
			get_banged.AddFinishAction(delegate
 | 
			
		||||
			{
 | 
			
		||||
				if (xxx.is_human(pawn))
 | 
			
		||||
					pawn.Drawer.renderer.graphics.ResolveApparelGraphics();
 | 
			
		||||
				{
 | 
			
		||||
					CompRJW comp = CompRJW.Comp(pawn);
 | 
			
		||||
					if (comp != null)
 | 
			
		||||
					{
 | 
			
		||||
						comp.drawNude = false;
 | 
			
		||||
						pawn.Drawer.renderer.SetAllGraphicsDirty();
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
 | 
			
		||||
 | 
			
		||||
				if (Bed != null && pawn.Downed)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,14 +36,14 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
 | 
			
		||||
		public override QualityFactor GetQualityFactor(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
 | 
			
		||||
		{
 | 
			
		||||
			return new ExpectedOutcomeDesc
 | 
			
		||||
			return new QualityFactor
 | 
			
		||||
			{
 | 
			
		||||
				label = LabelForDesc.CapitalizeFirst(),
 | 
			
		||||
				present = false,
 | 
			
		||||
				uncertainOutcome = true,
 | 
			
		||||
				effect = ExpectedOffsetDesc(true, -1f),
 | 
			
		||||
				qualityChange = ExpectedOffsetDesc(true, -1f),
 | 
			
		||||
				quality = qualityOffset,
 | 
			
		||||
				positive = true
 | 
			
		||||
			};
 | 
			
		||||
| 
						 | 
				
			
			@ -62,22 +62,22 @@ namespace RJWSexperience.Ideology
 | 
			
		|||
		public override bool Applies(LordJob_Ritual ritual)
 | 
			
		||||
		{
 | 
			
		||||
			float avgNeed = 0;
 | 
			
		||||
			foreach (Pawn pawn in ritual.assignments.AllPawns)
 | 
			
		||||
			foreach (Pawn pawn in ritual.assignments.AllCandidatePawns)
 | 
			
		||||
			{
 | 
			
		||||
				avgNeed += pawn.needs?.TryGetNeed(needDef)?.CurLevel ?? 0f;
 | 
			
		||||
			}
 | 
			
		||||
			avgNeed /= ritual.assignments.AllPawns.Count;
 | 
			
		||||
			avgNeed /= ritual.assignments.AllCandidatePawns.Count;
 | 
			
		||||
			return avgNeed >= minAvgNeed;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public override ExpectedOutcomeDesc GetExpectedOutcomeDesc(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
 | 
			
		||||
		public override QualityFactor GetQualityFactor(Precept_Ritual ritual, TargetInfo ritualTarget, RitualObligation obligation, RitualRoleAssignments assignments, RitualOutcomeComp_Data data)
 | 
			
		||||
		{
 | 
			
		||||
			return new ExpectedOutcomeDesc
 | 
			
		||||
			return new QualityFactor
 | 
			
		||||
			{
 | 
			
		||||
				label = LabelForDesc.CapitalizeFirst(),
 | 
			
		||||
				present = false,
 | 
			
		||||
				uncertainOutcome = true,
 | 
			
		||||
				effect = ExpectedOffsetDesc(true, -1f),
 | 
			
		||||
				qualityChange = ExpectedOffsetDesc(true, -1f),
 | 
			
		||||
				quality = qualityOffset,
 | 
			
		||||
				positive = true
 | 
			
		||||
			};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
using RimWorld;
 | 
			
		||||
using LudeonTK;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using RJWSexperience.Ideology.Precepts;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue