LightField:pour
methodLightField:pour(x: number, y: number, strength: number, range: number)Pour a light centered at (x, y), which may be fractional: every cell within range takes the larger of its value and strength falling off linearly to zero at range.
-- A torch on cell (8, 8): full strength, fading out over 4 cells.
light:pour(8, 8, 1, 4)
print(light:get(8, 8), light:get(10, 8)) --> 1.0 0.5
print(light:get(12, 8)) --> 0.0
-- Where lights overlap, the brightest wins; they never add up.
light:pour(10, 8, 0.25, 2)
print(light:get(10, 8)) --> 0.5