示例#1
0
        public void StartSocialFight(Pawn otherPawn)
        {
            if (PawnUtility.ShouldSendNotificationAbout(this.pawn) || PawnUtility.ShouldSendNotificationAbout(otherPawn))
            {
                Thought thought = default(Thought);
                if (!InteractionUtility.TryGetRandomSocialFightProvokingThought(this.pawn, otherPawn, out thought))
                {
                    Log.Warning("Pawn " + this.pawn + " started a social fight with " + otherPawn + ", but he has no negative opinion thoughts towards " + otherPawn + ".");
                }
                else
                {
                    Messages.Message("MessageSocialFight".Translate(this.pawn.LabelShort, otherPawn.LabelShort, thought.LabelCapSocial), this.pawn, MessageTypeDefOf.ThreatSmall);
                }
            }
            MentalStateHandler mentalStateHandler = this.pawn.mindState.mentalStateHandler;
            MentalStateDef     socialFighting     = MentalStateDefOf.SocialFighting;

            mentalStateHandler.TryStartMentalState(socialFighting, null, false, false, otherPawn);
            MentalStateHandler mentalStateHandler2 = otherPawn.mindState.mentalStateHandler;

            socialFighting = MentalStateDefOf.SocialFighting;
            Pawn otherPawn2 = this.pawn;

            mentalStateHandler2.TryStartMentalState(socialFighting, null, false, false, otherPawn2);
            TaleRecorder.RecordTale(TaleDefOf.SocialFight, this.pawn, otherPawn);
        }
        public void StartSocialFight(Pawn otherPawn)
        {
            if (PawnUtility.ShouldSendNotificationAbout(this.pawn) || PawnUtility.ShouldSendNotificationAbout(otherPawn))
            {
                Thought thought;
                if (!InteractionUtility.TryGetRandomSocialFightProvokingThought(this.pawn, otherPawn, out thought))
                {
                    Log.Warning(string.Concat(new object[]
                    {
                        "Pawn ",
                        this.pawn,
                        " started a social fight with ",
                        otherPawn,
                        ", but he has no negative opinion thoughts towards ",
                        otherPawn,
                        "."
                    }));
                }
                else
                {
                    Messages.Message("MessageSocialFight".Translate(new object[]
                    {
                        this.pawn.LabelShort,
                        otherPawn.LabelShort,
                        thought.LabelCapSocial
                    }), this.pawn, MessageTypeDefOf.ThreatSmall);
                }
            }
            MentalStateHandler arg_D6_0       = this.pawn.mindState.mentalStateHandler;
            MentalStateDef     socialFighting = MentalStateDefOf.SocialFighting;

            arg_D6_0.TryStartMentalState(socialFighting, null, false, false, otherPawn);
            MentalStateHandler arg_F9_0 = otherPawn.mindState.mentalStateHandler;

            socialFighting = MentalStateDefOf.SocialFighting;
            Pawn otherPawn2 = this.pawn;

            arg_F9_0.TryStartMentalState(socialFighting, null, false, false, otherPawn2);
            TaleRecorder.RecordTale(TaleDefOf.SocialFight, new object[]
            {
                this.pawn,
                otherPawn
            });
        }
示例#3
0
        public static bool HasAnySocialFightProvokingThought(Pawn pawn, Pawn otherPawn)
        {
            Thought thought = default(Thought);

            return(InteractionUtility.TryGetRandomSocialFightProvokingThought(pawn, otherPawn, out thought));
        }