コード例 #1
0
        public bool CheckSocialFightStart(InteractionDef interaction, Pawn initiator)
        {
            bool result;

            if (!DebugSettings.enableRandomMentalStates)
            {
                result = false;
            }
            else if (this.pawn.needs.mood == null || TutorSystem.TutorialMode)
            {
                result = false;
            }
            else if (!InteractionUtility.HasAnySocialFightProvokingThought(this.pawn, initiator))
            {
                result = false;
            }
            else if (DebugSettings.alwaysSocialFight || Rand.Value < this.SocialFightChance(interaction, initiator))
            {
                this.StartSocialFight(initiator);
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
コード例 #2
0
 public bool CheckSocialFightStart(InteractionDef interaction, Pawn initiator)
 {
     if (this.pawn.needs.mood == null || TutorSystem.TutorialMode)
     {
         return(false);
     }
     if (!InteractionUtility.HasAnySocialFightProvokingThought(this.pawn, initiator))
     {
         return(false);
     }
     if (DebugSettings.alwaysSocialFight || Rand.Value < this.SocialFightChance(interaction, initiator))
     {
         this.StartSocialFight(initiator);
         return(true);
     }
     return(false);
 }