Open Archoran opened 3 years ago
The root for this issue sits in the Joy Giver Patch of yours. It searches not only for the currently allowed joy giving tasks but for all of them - leading the pawn to try to get to the billards table or something which it cannot do, because it's legs are broken.
I would recommend to take the Game source code as sample for this:
...
this.joyGiverChances[joyGiverDef] = 0f;
if (this.JoyGiverAllowed(joyGiverDef) && !pawn.needs.joy.tolerances.BoredOf(joyGiverDef.joyKind)
&& joyGiverDef.Worker.CanBeGivenTo(pawn))
{
if (joyGiverDef.pctPawnsEverDo < 1f)
...
The part this.JoyGiverAllowed(joyGiverDef)
is missing in your function - JobPatches.JobGiver_GetJoyPatch.TryGiveJob
.
Hope that I can help a bit. (it's line 621 btw.)
(in general I would recommend a massive revise of the JobPatches class... cause it generates performance problems.)
When a pawn has low joy while downed in a bed, it can stand up and immediately fall down to ground again.