mirror of
				https://gitgud.io/Ed86/rjw-fb.git
				synced 2024-08-15 00:43:45 +00:00 
			
		
		
		
	1.5 support
This commit is contained in:
		
							parent
							
								
									49816f2c6e
								
							
						
					
					
						commit
						07cfb8291f
					
				
					 8 changed files with 228 additions and 0 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								1.5/Assemblies/FB.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								1.5/Assemblies/FB.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										33
									
								
								1.5/Defs/ThoughtDefs/RJW_Beautyfuck.xml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								1.5/Defs/ThoughtDefs/RJW_Beautyfuck.xml
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,33 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8" ?>
 | 
			
		||||
 | 
			
		||||
<Defs>
 | 
			
		||||
	<ThoughtDef>
 | 
			
		||||
		<defName>RJW_Beautyfuck</defName>
 | 
			
		||||
		<thoughtClass>Thought_Memory</thoughtClass>
 | 
			
		||||
		<durationDays>0.5</durationDays>
 | 
			
		||||
		<stackLimit>1</stackLimit>
 | 
			
		||||
		<stackedEffectMultiplier>1.0</stackedEffectMultiplier>
 | 
			
		||||
		<stages>
 | 
			
		||||
			<li>
 | 
			
		||||
				<label>Fucked staggeringly ugly</label>
 | 
			
		||||
				<description>Had sex with staggeringly ugly pawn</description>
 | 
			
		||||
				<baseMoodEffect>-4</baseMoodEffect>
 | 
			
		||||
			</li>
 | 
			
		||||
			<li>
 | 
			
		||||
				<label>Fucked ugly</label>
 | 
			
		||||
				<description>Had sex with ugly pawn</description>
 | 
			
		||||
				<baseMoodEffect>-2</baseMoodEffect>
 | 
			
		||||
			</li>
 | 
			
		||||
			<li>
 | 
			
		||||
				<label>Fucked pretty</label>
 | 
			
		||||
				<description>Had sex with pretty pawn</description>
 | 
			
		||||
				<baseMoodEffect>2</baseMoodEffect>
 | 
			
		||||
			</li>
 | 
			
		||||
			<li>
 | 
			
		||||
				<label>Fucked beautiful</label>
 | 
			
		||||
				<description>Had sex with beautiful pawn</description>
 | 
			
		||||
				<baseMoodEffect>4</baseMoodEffect>
 | 
			
		||||
			</li>
 | 
			
		||||
		</stages>
 | 
			
		||||
	</ThoughtDef>
 | 
			
		||||
</Defs>
 | 
			
		||||
							
								
								
									
										22
									
								
								1.5/Source/FB.sln
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								1.5/Source/FB.sln
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,22 @@
 | 
			
		|||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
			
		||||
# Visual Studio 15
 | 
			
		||||
