I've added in a quick fix at line 691 of control.lua. It does not seem to affect chunk loading times greatly.
Code: Select all
local box = game.entity_prototypes[spawnName].collision_box
local absolute_box = {left_top={box.left_top.x+location.x+resOffsetX,box.left_top.y+location.y+resOffsetY},right_bottom={box.right_bottom.x+location.x+resOffsetX,box.right_bottom.y+location.y+resOffsetY}}
local colliders = surface.count_entities_filtered{
area = absolute_box,
type = "resource"
}
if amount > 0 and colliders == 0 then
surface.create_entity{
name = spawnName,
position = {location.x + resOffsetX,location.y + resOffsetY},
force = game.forces.neutral,
amount = amount}
end