mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
see changelog
This commit is contained in:
parent
020bb1a747
commit
e671966c59
@ -1,3 +1,9 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.14
|
||||
Date: 25. 4 2020
|
||||
Bugfixes:
|
||||
- Tile placement fixed
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.13
|
||||
Date: 16. 4 2020
|
||||
|
44
control.lua
44
control.lua
@ -872,31 +872,33 @@ local function onSurfaceTileChange(event)
|
||||
if (surface.index == surfaceIndex) then
|
||||
local chunks = {}
|
||||
local tiles = event.tiles
|
||||
if event.tile and ((event.tile.name == "landfill") or sFind(event.tile.name, "water")) then
|
||||
for i=1,#tiles do
|
||||
local position = tiles[i].position
|
||||
local chunk = getChunkByPosition(map, position)
|
||||
if event.tile then
|
||||
if ((event.tile.name == "landfill") or sFind(event.tile.name, "water")) then
|
||||
for i=1,#tiles do
|
||||
local position = tiles[i].position
|
||||
local chunk = getChunkByPosition(map, position)
|
||||
|
||||
if (chunk ~= -1) then
|
||||
map.chunkToPassScan[chunk] = true
|
||||
else
|
||||
local x,y = positionToChunkXY(position)
|
||||
local addMe = true
|
||||
for ci=1,#chunks do
|
||||
local c = chunks[ci]
|
||||
if (c.x == x) and (c.y == y) then
|
||||
addMe = false
|
||||
break
|
||||
if (chunk ~= -1) then
|
||||
map.chunkToPassScan[chunk] = true
|
||||
else
|
||||
local x,y = positionToChunkXY(position)
|
||||
local addMe = true
|
||||
for ci=1,#chunks do
|
||||
local c = chunks[ci]
|
||||
if (c.x == x) and (c.y == y) then
|
||||
addMe = false
|
||||
break
|
||||
end
|
||||
end
|
||||
if addMe then
|
||||
local chunkXY = {x=x,y=y}
|
||||
chunks[#chunks+1] = chunkXY
|
||||
onChunkGenerated({area = { left_top = chunkXY },
|
||||
surface = surface})
|
||||
end
|
||||
end
|
||||
if addMe then
|
||||
local chunkXY = {x=x,y=y}
|
||||
chunks[#chunks+1] = chunkXY
|
||||
onChunkGenerated({area = { left_top = chunkXY },
|
||||
surface = surface})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for i=1,#tiles do
|
||||
local tile = tiles[i]
|
||||
|
Loading…
x
Reference in New Issue
Block a user