RimWorld

RimWorld

Prison Labor
Maux Oct 22, 2021 @ 8:38pm
Possible fix to Arrest Utility?
I noticed that there are people who's got issues not being able to move their prisoner around even after the escort prison option has been added. The problem seems to be because you can not escort them if they are considered inside the prison where they can reach their bed. (At least in my case)

So I looked into the code and saw that in arrestUtility, you have the code determining whether the prisoner can taken to bed and it contains a check to see if the prisoner is not inside a prison cell.

private static bool CanBeTakenToBed(Pawn pawn, Pawn arrester)
{
return (!pawn.InAggroMentalState || !pawn.HostileTo((Thing)arrester)) && !IsPawnFleeing(pawn) && pawn.IsPrisonerOfColony && !pawn.Position.IsInPrisonCell(pawn.Map);
}

I don't know why you included the check, maybe there's a conflict somewhere? but if there's no conflict, I think that removing the check would solve at least some of the issues.