Exemple #1
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float num  = 0f;
            float num2 = PawnCapacityUtility.CalculateLimbEfficiency(diffSet, BodyPartTagDefOf.MovingLimbCore, BodyPartTagDefOf.MovingLimbSegment, BodyPartTagDefOf.MovingLimbDigit, 0.4f, out num, impactors);
            float result;

            if (num < 0.4999f)
            {
                result = 0f;
            }
            else
            {
                float          num3 = num2;
                BodyPartTagDef tag  = BodyPartTagDefOf.Pelvis;
                num2 = num3 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);
                float num4 = num2;
                tag    = BodyPartTagDefOf.Spine;
                num2   = num4 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);
                num2   = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 0.2f);
                num2   = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 0.2f);
                num2  *= Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors), 1f);
                result = num2;
            }
            return(result);
        }
Exemple #2
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            //return 1.0f;
            //--Log.Message("[RJW]PawnCapacityWorker_Fertility::CalculateCapacityLevel is called0");
            //return 1f;
            Pawn p = diffSet.pawn;

            if (p == null)
            {
                return(0f);
            }
            if (xxx.is_animal(p))
            {
                return(1f);
            }
            else if (xxx.is_human(p))
            {
                if (p.ageTracker.AgeBiologicalYears > 50 || p.ageTracker.AgeBiologicalYears < 14)
                {
                    return(0f);
                }
                float result = PawnCapacityUtility.CalculateTagEfficiency(diffSet, "RJW_FertilitySource", 1f, impactors); //This should be a value ranged in [0,1]. It seems always to be 1.
                //--Log.Message("[RJW]PawnCapacityWorker_Fertility::CalculateCapacityLevel is called1 - result is "+ result);
                result *= GenMath.FlatHill(14f, 20f, 30f, 50f, p.ageTracker.AgeBiologicalYearsFloat);                     //This adds an aging factor to Fertility
                //--Log.Message("[RJW]PawnCapacityWorker_Fertility::CalculateCapacityLevel is called2 - result is " + result);
                return(result);
            }
            else
            {
                return(0f);
            }
        }
        public override void OnIntervalPassed(Pawn pawn, Hediff cause)
        {
            foreach (PartStateRule rule in rules)
            {
                Pawn_HealthTracker pawnHealth = pawn.health;

                float partEfficiency = PawnCapacityUtility.CalculateTagEfficiency(pawnHealth.hediffSet, rule.tag);
                float severity       = rule.curve.Evaluate(partEfficiency);

                Hediff hediff = pawnHealth.hediffSet.GetFirstHediffOfDef(rule.hediff);
                if (hediff == null)
                {
                    if (severity == 0f)
                    {
                        continue;
                    }

                    hediff = HediffMaker.MakeHediff(rule.hediff, pawn, null);
                    pawnHealth.AddHediff(hediff);
                }

                if (rule.mode != PartStateMode.AddRemove || severity == 0f)
                {
                    hediff.Severity = severity;
                }
            }
        }
 public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
 {
     if (diffSet.pawn.RaceProps.body.HasPartWithTag(BodyPartTagDefOf.BloodFiltrationKidney))
     {
         return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.BloodFiltrationKidney, float.MaxValue, default(FloatRange), impactors) * PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.BloodFiltrationLiver, float.MaxValue, default(FloatRange), impactors));
     }
     return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.BloodFiltrationSource, float.MaxValue, default(FloatRange), impactors));
 }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef tag      = BodyPartTagDefOf.EatingSource;
            float          arg_4E_0 = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f);

            tag = BodyPartTagDefOf.EatingPathway;
            float maximum = 1f;

            return(arg_4E_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors, -1f) * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
        }
Exemple #6
0
        public override float CalculateCapacityLevel(HediffSet diffSet,
                                                     List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            var basis = PawnCapacityUtility.CalculateTagEfficiency(diffSet,
                                                                   BodyPartTagDefOf.FertilitySource, 3.40282347E+38f, default(FloatRange), impactors);

            RacePubertySetting pubertySettings = SettingHelper.latest.GetPubertySettingsFor(diffSet.pawn.def);

            return(PubertyHelper.getFactorFertility(pubertySettings, diffSet) * basis * PubertyHelper.isPostPubescence(diffSet));
        }
