mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
Fixed Paths Error
This commit is contained in:
@@ -122,7 +122,7 @@ Event.register({defines.events.on_built_entity,on_robot_built_entity}, function(
|
|||||||
if sizes[entity.name] then
|
if sizes[entity.name] then
|
||||||
local size = sizes[entity.name]-1
|
local size = sizes[entity.name]-1
|
||||||
for x = -size,0 do for y = -size,0 do
|
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
|
local tile = surface.get_tile(pos).name
|
||||||
if paths[tile] and math.random() < paths[tile][1]*size*(-10) then
|
if paths[tile] and math.random() < paths[tile][1]*size*(-10) then
|
||||||
down_grade(surface,pos)
|
down_grade(surface,pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user