vegapnk / RJW-Genes

Rimworld Biotech Genes related to RJW
MIT License
34 stars 38 forks source link

Internal Cumbucket crashes since Sexperience 1.5.1.5 #176

Closed vegapnk closed 2 weeks ago

vegapnk commented 1 month ago

Sexperience 1.5.1.5 removed the GatheredCum if Cumpilation is loaded. In the code I reference it expliclitly, which leads to a crash.

Error:

Exception in JobDriver tick for pawn sex slave 4 driver=JobDriver_ProcessingCumbucket (toilIndex=0) driver.job=(ProcessCumbucket (Job_33647550) A = (124, 0, 156))
System.NullReferenceException: Object reference not set to an instance of an object
[Ref E8CA44A0]
 at Verse.ThingMaker.MakeThing (Verse.ThingDef def, Verse.ThingDef stuff) [0x00043] in <59e863dd41f643f2aafda4b64917c94c>:0 
 at RJW_Genes.JobDriver_ProcessingCumbucket.SpawnCum (Verse.Pawn pawn, Verse.IntVec3 cell, Verse.Map map) [0x00044] in <c620c6fab51844bfb6a77709691215c3>:0 
 at RJW_Genes.JobDriver_ProcessingCumbucket.<MakeNewToils>b__1_1 () [0x00061] in <c620c6fab51844bfb6a77709691215c3>:0 
 at Verse.AI.JobDriver.DriverTick () [0x00163] in <59e863dd41f643f2aafda4b64917c94c>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobUtility.TryStartErrorRecoverJob_Patch1 (Verse.Pawn,string,System.Exception,Verse.AI.JobDriver)
Verse.AI.JobDriver:DriverTick ()
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch2 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
Verse.Root_Play:Update ()

Excerpt from the Code

        private void SpawnCum(Pawn pawn, IntVec3 cell, Map map)
        {
            ThingDef cumDef = DefDatabase<ThingDef>.GetNamed("GatheredCum", true);
            ...
            }

Similar Error:

Failed to find Verse.ThingDef named GatheredCum. There are 3832 defs of this type loaded.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.DefDatabase`1<Verse.ThingDef>:GetNamed (string,bool)
Verse.ThingDef:Named (string)
RJW_Genes.JobGiver_GetLifeForce:GetStoredCum (Verse.Pawn)
RJW_Genes.JobGiver_GetLifeForce:TryGiveJob (Verse.Pawn)
Verse.AI.ThinkNode_JobGiver:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Conditional:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Conditional:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_SubtreesByTag:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage (Verse.Pawn,Verse.AI.JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob (Verse.ThinkTreeDef&,bool)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob ()
Verse.AI.Pawn_JobTracker:EndCurrentJob (Verse.AI.JobCondition,bool,bool)
Verse.AI.Pawn_JobTracker:JobTrackerTick ()
Verse.Pawn:Tick ()
Verse.TickList:Tick ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch2 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
Verse.Root_Play:Update ()

But from a different place for Fertilin

vegapnk commented 2 weeks ago

Closed with 2.4.0 and #185