Exemplo n.º 1
0
        void BackstoryEffect(Backstory backstory, ref float val)
        {
            if (backstory?.identifier == null)
            {
                return;
            }

            StatModifierString mod = GetStatModifierString(backstory);

            if (mod != null)
            {
                val *= mod.factor;
                val += mod.offset;
            }
        }
Exemplo n.º 2
0
        public override string ExplanationPart(StatRequest req)
        {
            Pawn pawn = req.Thing as Pawn;

            if (modifiers == null || pawn?.story == null)
            {
                return(null);
            }

            string             res = "";
            StatModifierString mod = GetStatModifierString(pawn.story.childhood);

            if (mod != null)
            {
                res = mod.ToString();
            }
            mod = GetStatModifierString(pawn.story.adulthood);
            if (mod != null)
            {
                res += $"\n{mod}";
            }
            return(res == "" ? null : res.Trim());
        }