private void DrawGear(Rect rect, ThingWithComps ownerPawn)
{
GUI.BeginGroup(rect);
float x = 0;
float gWidth = 28f;
float gHeight = 28f;
Pawn p1 = (ownerPawn is Pawn) ? (ownerPawn as Pawn) : (ownerPawn as Corpse).innerPawn;
if (p1.RaceProps.Animal) return;
if (p1.equipment != null)
foreach(ThingWithComps thing in p1.equipment.AllEquipment)
{
Rect rect2 = new Rect(x, 0, gWidth, gHeight);
DrawThing(rect2, thing, p1);
x += gWidth;
}
if (p1.apparel != null)
foreach (Apparel thing in from ap in p1.apparel.WornApparel
orderby ap.def.apparel.bodyPartGroups[0].listOrder descending
select ap)
{
Rect rect2 = new Rect(x, 0, gWidth, gHeight);
DrawThing(rect2, thing, p1);
x += gWidth;
}
GUI.EndGroup();
}