Ejemplo n.º 1
0
 public PawnPriorityTracker this[Pawn pawn]
 {
     get
     {
         PawnPriorityTracker tracker;
         if (!priorities.TryGetValue(pawn, out tracker))
         {
             tracker = new PawnPriorityTracker(pawn);
             priorities.Add(pawn, tracker);
         }
         return(tracker);
     }
 }
Ejemplo n.º 2
0
        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);
            }
        }