Don't search for an exit direction from the red teleporter you entered

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-24 08:01:43 -07:00
parent afe68e1b20
commit d3067173d6

View File

@ -1261,8 +1261,12 @@ const TILE_TYPES = {
} }
let exit_direction = other.direction; let exit_direction = other.direction;
for (let tile of iterable) { for (let tile of iterable) {
if (tile === me || this._is_active(tile, level)) { // Red teleporters allow exiting in any direction, searching clockwise, except for
// Red teleporters allow exiting in any direction, searching clockwise // the teleporter you entered
if (tile === me) {
yield [tile, exit_direction];
}
else if (this._is_active(tile, level)) {
yield [tile, exit_direction]; yield [tile, exit_direction];
yield [tile, DIRECTIONS[exit_direction].right]; yield [tile, DIRECTIONS[exit_direction].right];
yield [tile, DIRECTIONS[exit_direction].opposite]; yield [tile, DIRECTIONS[exit_direction].opposite];