private static float GetTrashThreshold(IntRange countRange, float totalValue, Func <ThingStuffPairWithQuality, float> getMaxValue) { float num = GenMath.Median <ThingStuffPairWithQuality>(ThingSetMakerByTotalStatUtility.allowedThingStuffPairs, getMaxValue, 0f, 0.5f); int num2 = Mathf.Clamp(Mathf.CeilToInt(totalValue / num), countRange.min, countRange.max); return(totalValue / (float)num2 * 0.2f); }