예제 #1
0
        public string STipString(Pawn pawn)
        {
            StringBuilder       stringBuilder = new StringBuilder();
            SoulTraitDegreeData currentData   = this.CurrentSData;

            stringBuilder.Append(currentData.description.AdjustedFor(pawn));
            int count = this.CurrentData.skillGains.Count;

            if (count > 0)
            {
                stringBuilder.AppendLine();
                stringBuilder.AppendLine();
            }
            int num = 0;

            foreach (KeyValuePair <SkillDef, int> current in this.CurrentData.skillGains)
            {
                if (current.Value != 0)
                {
                    string value = "    " + current.Key.skillLabel + ":   " + current.Value.ToString("+##;-##");
                    if (num < count - 1)
                    {
                        stringBuilder.AppendLine(value);
                    }
                    else
                    {
                        stringBuilder.Append(value);
                    }
                    num++;
                }
            }
            return(stringBuilder.ToString());
        }
예제 #2
0
 public SoulTrait(SoulTraitDef traitdef, int newdeg)
 {
     this.degree               = newdeg;
     this.def                  = traitdef as TraitDef;
     this.SDef                 = traitdef;
     this.CurrentSData         = traitdef.SDegreeDataAt(newdeg);
     this.NullifiedThoughtsInt = SDef.NullifiesThoughts;
 }