public override void DoCell(Rect rect, Pawn pawn, PawnTable table) { if (pawn.Faction == Faction.OfPlayer) { AreaAllowedGUI.DoAllowedAreaSelectors(rect, pawn); } }
public static void DoAllowedAreaSelectors(Rect rect, Pawn p, AllowedAreaMode mode) { if (Find.VisibleMap != null) { List <Area> allAreas = Find.VisibleMap.areaManager.AllAreas; int num = 1; for (int i = 0; i < allAreas.Count; i++) { if (allAreas[i].AssignableAsAllowed(mode)) { num++; } } float num2 = rect.width / (float)num; Text.WordWrap = false; Text.Font = GameFont.Tiny; Rect rect2 = new Rect(rect.x, rect.y, num2, rect.height); AreaAllowedGUI.DoAreaSelector(rect2, p, null); int num3 = 1; for (int j = 0; j < allAreas.Count; j++) { if (allAreas[j].AssignableAsAllowed(mode)) { float num4 = (float)num3 * num2; Rect rect3 = new Rect(rect.x + num4, rect.y, num2, rect.height); AreaAllowedGUI.DoAreaSelector(rect3, p, allAreas[j]); num3++; } } Text.WordWrap = true; Text.Font = GameFont.Small; } }
public override void DoCell(Rect rect, Pawn pawn, PawnTable table) { if (pawn.Faction == Faction.OfPlayer) { AllowedAreaMode mode = (AllowedAreaMode)(pawn.RaceProps.Humanlike ? 1 : 2); AreaAllowedGUI.DoAllowedAreaSelectors(rect, pawn, mode); } }
public override void DoCell(Rect rect, Pawn pawn, PawnTable table) { if (pawn.Faction != Faction.OfPlayer) { return; } AllowedAreaMode mode = (!pawn.RaceProps.Humanlike) ? AllowedAreaMode.Animal : AllowedAreaMode.Humanlike; AreaAllowedGUI.DoAllowedAreaSelectors(rect, pawn, mode); }