Here is some information: http://lua-api.factorio.com/latest/LuaS ... g_position
find_non_colliding_position(name, center, radius, precision) → Position
Why it's impossible to make something like that?
Code: Select all
local position = nil
local name = "crude-oil"
local center = game.player.position
local radius= 10
local precision = 5
local amount = 5000
for i=1,9 do
position = game.player.surface.find_non_colliding_position(name=name, center=center, radius=radius, precision=precision)
if position then
game.player.surface.create_entity({name=name, amount=amount, position=position})
end
end
Code: Select all
position = game.player.surface.find_non_colliding_position(name, center, radius, precision)
Code: Select all
position = game.player.surface.find_non_colliding_position(name=name, center=center, radius=radius, precision=precision)