diff --git a/1.3/Source/FB/fb.csproj b/1.3/Source/FB/fb.csproj index 951629c..4462077 100644 --- a/1.3/Source/FB/fb.csproj +++ b/1.3/Source/FB/fb.csproj @@ -40,7 +40,7 @@ False - ..\..\..\..\..\..\..\workshop\content\294100\818773962\v1.2\Assemblies\HugsLib.dll + ..\..\..\..\..\..\..\workshop\content\294100\818773962\v1.3\Assemblies\HugsLib.dll False diff --git a/1.4/Assemblies/FB.dll b/1.4/Assemblies/FB.dll new file mode 100644 index 0000000..e4cd867 Binary files /dev/null and b/1.4/Assemblies/FB.dll differ diff --git a/1.4/Defs/ThoughtDefs/RJW_Beautyfuck.xml b/1.4/Defs/ThoughtDefs/RJW_Beautyfuck.xml new file mode 100644 index 0000000..2f2e2d9 --- /dev/null +++ b/1.4/Defs/ThoughtDefs/RJW_Beautyfuck.xml @@ -0,0 +1,33 @@ + + + + + RJW_Beautyfuck + Thought_Memory + 0.5 + 1 + 1.0 + +
  • + + Had sex with staggeringly ugly pawn + -4 +
  • +
  • + + Had sex with ugly pawn + -2 +
  • +
  • + + Had sex with pretty pawn + 2 +
  • +
  • + + Had sex with beautiful pawn + 4 +
  • +
    +
    +
    \ No newline at end of file diff --git a/1.4/Source/FB.sln b/1.4/Source/FB.sln new file mode 100644 index 0000000..739948d --- /dev/null +++ b/1.4/Source/FB.sln @@ -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 diff --git a/1.4/Source/FB/Properties/AssemblyInfo.cs b/1.4/Source/FB/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b540ac1 --- /dev/null +++ b/1.4/Source/FB/Properties/AssemblyInfo.cs @@ -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")] diff --git a/1.4/Source/FB/fb.cs b/1.4/Source/FB/fb.cs new file mode 100644 index 0000000..e5cbb62 --- /dev/null +++ b/1.4/Source/FB/fb.cs @@ -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.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()); + } + } + } +} diff --git a/1.4/Source/FB/fb.csproj b/1.4/Source/FB/fb.csproj new file mode 100644 index 0000000..3055b52 --- /dev/null +++ b/1.4/Source/FB/fb.csproj @@ -0,0 +1,67 @@ + + + + + Debug + AnyCPU + {3FC2D442-19B8-4CF9-9D35-CD13B6AC7B28} + Library + FB + FB + v4.7.2 + 512 + + + AnyCPU + true + full + false + ..\..\Assemblies\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Assemblies\ + TRACE + prompt + 4 + + + + ..\packages\Lib.Harmony.2.0.2\lib\net472\0Harmony.dll + False + + + ..\..\..\..\..\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + False + + + ..\..\..\..\..\..\..\workshop\content\294100\818773962\v1.4\Assemblies\HugsLib.dll + False + + + ..\..\..\..\rjw\1.4\Assemblies\RJW.dll + False + + + + ..\..\..\..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll + False + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1.4/Source/FB/packages.config b/1.4/Source/FB/packages.config new file mode 100644 index 0000000..a9bce78 --- /dev/null +++ b/1.4/Source/FB/packages.config @@ -0,0 +1,4 @@ + + + + diff --git a/About/About.xml b/About/About.xml index e3aeb28..e615cb6 100644 --- a/About/About.xml +++ b/About/About.xml @@ -6,6 +6,7 @@ https://gitgud.io/Ed86/rjw-fb
  • 1.3
  • +
  • 1.4
  • rjw.FB