So far it works well except that my ores are also generated on top of the water and voids. I tried the get_tile entity to check for existing surfaces but it fails.
Code: Select all
if (not game.surfaces.get_tile(x,y).collides_with("water-tile")) then
game.surfaces["nauvis"].create_entity({name=ore, amount=ore_amount, position={x,y}})
end