1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-04 00:15:45 +02:00

fish defender - minor issue fix

This commit is contained in:
Gerkiz 2022-02-28 22:16:23 +01:00
parent 8cae376904
commit 47da1705f8

View File

@ -101,7 +101,7 @@ function Public.get_replacement_tile(surface, position)
shuffle(vectors)
for k, v in pairs(vectors) do
local tile = surface.get_tile(position.x + v[1], position.y + v[2])
if tile and not tile.collides_with('resource-layer') then
if tile and tile.valid and not tile.collides_with('resource-layer') then
return tile.name
end
end