TilePropCodex is now object, torch flicker (WIP as all the torches are in unison)

Former-commit-id: df9c0e3a9ace2ba976da5e81f1f2d2217db541a0
Former-commit-id: 81a25a938023f318937e1f4ded15e6047fdf8864
This commit is contained in:
Song Minjae
2016-06-17 01:39:55 +09:00
parent 9f42ae9639
commit c4ad69525b
20 changed files with 347 additions and 206 deletions

View File

@@ -34,7 +34,17 @@ class ThreadProcessNoiseLayers(val startIndex: Int, val endIndex: Int,
val threshold = record.filter.getGrad(y, record.filterArg1, record.filterArg2)
if (noise > threshold * record.scarcity) {
if ((MapGenerator.map.getTileFromTerrain(x, y) == fromTerr || fromTerr == MapGenerator.TILE_MACRO_ALL)
if (fromTerr is IntArray) {
for (i in 0..fromTerr.size - 1) {
val fromTerrVariable = fromTerr[i]
if ((MapGenerator.map.getTileFromTerrain(x, y) == fromTerrVariable || fromTerrVariable == MapGenerator.TILE_MACRO_ALL)
&& (MapGenerator.map.getTileFromWall(x, y) == fromWall || fromWall == MapGenerator.TILE_MACRO_ALL)) {
MapGenerator.map.setTileTerrain(x, y, to)
}
}
}
else if ((MapGenerator.map.getTileFromTerrain(x, y) == fromTerr || fromTerr == MapGenerator.TILE_MACRO_ALL)
&& (MapGenerator.map.getTileFromWall(x, y) == fromWall || fromWall == MapGenerator.TILE_MACRO_ALL)) {
MapGenerator.map.setTileTerrain(x, y, to)
}