oops fix crash

This commit is contained in:
Timothy Stiles 2021-02-16 16:29:43 +11:00
parent 62a3ed99aa
commit 5551e546de
2 changed files with 2 additions and 2 deletions

View File

@ -2156,7 +2156,7 @@ export class Level extends LevelInterface {
} }
//same as above, but accepts multiple tiles //same as above, but accepts multiple tiles
*iter_tiles_in_reading_order(start_cell, names, reverse = false) { *iter_tiles_in_reading_order_multiple(start_cell, names, reverse = false) {
let i = this.coords_to_scalar(start_cell.x, start_cell.y); let i = this.coords_to_scalar(start_cell.x, start_cell.y);
let index = TILE_TYPES[names[0]].layer; let index = TILE_TYPES[names[0]].layer;
while (true) { while (true) {

View File

@ -1647,7 +1647,7 @@ const TILE_TYPES = {
// TODO cc2 has a bug where, once it wraps around to the bottom right, it seems to // TODO cc2 has a bug where, once it wraps around to the bottom right, it seems to
// forget that it was ever looking for an unwired teleport and will just grab the // forget that it was ever looking for an unwired teleport and will just grab the
// first one it sees // first one it sees
for (let dest of level.iter_tiles_in_reading_order(me.cell, ['teleport_blue', 'teleport_blue_exit'], true)) { for (let dest of level.iter_tiles_in_reading_order_multiple(me.cell, ['teleport_blue', 'teleport_blue_exit'], true)) {
if (! dest.wire_directions) { if (! dest.wire_directions) {
yield [dest, exit_direction]; yield [dest, exit_direction];
} }