Exemplo n.º 1
0
        public static string AddStockTip(string text, Pawn pawn, ThingDef thingDef)
        {
            if (!pawn.IsFreeColonist || pawn.Dead)
            {
                return(text);
            }

            string addedText = "";

            if (pawn.StockUpWants(thingDef) > 0 && !StockUpUtility.EnoughAvailable(thingDef, pawn.Map))
            {
                addedText = "TD.NotEnoughStockUp".Translate();
            }

            if (text != "" && addedText != "")
            {
                return(addedText + "\n\n" + text);
            }

            return(addedText + text);
        }
Exemplo n.º 2
0
        public static string AddStockText(string text, Pawn pawn, ThingDef thingDef)
        {
            if (!pawn.IsFreeColonist || pawn.Dead)
            {
                return(text);
            }

            if (!pawn.StockingUpOn(thingDef))
            {
                return(text);
            }

            string addedText = String.Format(" / {0}", pawn.StockUpCount(thingDef));

            if (pawn.StockUpWants(thingDef) > 0 && !StockUpUtility.EnoughAvailable(thingDef, pawn.Map))
            {
                addedText += " (" + "TD.Paused".Translate() + ")";
            }

            return(text + addedText);
        }