Example #1
0
        public static string GetWeightTip(this Loadout loadout)
        {
            float moveSpeedFactor = MassBulkUtility.MoveSpeedFactor(loadout.Weight, medianWeightCapacity);
            float encumberPenalty = MassBulkUtility.EncumberPenalty(loadout.Weight, medianWeightCapacity);

            return("CE_DetailedBaseWeightTip".Translate(CE_StatDefOf.CarryWeight.ValueToString(medianWeightCapacity, CE_StatDefOf.CarryWeight.toStringNumberSense), CE_StatDefOf.CarryWeight.ValueToString(loadout.Weight, CE_StatDefOf.CarryWeight.toStringNumberSense),
                                                        moveSpeedFactor.ToStringPercent(),
                                                        encumberPenalty.ToStringPercent()));
        }
Example #2
0
        public static string GetBulkTip(this Loadout loadout)
        {
            float workSpeedFactor = MassBulkUtility.WorkSpeedFactor(loadout.Bulk, medianBulkCapacity);

            return("CE_DetailedBaseBulkTip".Translate(
                       CE_StatDefOf.CarryBulk.ValueToString(medianBulkCapacity, CE_StatDefOf.CarryBulk.toStringNumberSense),
                       CE_StatDefOf.CarryBulk.ValueToString(loadout.Bulk, CE_StatDefOf.CarryBulk.toStringNumberSense),
                       workSpeedFactor.ToStringPercent()));
        }
        public override float GetValueUnfinalized(StatRequest req, bool applyPostProcess = true)
        {
            float value = base.GetValueUnfinalized(req, applyPostProcess);
            Pawn  p     = req.Thing as Pawn;

            if (p != null)
            {
                value += MassBulkUtility.BaseCarryBulk(p);
            }
            return(value);
        }