Exemple #1
0
        public string GetInfoText()
        {
            string labelCap = def.LabelCap;
            string text     = labelCap;

            return(text + "\n" + "goodwill".Translate().CapitalizeFirst() + ": " + PlayerGoodwill.ToStringWithSign());
        }
Exemple #2
0
        public void TryAppendRelationKindChangedInfo(ref string text, FactionRelationKind previousKind, FactionRelationKind newKind, string reason = null)
        {
            if (previousKind != newKind)
            {
                if (!text.NullOrEmpty())
                {
                    text += "\n\n";
                }
                switch (newKind)
                {
                case FactionRelationKind.Hostile:
                    text += "LetterRelationsChange_Hostile".Translate(name, PlayerGoodwill.ToStringWithSign(), (-75).ToStringWithSign(), 0.ToStringWithSign());
                    if (!reason.NullOrEmpty())
                    {
                        text = text + "\n\n" + "FinalStraw".Translate(reason.CapitalizeFirst());
                    }
                    break;

                case FactionRelationKind.Ally:
                    text += "LetterRelationsChange_Ally".Translate(name, PlayerGoodwill.ToStringWithSign(), 75.ToStringWithSign(), 0.ToStringWithSign());
                    if (!reason.NullOrEmpty())
                    {
                        string text2 = text;
                        text = text2 + "\n\n" + "LastFactionRelationsEvent".Translate() + ": " + reason.CapitalizeFirst();
                    }
                    break;

                case FactionRelationKind.Neutral:
                    if (previousKind == FactionRelationKind.Hostile)
                    {
                        text += "LetterRelationsChange_NeutralFromHostile".Translate(name, PlayerGoodwill.ToStringWithSign(), 0.ToStringWithSign(), (-75).ToStringWithSign(), 75.ToStringWithSign());
                        if (!reason.NullOrEmpty())
                        {
                            string text2 = text;
                            text = text2 + "\n\n" + "LastFactionRelationsEvent".Translate() + ": " + reason.CapitalizeFirst();
                        }
                    }
                    else
                    {
                        text += "LetterRelationsChange_NeutralFromAlly".Translate(name, PlayerGoodwill.ToStringWithSign(), 0.ToStringWithSign(), (-75).ToStringWithSign(), 75.ToStringWithSign());
                        if (!reason.NullOrEmpty())
                        {
                            string text2 = text;
                            text = text2 + "\n\n" + "Reason".Translate() + ": " + reason.CapitalizeFirst();
                        }
                    }
                    break;
                }
            }
        }
Exemple #3
0
        public FloatMenuOption CommFloatMenuOption(Building_CommsConsole console, Pawn negotiator)
        {
            if (IsPlayer)
            {
                return(null);
            }
            string text = "CallOnRadio".Translate(GetCallLabel());

            text = text + " (" + PlayerRelationKind.GetLabel() + ", " + PlayerGoodwill.ToStringWithSign() + ")";
            if (!LeaderIsAvailableToTalk())
            {
                string str = (leader == null) ? ((string)"LeaderUnavailableNoLeader".Translate()) : ((string)"LeaderUnavailable".Translate(leader.LabelShort, leader));
                return(new FloatMenuOption(text + " (" + str + ")", null, def.FactionIcon, Color));
            }
            return(FloatMenuUtility.DecoratePrioritizedTask(new FloatMenuOption(text, delegate
            {
                console.GiveUseCommsJob(negotiator, this);
            }, def.FactionIcon, Color, MenuOptionPriority.InitiateSocial), negotiator, console));
        }
Exemple #4
0
 public string GetInfoText()
 {
     return((string)def.LabelCap + ("\n" + "goodwill".Translate().CapitalizeFirst() + ": " + PlayerGoodwill.ToStringWithSign()));
 }