mirror of
https://gitgud.io/Ed86/rjw-whoring.git
synced 2024-08-15 00:03:25 +00:00
29 lines
940 B
C#
29 lines
940 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using RimWorld;
|
|||
|
using rjw;
|
|||
|
using Verse;
|
|||
|
|
|||
|
namespace rjwwhoring.MainTab
|
|||
|
{
|
|||
|
public class PawnTable_Whores : PawnTable
|
|||
|
{
|
|||
|
public PawnTable_Whores(PawnTableDef def, Func<IEnumerable<Pawn>> pawnsGetter, int uiWidth, int uiHeight) : base(def, pawnsGetter, uiWidth, uiHeight) { }
|
|||
|
|
|||
|
protected override IEnumerable<Pawn> LabelSortFunction(IEnumerable<Pawn> input)
|
|||
|
{
|
|||
|
//return input.OrderBy(p => p.Name?.Numerical != false).ThenBy(p => (p.Name as NameSingle)?.Number ?? 0).ThenBy(p => p.def.label);
|
|||
|
return input.OrderBy(p => xxx.get_pawnname(p));
|
|||
|
}
|
|||
|
|
|||
|
protected override IEnumerable<Pawn> PrimarySortFunction(IEnumerable<Pawn> input)
|
|||
|
{
|
|||
|
///return input.OrderByDescending(p => p.Faction?.Name);
|
|||
|
//return input.OrderBy(p => xxx.get_pawnname(p));
|
|||
|
foreach (Pawn p in input)
|
|||
|
p.UpdatePermissions();
|
|||
|
return input.OrderByDescending(p => p.IsColonist);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|