rwpsychology / Psychology

This is a total overhaul of Rimworld's psychological and social systems.
https://ludeon.com/forums/index.php?topic=34112
15 stars 9 forks source link

Prepare Carefully patch breaks if sexuality changes are disabled #8

Closed rwpsychology closed 6 years ago

rwpsychology commented 6 years ago

hey, I get this error when "Enable sexuality changes" is disabled in the Mod Options. Both Mods (Prepare Carefully & Psycology) WORK if enabled!

Exception filling window for RimWorld.Page_ConfigureStartingPawns: System.NullReferenceException: Object reference not set to an instance of an object at EdB.PrepareCarefully.UtilityCopy.CopyExposableViaReflection (string,object,object,object[]) <0x0006a> at EdB.PrepareCarefully.ExtensionsPawn.CopyModdedProperties (Verse.Pawn,Verse.Pawn) <0x00060> at EdB.PrepareCarefully.ExtensionsPawn.Copy (Verse.Pawn) <0x0026d> at EdB.PrepareCarefully.PrepareCarefully.InitializePawns () <0x00083> at EdB.PrepareCarefully.PrepareCarefully.Initialize () <0x00034> at EdB.PrepareCarefully.HarmonyPatches.DoWindowContentsPostfix (UnityEngine.Rect,RimWorld.Page_ConfigureStartingPawns) <0x00171> at (wrapper dynamic-method) RimWorld.Page_ConfigureStartingPawns.DoWindowContents_Patch1 (object,UnityEngine.Rect) <0x0052b> at Verse.Window/cAnonStorey0.<>m0 (int) <0x00735>

Verse.Log:Error(String) Verse.cAnonStorey0:<>m0(Int32) UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)

rwpsychology commented 6 years ago

Error stems from this line in Prepare Carefully code:

UtilityCopy.CopyExposableViaReflection("sexuality", source, target, constructorArgs);