Closed splincore closed 3 months ago
Ah, yeah that makes sense Mod is expecting human pawns there and insects don't have everything it's looking for
I'll try to push a fix within the next 24h
Could reproduce, fixing
The Eclectic Palate trait rates their food by number of ingredients. As insect jelly does not have ingredients, the game threw an error when attempting to read the non-existent ingredients. As the game already checks if the trait is present before applying the thought produced by eating, I had originally not made the code check for the presence of the trait, this is why the bug was also caused my the insects.
Thank you for posting the bug report and the steps to reproduce it!
This mod creates a red error when a Megascarabs tries to eat. (i dont know if this is 100% of the time or not) To reproduce this bug, just start a new game in mountains or somethings, where there are caves with bugs in them. It will usually happen the first ingame day if a Megascarab is present.
My Modlist:
So i basically only have this mod active and all the DLCs.
Pawn Megascarab46963 threw exception while executing toil FinalizeIngest's finish action (0), jobDriver=RimWorld.JobDriver_Ingest, job=Ingest (Job_13422) A = Thing_InsectJelly47261 Giver = JobGiver_GetFood [workGiverDef: null], toilIndex=3: System.NullReferenceException: Object reference not set to an instance of an object [Ref 77733B11] at More_Traits.HarmonyPatching.Patches.Eclectic.EclecticPalate_FinalizeIngestPatch+<>c__DisplayClass0_0.g__action|0 () [0x0000b] in :0
at Verse.AI.Toil.Cleanup (System.Int32 myIndex, Verse.AI.JobDriver jobDriver) [0x0001f] in <957a20e0be784a65bc32cf449445b937>:0
1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable
1 instructions, MethodBase original) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch0 (string) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Toil.Cleanup_Patch0 (Verse.AI.Toil,int,Verse.AI.JobDriver) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.TryActuallyStartNextToil_Patch0 (Verse.AI.JobDriver) Verse.AI.JobDriver:ReadyForNextToil () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.TryActuallyStartNextToil_Patch0 (Verse.AI.JobDriver) Verse.AI.JobDriver:ReadyForNextToil () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.DriverTick_Patch0 (Verse.AI.JobDriver) Verse.AI.Pawn_JobTracker:JobTrackerTick () Verse.Pawn:Tick () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickList.Tick_Patch0 (Verse.TickList) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch0 (Verse.TickManager) Verse.TickManager:TickManagerUpdate () (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch0 (Verse.Game) (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root_Play.Update_Patch0 (Verse.Root_Play)