public static void PaintRadiation(PaintedHillsMod mymod, Colorer colorer, int tile_x, int tile_y, IDictionary <float, float> ray_rads_and_lengths) { float steps = mymod.Config.HueBlobMinimumTileRadius; var rays = new SortedSet <float>(ray_rads_and_lengths.Keys); for (int i = 0; i < 60; i++) { float curr_rad = RayPainter.GetRadianAt(i % 60); float next_rad = RayPainter.GetRadianAt((i + 1) % 60); float curr_range = ray_rads_and_lengths[curr_rad]; float range_span = curr_range - ray_rads_and_lengths[next_rad]; //ErrorLogger.Log( "x: "+tile_x+", y: "+tile_y+", rad: "+curr_rad+", nextrad: "+next_rad+", range: "+curr_range+", span: "+range_span); for (float j = 0; j < steps; j += 1f) { float step_rad = curr_rad + RayPainter.GetRadianAt(j / steps); float step_range = curr_range + (range_span * (j / steps)); colorer.ColorTileRay(mymod, tile_x, tile_y, step_rad, step_range); } } }