private int GetHeatGenerated() { var defaultValue = mechDef.Inventory .Where(x => x.IsFunctionalORInstalling()) .Select(x => x.Def as WeaponDef) .Where(x => x != null) .Sum(x => x.HeatGenerated); var stat = statCollection.HeatGenerated(); stat.CreateWithDefault(defaultValue); var value = MechDefStatisticModifier.ModifyStatistic(stat, mechDef); return(PrecisionUtils.RoundUpToInt(value)); }
private int GetHeatGenerated() { var defaultValue = mechDef.Inventory .Where(x => x.IsFunctionalORInstalling()) .Select(x => x.Def as WeaponDef) .Where(x => x != null) .Sum(x => x.HeatGenerated); // TODO HeatDivisor support or not? nah we just don't support COIL, who needs that anyway... var stat = statCollection.HeatGenerated(); stat.CreateWithDefault(defaultValue); var value = MechDefStatisticModifier.ModifyStatistic(stat, mechDef); return(PrecisionUtils.RoundUpToInt(value)); }