mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-24 23:43:12 +09:00
Attempt to fix entity place downgrade
This commit is contained in:
1 parent
bcb4d47963
commit
7d36b51ab8
1 file changed
+2
-2
@@ -120,8 +120,8 @@ Event.register({defines.events.on_built_entity,on_robot_built_entity}, function(
|
|||||||
local entity = event.created_entity
|
local entity = event.created_entity
|
||||||
local surface = entity.surface
|
local surface = entity.surface
|
||||||
if sizes[entity.name] then
|
if sizes[entity.name] then
|
||||||
local size = sizes[entity.name]
|
local size = sizes[entity.name]-1
|
||||||
for x = 0,size do for y = 0,size do
|
for x = -size,0 do for y = -size,0 do
|
||||||
local pos = {entity.position.x+x,entity.position.y+y}
|
local pos = {entity.position.x+x,entity.position.y+y}
|
||||||
local tile = surface.get_tile(pos).name
|
local tile = surface.get_tile(pos).name
|
||||||
if math.random() < paths[tile][1]*size*(-10) then
|
if math.random() < paths[tile][1]*size*(-10) then
|
||||||
|
|||||||
Reference in new issue
Block a user