public PawnPriorityTracker this[Pawn pawn] { get { PawnPriorityTracker tracker; if (!priorities.TryGetValue(pawn, out tracker)) { tracker = new PawnPriorityTracker(pawn); priorities.Add(pawn, tracker); } return(tracker); } }
public PriorityTracker this[Pawn pawn] { get { var favourite = FavouriteManager.Get[pawn]; if (favourite != null) { return(favourite); } if (priorities.TryGetValue(pawn, out var tracker)) { return(tracker); } tracker = new PawnPriorityTracker(pawn); priorities.Add(pawn, tracker); return(tracker); } }