1
0
mirror of https://github.com/veden/Rampant.git synced 2025-02-09 13:36:53 +02:00

code cleanup in map prep

This commit is contained in:
Aaron Veden 2021-12-04 15:44:29 -08:00
parent be98da5ebe
commit b733b2a21d
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -375,17 +375,12 @@ local function prepMap(surface)
-- queue all current chunks that wont be generated during play
local tick = game.tick
local position = {0,0}
for chunk in surface.get_chunks() do
local x = chunk.x
local y = chunk.y
position[1] = x
position[2] = y
if surface.is_chunk_generated(position) then
if surface.is_chunk_generated(chunk) then
onChunkGenerated({ surface = surface,
tick = tick,
area = { left_top = { x = x * 32,
y = y * 32}}})
area = { left_top = { x = chunk.x * 32,
y = chunk.y * 32}}})
end
end