RimWorld

RimWorld

Pharmacist
EmGooser 16 Aug, 2021 @ 8:23pm
Bug report: context menu on bleeding pawn in bed
When I pair this with Archtug! I get issues in the context menu. The message seems to be a Null Reference error and Archtug! is catching that thrown error and placing it in the menu itself with a message.

I can not confirm who is actually throwing the error but I can confirm that when I disable only this mod I no longer get the error
< >
Showing 1-14 of 14 comments
Vis 17 Aug, 2021 @ 1:52am 
This is the stack trace I get while using the two mods together:

Exception in RimWorld.FloatMenuMakerMap.ChoicesAtFor: System.InvalidOperationException: Sequence contains no elements at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector, System.Collections.Generic.IComparer`1[T] comparer) [0x00039] in <00638943358e4807bd44cd7bc8f572da>:0 at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <00638943358e4807bd44cd7bc8f572da>:0 at Pharmacist.HealthAIUtility_FindBestMedicine.Prefix (Verse.Pawn healer, Verse.Pawn patient, System.Boolean onlyUseInventory, Verse.Thing& __result) [0x00057] in <60f543b514a84700bb9fdd05e7dc9499>:0 at RimWorld.HealthAIUtility.FindBestMedicine (Verse.Pawn healer, Verse.Pawn patient, System.Boolean onlyUseInventory) [0x00024] in <00638943358e4807bd44cd7bc8f572da>:0 - prefix fluffy.pharmacist: Boolean Pharmacist.HealthAIUtility_FindBestMedicine:Prefix(Pawn healer, Pawn patient, Boolean onlyUseInventory, Thing& __result) at RimWorld.WorkGiver_Tend.JobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x00007] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x00206] in <00638943358e4807bd44cd7bc8f572da>:0 - transpiler net.pardeike.rimworld.mods.achtung: IEnumerable`1 AchtungMod.FloatMenuMakerMap_AddJobGiverWorkOrders_Patch:Transpiler(IEnumerable`1 instructions, MethodBase original) - prefix net.pardeike.rimworld.mods.achtung: Void AchtungMod.FloatMenuMakerMap_AddJobGiverWorkOrders_Patch:Prefix(Pawn pawn, ForcedWork& __state) - postfix net.pardeike.rimworld.mods.achtung: Void AchtungMod.FloatMenuMakerMap_AddJobGiverWorkOrders_Patch:Postfix(Pawn pawn, ForcedWork __state) at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00085] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.FloatMenuMakerMap.ChoicesAtFor (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Boolean suppressAutoTakeableGoto) [0x000ee] in <00638943358e4807bd44cd7bc8f572da>:0 - postfix net.pardeike.rimworld.mods.achtung: Void AchtungMod.FloatMenuMakerMap_ChoicesAtFor_Postfix:Postfix(List`1 __result, Vector3 clickPos, Pawn pawn) - finalizer net.pardeike.rimworld.mods.achtung: Exception AchtungMod.FloatMenuMakerMap_ChoicesAtFor_Finalizer:Finalizer(Exception __exception, List`1& __result)

Alien_Halls 18 Aug, 2021 @ 1:43pm 
This issue is happening with me either and not only when the pawn is bleeding, it seens i can't treat any health problem he has while he is in bed.
stephan-79 19 Aug, 2021 @ 1:23am 
Hi, the same thing happens to me in the game.
tantanoid 19 Aug, 2021 @ 11:03pm 
Same for me and I am not using Achtung!
https://gist.github.com/6bba87203f4f03d3dd516bde2813c878
imperfectionistimp 19 Aug, 2021 @ 11:13pm 
I have a similar issue - pawns cannot be tended to when in bed, irrespective of wound or pawn type. I do not have Achtung though, so it must be another mod conflict or simply a bug with this one.
tantanoid 19 Aug, 2021 @ 11:27pm 
I don't get the exception when using https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2558369439 however others have reported that they still do
beast 21 Aug, 2021 @ 8:53pm 
Same here and without Achtung. Cannot tend minor cuts when they are set to receive herbal medicine or worse. Problem is solved when I set them to industrial-tech or worse. Also cannot tend to wounds with drafted pawns. This is solved when I remove Pharmacist from my modlist.
I blame Earthshaker 22 Aug, 2021 @ 12:49pm 
For some reason, setting medical to treat with no medicine seems to sidestep being unable to treat someone in bed, but it clearly an imperfect solution.
Mostwood 23 Aug, 2021 @ 4:49pm 
It seems that I have a similar problem as I can't treat anyone with anything other than bare hands, only in my case I don't even use Achtung!

Root level exception in OnGUI(): System.InvalidOperationException: Sequence contains no elements at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector, System.Collections.Generic.IComparer`1[T] comparer) [0x00039] in <00638943358e4807bd44cd7bc8f572da>:0 at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <00638943358e4807bd44cd7bc8f572da>:0 at Pharmacist.HealthAIUtility_FindBestMedicine.Prefix (Verse.Pawn healer, Verse.Pawn patient, System.Boolean onlyUseInventory, Verse.Thing& __result) [0x00057] in <60f543b514a84700bb9fdd05e7dc9499>:0 at (wrapper dynamic-method) RimWorld.HealthAIUtility.RimWorld.HealthAIUtility.FindBestMedicine_Patch2(Verse.Pawn,Verse.Pawn,bool) at (wrapper dynamic-method) RimWorld.WorkGiver_Tend.RimWorld.WorkGiver_Tend.JobOnThing_Patch1(RimWorld.WorkGiver_Tend,Verse.Pawn,Verse.Thing,bool) at RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts, System.Boolean drafted) [0x001ba] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00085] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.ChoicesAtFor_Patch1(UnityEngine.Vector3,Verse.Pawn,bool) at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x000a1] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.Selector.RimWorld.Selector.HandleMapClicks_Patch1(RimWorld.Selector) at RimWorld.Selector.SelectorOnGUI () [0x00000] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch1(RimWorld.UIRoot_Play) at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root) UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) (wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
MadMarbleHead 24 Aug, 2021 @ 7:45am 
Me as well.
Root level exception in OnGUI(): System.InvalidOperationException: Sequence contains no elements at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector, System.Collections.Generic.IComparer`1[T] comparer) [0x00039] in <00638943358e4807bd44cd7bc8f572da>:0 at Verse.GenCollection.MaxBy[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] selector) [0x00007] in <00638943358e4807bd44cd7bc8f572da>:0 at Pharmacist.HealthAIUtility_FindBestMedicine.Prefix (Verse.Pawn healer, Verse.Pawn patient, System.Boolean onlyUseInventory, Verse.Thing& __result) [0x00057] in <60f543b514a84700bb9fdd05e7dc9499>:0 at (wrapper dynamic-method) RimWorld.HealthAIUtility.RimWorld.HealthAIUtility.FindBestMedicine_Patch1(Verse.Pawn,Verse.Pawn,bool) at RimWorld.WorkGiver_Tend.JobOnThing (Verse.Pawn pawn, Verse.Thing t, System.Boolean forced) [0x00007] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.AddJobGiverWorkOrders_Patch0(UnityEngine.Vector3,Verse.Pawn,System.Collections.Generic.List`1<Verse.FloatMenuOption>,bool) at RimWorld.FloatMenuMakerMap.AddUndraftedOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x00085] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.FloatMenuMakerMap.RimWorld.FloatMenuMakerMap.ChoicesAtFor_Patch2(UnityEngine.Vector3,Verse.Pawn,bool) at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x000a1] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.Selector.RimWorld.Selector.HandleMapClicks_Patch1(RimWorld.Selector) at RimWorld.Selector.SelectorOnGUI () [0x00000] in <00638943358e4807bd44cd7bc8f572da>:0 at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <00638943358e4807bd44cd7bc8f572da>:0 at (wrapper dynamic-method) RimWorld.UIRoot_Play.RimWorld.UIRoot_Play.UIRootOnGUI_Patch2(RimWorld.UIRoot_Play) at (wrapper dynamic-method) Verse.Root.Verse.Root.OnGUI_Patch1(Verse.Root) UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) (wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch1 (Verse.Root)
Jestin' Jae™ 24 Aug, 2021 @ 10:25am 
Same issue, I originally thought it was another mod, but it seems its an issue here from all of the error posts. Just like others I get the "sequence contains no elements error"
DickHardly 25 Aug, 2021 @ 5:01pm 
Glad it wasn't just me. Been fiddling with mods for like 4 hours.
Someone posted on main comment thread that treating doctor pawn needs to actually be CARRYING the medicine now for treatment to work/show up as a drop down menu option... some issue with how Tynan changed vanilla to I guess prefer using the medicine a treating pawn carries... and I guess this mod's logic.
Mr. Night 27 Aug, 2021 @ 11:04pm 
Just to add another to the issue. I have the same issue. i just went through all ~30 of my mods, rebuilding the list from the ground up. found this was my issue (as i was rebuilding from the letter Z to A it was actually a early add) I do not have any other achtung mods so its not a conflict with the two.
< >
Showing 1-14 of 14 comments
Per page: 1530 50