mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
14 lines
542 B
Lua
14 lines
542 B
Lua
|
local function on_chunk_generated(event)
|
||
|
local left_top = event.area.left_top
|
||
|
|
||
|
if left_top.x > 512 then return end
|
||
|
if left_top.x < -512 then return end
|
||
|
if left_top.y > 512 then return end
|
||
|
if left_top.y < -512 then return end
|
||
|
|
||
|
game.forces.west.chart(event.surface, {{left_top.x, left_top.y},{left_top.x + 31, left_top.y + 31}})
|
||
|
game.forces.east.chart(event.surface, {{left_top.x, left_top.y},{left_top.x + 31, left_top.y + 31}})
|
||
|
end
|
||
|
|
||
|
local event = require 'utils.event'
|
||
|
event.add(defines.events.on_chunk_generated, on_chunk_generated)
|