Exemplo n.º 1
0
        public override string GetExplanationUnfinalized(
            StatRequest req,
            ToStringNumberSense numberSense
            )
        {
            if (req.Thing is Pawn pawn &&
                pawn.TryGetComp <Comp_NightVision>() is Comp_NightVision comp)
            {
                float glow = GlowFor.GlowAt(pawn);
                return(StatReportFor_NightVision.CompleteStatReport(Stat, GetEffectMaskForGlow(glow), comp, glow));
            }

            return(string.Empty);
        }
Exemplo n.º 2
0
        public override float GetValueUnfinalized(
            StatRequest req,
            bool applyPostProcess = true
            )
        {
            if (req.Thing is Pawn pawn)
            {
                if (pawn.TryGetComp <Comp_NightVision>() is Comp_NightVision comp)
                {
                    float glow = GlowFor.GlowAt(pawn);
                    return(comp.FactorFromGlow(glow));
                }
            }

            return(1f);
        }
        public static string RangedCoolDown(Pawn pawn, int skillLevel)
        {
            var   strHelper  = new CombatStatStrHelper();
            float glow       = GlowFor.GlowAt(thing: pawn);
            float glowFactor = GlowFor.FactorOrFallBack(pawn: pawn, glow: glow);

            strHelper.AddRangedCdRow(glow, skillLevel, glowFactor);

            glow       = 1f;
            glowFactor = GlowFor.FactorOrFallBack(pawn: pawn, glow: glow);

            strHelper.AddRangedCdRow(glow, skillLevel, glowFactor);

            glow       = 0f;
            glowFactor = GlowFor.FactorOrFallBack(pawn: pawn, glow: glow);

            strHelper.AddRangedCdRow(glow, skillLevel, glowFactor);



            return(strHelper.ToString());
        }