Esempio n. 1
0
 public void ClaimBedIfNonMedical(Building_Bed newBed)
 {
     if (!newBed.owners.Contains(this.pawn) && !newBed.Medical)
     {
         this.UnclaimBed();
         if (newBed.owners.Count == newBed.SleepingSlotsCount)
         {
             newBed.owners[newBed.owners.Count - 1].ownership.UnclaimBed();
         }
         newBed.owners.Add(this.pawn);
         newBed.SortOwners();
         this.OwnedBed = newBed;
         if (newBed.Medical)
         {
             Log.Warning(this.pawn.LabelCap + " claimed medical bed.", false);
             this.UnclaimBed();
         }
     }
 }