Exemple #7
0
        // Token: 0x06001491 RID: 5265 RVA: 0x0009F084 File Offset: 0x0009D484
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float          num  = 0f;
            float          num2 = PawnCapacityUtility.CalculateLimbEfficiency(diffSet, BodyPartTagDefOf.ManipulationLimbCore, BodyPartTagDefOf.ManipulationLimbSegment, BodyPartTagDefOf.ManipulationLimbDigit, 0.8f, out num, impactors);
            float          num3 = num2;
            BodyPartTagDef tag  = BodyPartTagDefOf.Spine;

            num2 = num3 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors, -1f);
            return(num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
        }
Exemple #8
0
 public override float CalculateCapacityLevel(HediffSet diffSet,
                                              List <PawnCapacityUtility.CapacityImpactor> impactors = null)
 {
     return(PawnCapacityUtility.CalculateTagEfficiency(
                diffSet,
                BodyPartTagDefOf.TM_MechaniteSource,
                3.40282347E+38f,
                default(FloatRange),
                impactors));
 }
Exemple #9
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef tag = BodyPartTagDefOf.EatingSource;
            float          num = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);

            tag = BodyPartTagDefOf.EatingPathway;
            float maximum = 1f;

            return(num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors) * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef talkingSource = BodyPartTagDefOf.TalkingSource;
            float          num           = PawnCapacityUtility.CalculateTagEfficiency(diffSet, talkingSource, 3.40282347E+38f, default(FloatRange), impactors);

            talkingSource = BodyPartTagDefOf.TalkingPathway;
            float maximum = 1f;

            return(num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, talkingSource, maximum, default(FloatRange), impactors) * CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
        }
Exemple #11
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef body       = diffSet.pawn.RaceProps.body;
            float   limbvalue  = CalculateForLimbs(diffSet, BodyPartTagDefOf.MovingLimbCore, impactors);
            float   torsoValue = CalculateForDirectChildren(diffSet, body.corePart, GethCoolingTags.GethCoolantConduit, impactors) *
                                 CalculateForDirectChildren(diffSet, body.corePart, GethCoolingTags.GethHeatExchanger, impactors);

            float value = limbvalue * .4f + torsoValue * .6f;

            return(value * PawnCapacityUtility.CalculateTagEfficiency(diffSet, GethCoolingTags.GethCoolantPump, impactors: impactors));
        }
Exemple #12
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef tag      = BodyPartTagDefOf.BreathingSource;
            float          arg_4E_0 = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f);

            tag = BodyPartTagDefOf.BreathingPathway;
            float maximum  = 1f;
            float arg_78_0 = arg_4E_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors, -1f);

            tag     = BodyPartTagDefOf.BreathingSourceCage;
            maximum = 1f;
            return(arg_78_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors, -1f));
        }
Exemple #13
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef tag = BodyPartTagDefOf.BreathingSource;
            float          num = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors, -1f);

            tag = BodyPartTagDefOf.BreathingPathway;
            float maximum = 1f;
            float num2    = num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors, -1f);

            tag     = BodyPartTagDefOf.BreathingSourceCage;
            maximum = 1f;
            return(num2 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, maximum, default(FloatRange), impactors, -1f));
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef breathingSource = BodyPartTagDefOf.BreathingSource;
            float          num             = PawnCapacityUtility.CalculateTagEfficiency(diffSet, breathingSource, 3.40282347E+38f, default(FloatRange), impactors);

            breathingSource = BodyPartTagDefOf.BreathingPathway;
            float maximum = 1f;
            float num2    = num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, breathingSource, maximum, default(FloatRange), impactors);

            breathingSource = BodyPartTagDefOf.BreathingSourceCage;
            maximum         = 1f;
            return(num2 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, breathingSource, maximum, default(FloatRange), impactors));
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float num  = PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.ConsciousnessSource, float.MaxValue, default(FloatRange), impactors);
            float num2 = Mathf.Clamp(GenMath.LerpDouble(0.1f, 1f, 0f, 0.4f, diffSet.PainTotal), 0f, 0.4f);

            if ((double)num2 >= 0.01)
            {
                num -= num2;
                impactors?.Add(new PawnCapacityUtility.CapacityImpactorPain());
            }
            num = Mathf.Lerp(num, num * Mathf.Min(CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 1f), 0.2f);
            num = Mathf.Lerp(num, num * Mathf.Min(CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 1f), 0.2f);
            return(Mathf.Lerp(num, num * Mathf.Min(CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodFiltration, impactors), 1f), 0.1f));
        }