VisualStudioVersion = 15.0.26228.4
 | 
			
		||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
			
		||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FB", "FB\FB.csproj", "{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|Any CPU = Debug|Any CPU
 | 
			
		||||
		Release|Any CPU = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 | 
			
		||||
		{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}.Debug|Any CPU.Build.0 = Debug|Any CPU
 | 
			
		||||
		{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}.Release|Any CPU.ActiveCfg = Release|Any CPU
 | 
			
		||||
		{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}.Release|Any CPU.Build.0 = Release|Any CPU
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
							
								
								
									
										36
									
								
								1.5/Source/FB/Properties/AssemblyInfo.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								1.5/Source/FB/Properties/AssemblyInfo.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
using System.Reflection;
 | 
			
		||||
using System.Runtime.CompilerServices;
 | 
			
		||||
using System.Runtime.InteropServices;
 | 
			
		||||
 | 
			
		||||
// General Information about an assembly is controlled through the following
 | 
			
		||||
// set of attributes. Change these attribute values to modify the information
 | 
			
		||||
// associated with an assembly.
 | 
			
		||||
[assembly: AssemblyTitle("RJWFB")]
 | 
			
		||||
[assembly: AssemblyDescription("")]
 | 
			
		||||
[assembly: AssemblyConfiguration("")]
 | 
			
		||||
[assembly: AssemblyCompany("")]
 | 
			
		||||
[assembly: AssemblyProduct("RJWFB")]
 | 
			
		||||
[assembly: AssemblyCopyright("Copyright ©  2020")]
 | 
			
		||||
[assembly: AssemblyTrademark("")]
 | 
			
		||||
[assembly: AssemblyCulture("")]
 | 
			
		||||
 | 
			
		||||
// Setting ComVisible to false makes the types in this assembly not visible
 | 
			
		||||
// to COM components.  If you need to access a type in this assembly from
 | 
			
		||||
// COM, set the ComVisible attribute to true on that type.
 | 
			
		||||
[assembly: ComVisible(false)]
 | 
			
		||||
 | 
			
		||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
 | 
			
		||||
[assembly: Guid("5b1a0ad6-cb29-4231-ae02-c352c6ac3500")]
 | 
			
		||||
 | 
			
		||||
// Version information for an assembly consists of the following four values:
 | 
			
		||||
//
 | 
			
		||||
//      Major Version
 | 
			
		||||
//      Minor Version
 | 
			
		||||
//      Build Number
 | 
			
		||||
//      Revision
 | 
			
		||||
//
 | 
			
		||||
// You can specify all the values or you can default the Build and Revision Numbers
 | 
			
		||||
// by using the '*' as shown below:
 | 
			
		||||
// [assembly: AssemblyVersion("1.0.*")]
 | 
			
		||||
[assembly: AssemblyVersion("1.0.0.0")]
 | 
			
		||||
[assembly: AssemblyFileVersion("1.0.0.0")]
 | 
			
		||||
							
								
								
									
										65
									
								
								1.5/Source/FB/fb.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								1.5/Source/FB/fb.cs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,65 @@
 | 
			
		|||
using HarmonyLib;
 | 
			
		||||
using RimWorld;
 | 
			
		||||
using rjw;
 | 
			
		||||
using Verse;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
 | 
			
		||||
namespace rjwfb
 | 
			
		||||
{
 | 
			
		||||
	[StaticConstructorOnStartup]
 | 
			
		||||
	internal static class InitHarmonyPatches
 | 
			
		||||
	{
 | 
			
		||||
		static InitHarmonyPatches()
 | 
			
		||||
		{
 | 
			
		||||
			var har = new Harmony("rjw.FB");
 | 
			
		||||
			har.PatchAll(Assembly.GetExecutingAssembly());
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	[HarmonyPatch(typeof(AfterSexUtility), "think_about_sex", new Type[] { typeof(Pawn), typeof(Pawn), typeof(bool), typeof(SexProps), typeof(bool) })]
 | 
			
		||||
	[StaticConstructorOnStartup]
 | 
			
		||||
	static class Beautyfuck_AfterSexUtility_think_about_sex
 | 
			
		||||
	{
 | 
			
		||||
		public static readonly ThoughtDef RJW_Beautyfuck = DefDatabase<ThoughtDef>.GetNamed("RJW_Beautyfuck");
 | 
			
		||||
 | 
			
		||||
		[HarmonyPostfix]
 | 
			
		||||
		public static void think_about_sex_Patch(Pawn pawn, Pawn partner, bool isReceiving, SexProps props, bool whoring = false)
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				if (pawn == null)
 | 
			
		||||
				{
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				if (partner == null)
 | 
			
		||||
				{
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
				var p1 = pawn;
 | 
			
		||||
				var p2 = partner;
 | 
			
		||||
				var p2beauty = p2.GetStatValue(StatDefOf.PawnBeauty, true);
 | 
			
		||||
				var beautystage = -1;
 | 
			
		||||
 | 
			
		||||
				if (p2beauty != 0)
 | 
			
		||||
				{
 | 
			
		||||
					if (p2beauty <= -2)
 | 
			
		||||
						beautystage = 0;
 | 
			
		||||
					else if (p2beauty <= -1)
 | 
			
		||||
						beautystage = 1;
 | 
			
		||||
					else if (p2beauty < 2)
 | 
			
		||||
						beautystage = 2;
 | 
			
		||||
					else
 | 
			
		||||
						beautystage = 3;
 | 
			
		||||
 | 
			
		||||
					if (beautystage != -1)
 | 
			
		||||
						p1?.needs?.mood?.thoughts?.memories?.TryGainMemory(ThoughtMaker.MakeThought(RJW_Beautyfuck, beautystage), null);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			catch(Exception e)
 | 
			
		||||
			{
 | 
			
		||||
				Log.Error(e.ToString());
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										67
									
								
								1.5/Source/FB/fb.csproj
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								1.5/Source/FB/fb.csproj
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,67 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
 | 
			
		||||
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
 | 
			
		||||
    <ProjectGuid>{3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28}</ProjectGuid>
 | 
			
		||||
    <OutputType>Library</OutputType>
 | 
			
		||||
    <RootNamespace>FB</RootNamespace>
 | 
			
		||||
    <AssemblyName>FB</AssemblyName>
 | 
			
		||||
    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
 | 
			
		||||
    <FileAlignment>512</FileAlignment>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 | 
			
		||||
    <PlatformTarget>AnyCPU</PlatformTarget>
 | 
			
		||||
    <DebugSymbols>true</DebugSymbols>
 | 
			
		||||
    <DebugType>full</DebugType>
 | 
			
		||||
    <Optimize>false</Optimize>
 | 
			
		||||
    <OutputPath>..\..\Assemblies\</OutputPath>
 | 
			
		||||
    <DefineConstants>DEBUG;TRACE</DefineConstants>
 | 
			
		||||
    <ErrorReport>prompt</ErrorReport>
 | 
			
		||||
    <WarningLevel>4</WarningLevel>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
 | 
			
		||||
    <PlatformTarget>AnyCPU</PlatformTarget>
 | 
			
		||||
    <DebugType>pdbonly</DebugType>
 | 
			
		||||
    <Optimize>true</Optimize>
 | 
			
		||||
    <OutputPath>..\..\Assemblies\</OutputPath>
 | 
			
		||||
    <DefineConstants>TRACE</DefineConstants>
 | 
			
		||||
    <ErrorReport>prompt</ErrorReport>
 | 
			
		||||
    <WarningLevel>4</WarningLevel>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Reference Include="0Harmony, Version=2.3.3.0, Culture=neutral, processorArchitecture=MSIL">
 | 
			
		||||
      <HintPath>..\packages\Lib.Harmony.2.3.3\lib\net472\0Harmony.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="Assembly-CSharp">
 | 
			
		||||
      <HintPath>..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="HugsLib">
 | 
			
		||||
      <HintPath>..\..\..\..\..\..\..\workshop\content\294100\818773962\v1.5\Assemblies\HugsLib.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="RJW">
 | 
			
		||||
      <HintPath>..\..\..\..\rjw\1.5\Assemblies\RJW.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
    <Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
 | 
			
		||||
    <Reference Include="UnityEngine.CoreModule">
 | 
			
		||||
      <HintPath>..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
 | 
			
		||||
      <Private>False</Private>
 | 
			
		||||
    </Reference>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <AppDesigner Include="Properties\" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Compile Include="fb.cs" />
 | 
			
		||||
    <Compile Include="Properties\AssemblyInfo.cs" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <None Include="packages.config" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 | 
			
		||||
</Project>
 | 
			
		||||
							
								
								
									
										4
									
								
								1.5/Source/FB/packages.config
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								1.5/Source/FB/packages.config
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<packages>
 | 
			
		||||
  <package id="Lib.Harmony" version="2.3.3" targetFramework="net472" />
 | 
			
		||||
</packages>
 | 
			
		||||
| 
						 | 
				
			
			@ -7,6 +7,7 @@
 | 
			
		|||
	<supportedVersions>
 | 
			
		||||
		<li>1.3</li>
 | 
			
		||||
		<li>1.4</li>
 | 
			
		||||
		<li>1.5</li>
 | 
			
		||||
	</supportedVersions>
 | 
			
		||||
	<packageId>rjw.FB</packageId>
 | 
			
		||||
	<modDependencies>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue