コード例 #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);
         }
     }
 }
コード例 #2
0
ファイル: AvaliThoughtDriver.cs プロジェクト: Nyinxie/RimVali
 public void AddThought(ThoughtDef thought, PawnRelationDef relationDef, Pawn pawn)
 {
     if (RimValiUtility.GetPackSize(pawn, relationDef) == 1 && packLossEnabled)
     {
         RimValiUtility.AddThought(pawn, thought);
     }
 }
コード例 #3
0
 public void UpdateBedRoomThought(Pawn pawn, PawnRelationDef relationDef, ThoughtDef togetherThought, ThoughtDef aloneThought)
 {
     if (RimValiUtility.CheckIfBedRoomHasPackmates(pawn, relationDef))
     {
         RimValiUtility.AddThought(pawn, togetherThought);
     }
     else
     {
         RimValiUtility.RemoveThought(pawn, aloneThought);
     }
 }
コード例 #4
0
 public void UpdateSharedRoomThought(Pawn pawn, PawnRelationDef relationDef, ThoughtDef thought)
 {
     if (pawn.Awake())
     {
         AvaliThoughtDriver avaliThoughtDriver = pawn.TryGetComp <AvaliThoughtDriver>();
         if (RimValiUtility.CheckIfPackmatesInRoom(pawn, relationDef))
         {
             RimValiUtility.AddThought(pawn, thought);
         }
         else
         {
             RimValiUtility.RemoveThought(pawn, thought);
         }
     }
 }