Exemple #16
0
        // Token: 0x0600127F RID: 4735 RVA: 0x0008E848 File Offset: 0x0008CC48
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef body = diffSet.pawn.RaceProps.body;
            string  tag;

            if (body.HasPartWithTag("EVKidney"))
            {
                tag = "EVKidney";
                float num = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, impactors);
                tag = "EVLiver";
                return(num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, impactors));
            }
            tag = "EVSource";
            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, impactors));
        }
Exemple #17
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef        body = diffSet.pawn.RaceProps.body;
            BodyPartTagDef tag;

            if (body.HasPartWithTag(BodyPartTagDefOf.BloodFiltrationKidney))
            {
                tag = BodyPartTagDefOf.BloodFiltrationKidney;
                float arg_6D_0 = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f);
                tag = BodyPartTagDefOf.BloodFiltrationLiver;
                return(arg_6D_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f));
            }
            tag = BodyPartTagDefOf.BloodFiltrationSource;
            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f));
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef body = diffSet.pawn.RaceProps.body;
            string  tag;

            if (body.HasPartWithTag("BloodFiltrationKidney"))
            {
                tag = "BloodFiltrationKidney";
                float arg_4F_0 = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors);
                tag = "BloodFiltrationLiver";
                return(arg_4F_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors));
            }
            tag = "BloodFiltrationSource";
            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors));
        }
Exemple #19
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float functionalPercentage = 0f;
            float num = PawnCapacityUtility.CalculateLimbEfficiency(diffSet, BodyPartTagDefOf.MovingLimbCore, BodyPartTagDefOf.MovingLimbSegment, BodyPartTagDefOf.MovingLimbDigit, 0.4f, out functionalPercentage, impactors);

            if (functionalPercentage < 0.4999f)
            {
                return(0f);
            }
            num *= PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.Pelvis, float.MaxValue, default(FloatRange), impactors);
            num *= PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.Spine, float.MaxValue, default(FloatRange), impactors);
            num  = Mathf.Lerp(num, num * CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 0.2f);
            num  = Mathf.Lerp(num, num * CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 0.2f);
            return(num * Mathf.Min(CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors), 1f));
        }
Exemple #20
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef        body = diffSet.pawn.RaceProps.body;
            BodyPartTagDef bloodFiltrationKidney;

            if (body.HasPartWithTag(BodyPartTagDefOf.BloodFiltrationKidney))
            {
                bloodFiltrationKidney = BodyPartTagDefOf.BloodFiltrationKidney;
                float num = PawnCapacityUtility.CalculateTagEfficiency(diffSet, bloodFiltrationKidney, 3.40282347E+38f, default(FloatRange), impactors);
                bloodFiltrationKidney = BodyPartTagDefOf.BloodFiltrationLiver;
                return(num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, bloodFiltrationKidney, 3.40282347E+38f, default(FloatRange), impactors));
            }
            bloodFiltrationKidney = BodyPartTagDefOf.BloodFiltrationSource;
            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, bloodFiltrationKidney, 3.40282347E+38f, default(FloatRange), impactors));
        }
Exemple #21
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            string tag  = "ConsciousnessSource";
            float  num  = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors);
            float  num2 = Mathf.Clamp(GenMath.LerpDouble(0.1f, 1f, 0f, 0.4f, diffSet.PainTotal), 0f, 0.4f);

            if ((double)num2 >= 0.01)
            {
                num -= num2;
                if (impactors != null)
                {
                    impactors.Add(new PawnCapacityUtility.CapacityImpactorPain());
                }
            }
            num = Mathf.Lerp(num, num * Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 1f), 0.2f);
            num = Mathf.Lerp(num, num * Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 1f), 0.2f);
            return(Mathf.Lerp(num, num * Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodFiltration, impactors), 1f), 0.1f));
        }
