Example #1
0
        public static float EnergyMax(ShieldBelt shield)
        {
            Pawn  wearer = shield.Wearer;
            float result = shield.GetStatValue(StatDefOf.EnergyShieldEnergyMax, true);

            if (wearer != null)
            {
                result *= wearer.GetStatValueForPawn(BStatDefOf.EnergyShieldEnergyMaxMultiplier, wearer);
            }

            return(result);
        }
Example #2
0
        public static float EnergyGainPerTick(ShieldBelt shield)
        {
            Pawn  wearer = shield.Wearer;
            float result = shield.GetStatValue(StatDefOf.EnergyShieldRechargeRate, true) / 60f;

            if (wearer != null)
            {
                result *= wearer.GetStatValueForPawn(BStatDefOf.EnergyShieldRechargeRateMultiplier, wearer);
            }

            return(result);
        }