global cyclers don't cycle their surrounding tiles, just everythng else

This commit is contained in:
Timothy Stiles 2021-02-05 15:49:42 +11:00
parent bddde32325
commit 81fd712adc

View File

@ -1659,6 +1659,10 @@ const TILE_TYPES = {
{ {
for (var j = 0; j < level.height; ++j) for (var j = 0; j < level.height; ++j)
{ {
if (Math.abs(me.cell.x - i) + Math.abs(me.cell.y - j) <= 1)
{
continue;
}
let thing = level.cell(i, j).get_terrain(); let thing = level.cell(i, j).get_terrain();
let things = terrains; let things = terrains;
for (var k = 0; k < things.length; ++k) for (var k = 0; k < things.length; ++k)
@ -1681,6 +1685,10 @@ const TILE_TYPES = {
{ {
for (var j = 0; j < level.height; ++j) for (var j = 0; j < level.height; ++j)
{ {
if (Math.abs(me.cell.x - i) + Math.abs(me.cell.y - j) <= 1)
{
continue;
}
let thing = level.cell(i, j).get_item(); let thing = level.cell(i, j).get_item();
let things = items; let things = items;
if (thing == null) if (thing == null)