| 829 | } |
| 830 | |
| 831 | void Part::scanConnectors() { |
| 832 | try { |
| 833 | m_reader->forEachTile([this](Vec2I position, Tile const& tile) -> bool { |
| 834 | if (tile.connector.isValid()) { |
| 835 | auto d = tile.connector->direction; |
| 836 | if (d == Direction::Unknown) |
| 837 | d = pickByNeighbours(position); |
| 838 | if (d == Direction::Unknown) |
| 839 | d = pickByEdge(position, m_size); |
| 840 | Logger::debug("Found connector on {} at {} group {} direction {}", m_name, position, tile.connector->value, (int)d); |
| 841 | m_connections.append(make_shared<Connector>(this, tile.connector->value, tile.connector->forwardOnly, d, position)); |
| 842 | } |
| 843 | |
| 844 | return false; |
| 845 | }); |
| 846 | } catch (std::exception& e) { |
| 847 | throw DungeonException(strf("Exception {} in connector {}", outputException(e, true), m_name)); |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | void Part::scanAnchor() { |
| 852 | int cx, cy, cc; |
nothing calls this directly
no test coverage detected