Page 1 of 1

Add chunk.area to the chunk

Posted: Fri Aug 02, 2019 7:51 am
by darkfrei
Hi devs!

Link: https://lua-api.factorio.com/latest/Lua ... rator.html

Can you please add chunk.area for chunks? The direct area call is really helpful:

Code: Select all

for chunk in some_surface.get_chunks() do
  game.print("area: " .. serpent.line (chunk.area))
end
Where the area is a BoundingBox https://lua-api.factorio.com/latest/Con ... oundingBox

Re: Add chunk.area to the chunk

Posted: Fri Aug 02, 2019 1:57 pm
by eradicator
+1

There's no official documentation on how to convert ChunkPosition to BoundingBox, so providing an official implmenetation means new modders don't have to "guess" how to convert between the two formats.

Re: Add chunk.area to the chunk

Posted: Mon Aug 26, 2019 3:12 pm
by Bilka
Okay, added for the next version.

Re: Add chunk.area to the chunk

Posted: Mon Aug 26, 2019 4:38 pm
by eradicator
Bilka wrote: Mon Aug 26, 2019 3:12 pm Okay, added for the next version.
Thanks for this and the area in on_chunk_generated!
(The forum is still missing a simley to show appropriate gratitude.)