Exemple #22
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyDef body = diffSet.pawn.RaceProps.body;
            float   result;

            if (body.HasPartWithTag(BodyPartTagDefOf.BloodFiltrationKidney))
            {
                BodyPartTagDef tag = BodyPartTagDefOf.BloodFiltrationKidney;
                float          num = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);
                tag    = BodyPartTagDefOf.BloodFiltrationLiver;
                result = num * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);
            }
            else
            {
                BodyPartTagDef tag = BodyPartTagDefOf.BloodFiltrationSource;
                result = PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, float.MaxValue, default(FloatRange), impactors);
            }
            return(result);
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float num  = 0f;
            float num2 = PawnCapacityUtility.CalculateLimbEfficiency(diffSet, "MovingLimbCore", "MovingLimbSegment", "MovingLimbDigit", 0.4f, out num, impactors);

            if (num < 0.49990001320838928)
            {
                return(0f);
            }
            float  num3 = num2;
            string tag  = "Pelvis";

            num2 = num3 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors);
            float num4 = num2;

            tag  = "Spine";
            num2 = num4 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors);
            num2 = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 0.2f);
            num2 = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 0.2f);
            return(num2 * Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors), 1f));
        }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            float num  = 0f;
            float num2 = PawnCapacityUtility.CalculateLimbEfficiency(diffSet, BodyPartTagDefOf.MovingLimbCore, BodyPartTagDefOf.MovingLimbSegment, BodyPartTagDefOf.MovingLimbDigit, 0.4f, out num, impactors);

            if (num < 0.4999f)
            {
                return(0f);
            }
            float          arg_5E_0 = num2;
            BodyPartTagDef tag      = BodyPartTagDefOf.Pelvis;

            num2 = arg_5E_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f);
            float arg_89_0 = num2;

            tag  = BodyPartTagDefOf.Spine;
            num2 = arg_89_0 * PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, default(FloatRange), impactors, -1f);
            num2 = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Breathing, impactors), 0.2f);
            num2 = Mathf.Lerp(num2, num2 * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.BloodPumping, impactors), 0.2f);
            return(num2 * Mathf.Min(base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors), 1f));
        }
Exemple #25
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef metabolismSource = BodyPartTagDefOf.MetabolismSource;

            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, metabolismSource, float.MaxValue, default(FloatRange), impactors, -1f));
        }
 public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
 {
     return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.BloodPumpingSource, float.MaxValue, default(FloatRange), impactors));
 }
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            BodyPartTagDef sightSource = BodyPartTagDefOf.SightSource;

            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, sightSource, 3.40282347E+38f, default(FloatRange), impactors, 0.75f));
        }
Exemple #28
0
 public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
 {
     return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.TalkingSource, float.MaxValue, default(FloatRange), impactors) * PawnCapacityUtility.CalculateTagEfficiency(diffSet, BodyPartTagDefOf.TalkingPathway, 1f, default(FloatRange), impactors) * CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
 }
Exemple #29
0
        public override float CalculateCapacityLevel(HediffSet diffSet, List <PawnCapacityUtility.CapacityImpactor> impactors = null)
        {
            string tag = "EatingSource";

            return(PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors) * PawnCapacityUtility.CalculateTagEfficiency(diffSet, "EatingPathway", 1f, impactors) * base.CalculateCapacityAndRecord(diffSet, PawnCapacityDefOf.Consciousness, impactors));
        }
Exemple #30
0
 public override float CalculateCapacityLevel(HediffSet diffSet, List<PawnCapacityUtility.CapacityImpactor> impactors = null)
 {
     string tag = "ManaSource";
     return PawnCapacityUtility.CalculateTagEfficiency(diffSet, tag, 3.40282347E+38f, impactors);
 }