Fixed Paths Error

This commit is contained in:
Cooldude2606
2018-09-28 22:30:47 +01:00
parent 6d7ca0dd48
commit a9029e0801

View File

@@ -122,7 +122,7 @@ Event.register({defines.events.on_built_entity,on_robot_built_entity}, function(
if sizes[entity.name] then
local size = sizes[entity.name]-1
for x = -size,0 do for y = -size,0 do
local pos = {entity.position.x+x,entity.position.y+y}
local pos = {x=entity.position.x+x,y=entity.position.y+y}
local tile = surface.get_tile(pos).name
if paths[tile] and math.random() < paths[tile][1]*size*(-10) then
down_grade(surface,pos)