示例#1
0
 public void UpdateSharedRoomThought(Pawn pawn)
 {
     if (pawn.Awake())
     {
         AvaliThoughtDriver avaliThoughtDriver = pawn.TryGetComp <AvaliThoughtDriver>();
         if (RimValiUtility.CheckIfPackmatesInRoom(pawn))
         {
             RimValiUtility.AddThought(pawn, avaliThoughtDriver.Props.inSameRoomThought);
         }
         else
         {
             RimValiUtility.RemoveThought(pawn, avaliThoughtDriver.Props.inSameRoomThought);
         }
     }
     else
     {
         AvaliThoughtDriver avaliThoughtDriver = pawn.TryGetComp <AvaliThoughtDriver>();
         if (RimValiUtility.PackInBedroom(pawn))
         {
             RimValiUtility.AddThought(pawn, avaliThoughtDriver.Props.sharedBedroomThought);
         }
         else
         {
             RimValiUtility.AddThought(pawn, avaliThoughtDriver.Props.sleptApartThought);
         }
     }
 }