Beispiel #1
0
        public override string GetTipString()
        {
            string text  = base.GetTipString();
            string text2 = tolerances.TolerancesString();

            if (!string.IsNullOrEmpty(text2))
            {
                text = text + "\n\n" + text2;
            }
            if (pawn.MapHeld != null)
            {
                ExpectationDef expectationDef = ExpectationsUtility.CurrentExpectationFor(pawn);
                text += "\n\n" + "CurrentExpectationsAndRecreation".Translate(expectationDef.label, expectationDef.joyToleranceDropPerDay.ToStringPercent(), expectationDef.joyKindsNeeded);
                text  = text + "\n\n" + JoyUtility.JoyKindsOnMapString(pawn.MapHeld);
            }
            else
            {
                Caravan caravan = pawn.GetCaravan();
                if (caravan != null)
                {
                    float num = caravan.needs.GetCurrentJoyGainPerTick(pawn) * 2500f;
                    if (num > 0f)
                    {
                        text += "\n\n" + "GainingJoyBecauseCaravanNotMoving".Translate() + ": +" + num.ToStringPercent() + "/" + "LetterHour".Translate();
                    }
                }
            }
            return(text);
        }
Beispiel #2
0
        public override TaggedString GetExplanation()
        {
            StringBuilder stringBuilder = new StringBuilder();
            Pawn          pawn          = null;

            foreach (Pawn boredPawn in BoredPawns)
            {
                stringBuilder.AppendLine("   " + boredPawn.Label);
                if (pawn == null)
                {
                    pawn = boredPawn;
                }
            }
            string value = (pawn != null) ? JoyUtility.JoyKindsOnMapString(pawn.Map) : "";

            return("BoredomDesc".Translate(stringBuilder.ToString().TrimEndNewlines(), pawn.LabelShort, value, pawn.Named("PAWN")));
        }
        public override string GetTipString()
        {
            string text  = base.GetTipString();
            string text2 = this.tolerances.TolerancesString();

            if (!string.IsNullOrEmpty(text2))
            {
                text = text + "\n\n" + text2;
            }
            Map mapHeld = this.pawn.MapHeld;

            if (mapHeld != null)
            {
                ExpectationDef expectationDef = ExpectationsUtility.CurrentExpectationFor(this.pawn);
                text = text + "\n\n" + "CurrentExpectationsAndRecreation".Translate(new object[]
                {
                    expectationDef.label,
                    expectationDef.joyToleranceDropPerDay.ToStringPercent(),
                    expectationDef.joyKindsNeeded
                });
                text = text + "\n\n" + JoyUtility.JoyKindsOnMapString(this.pawn.MapHeld);
            }
            else
            {
                Caravan caravan = this.pawn.GetCaravan();
                if (caravan != null)
                {
                    float num = caravan.needs.GetCurrentJoyGainPerTick(this.pawn) * 2500f;
                    if (num > 0f)
                    {
                        string text3 = text;
                        text = string.Concat(new string[]
                        {
                            text3,
                            "\n\n",
                            "GainingJoyBecauseCaravanNotMoving".Translate(),
                            ": +",
                            num.ToStringPercent(),
                            "/",
                            "LetterHour".Translate()
                        });
                    }
                }
            }
            return(text);
        }
        public override string GetExplanation()
        {
            StringBuilder stringBuilder = new StringBuilder();
            Pawn          pawn          = null;

            foreach (Pawn current in this.BoredPawns())
            {
                stringBuilder.AppendLine("   " + current.Label);
                if (pawn == null)
                {
                    pawn = current;
                }
            }
            string value = JoyUtility.JoyKindsOnMapString(pawn.Map);

            return("BoredomDesc".Translate(stringBuilder.ToString().TrimEndNewlines(), pawn.LabelShort, value, pawn.Named("PAWN")));
        }
Beispiel #5
0
        public override string GetExplanation()
        {
            StringBuilder stringBuilder = new StringBuilder();
            Pawn          pawn          = null;

            foreach (Pawn pawn2 in this.BoredPawns())
            {
                stringBuilder.AppendLine("   " + pawn2.Label);
                if (pawn == null)
                {
                    pawn = pawn2;
                }
            }
            string text = JoyUtility.JoyKindsOnMapString(pawn.Map);

            return("BoredomDesc".Translate(new object[]
            {
                stringBuilder.ToString().TrimEndNewlines(),
                pawn.LabelShort,
                text
            }));
        }
        public override string GetExplanation()
        {
            Map            map            = this.BadMap();
            int            value          = JoyUtility.JoyKindsOnMapCount(map);
            string         label          = map.info.parent.Label;
            ExpectationDef expectationDef = ExpectationsUtility.CurrentExpectationFor(map);
            int            joyKindsNeeded = expectationDef.joyKindsNeeded;
            string         value2         = "AvailableRecreationTypes".Translate() + ":\n\n" + JoyUtility.JoyKindsOnMapString(map);
            string         value3         = "MissingRecreationTypes".Translate() + ":\n\n" + JoyUtility.JoyKindsNotOnMapString(map);

            return("NeedJoySourceDesc".Translate(value, label, expectationDef.label, joyKindsNeeded, value2, value3));
        }