mirror of
https://gitgud.io/Ed86/rjw-whoring.git
synced 2024-08-15 00:03:25 +00:00
29 lines
612 B
C#
29 lines
612 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using RimWorld;
|
|
using RimWorld.Planet;
|
|
using UnityEngine;
|
|
using Verse;
|
|
|
|
namespace rjwwhoring.MainTab
|
|
{
|
|
[StaticConstructorOnStartup]
|
|
public class PawnColumnWorker_Mood : PawnColumnWorker_TextCenter
|
|
{
|
|
protected override string GetTextFor(Pawn pawn)
|
|
{
|
|
return GetValueToCompare(pawn).ToStringPercent();
|
|
}
|
|
|
|
public override int Compare(Pawn a, Pawn b)
|
|
{
|
|
return GetValueToCompare(a).CompareTo(GetValueToCompare(b));
|
|
}
|
|
|
|
private float GetValueToCompare(Pawn pawn)
|
|
{
|
|
return pawn.needs.mood.CurLevelPercentage;
|
|
}
|
|
}
|
|
}
|