engine/maps/source/MapUtils.cpp
// Get all the tiles the creature can access (its own tile, and those adjacent) 
// that have terrain features.
Get all the tiles the creature can access (its own tile, and those adjacent)
that have terrain features.
Get all the tiles the creature can access ( its own tile and those adjacent ) that have terrain features .
TileDirectionMap MapUtils::get_tiles_with_features(MapPtr& map, CreaturePtr& creature)
{
  TileDirectionMap tiles_to_consider = MapUtils::get_adjacent_and_creature_tiles(map, creature);
  TileDirectionMap result_map;
  for (const TileDirectionMap::value_type& tile_pair : tiles_to_consider)
  {
    TilePtr tile = tile_pair.second;
    if (tile && tile->get_feature()) 
    {
      result_map.insert(tile_pair);
    }
  }
  return result_map;
}
TileDirectionMap MapUtils :: get_tiles_with_features ( MapPtr & map , CreaturePtr & creature ) { TileDirectionMap tiles_to_consider = MapUtils :: get_adjacent_and_creature_tiles ( map , creature ) ; TileDirectionMap result_map ; for ( const TileDirectionMap :: value_type & tile_pair : tiles_to_consider ) { TilePtr tile = tile_pair . second ; if ( tile && tile -> get_feature ( ) ) { result_map . insert ( tile_pair ) ; } } return result_map ; }
Get all the tiles the creature can access (its own tile, and those adjacent)
that have terrain features.
Get all the tiles the creature can access ( its own tile and those adjacent ) that have terrain features .