engine/generators/crypts/source/CryptGenerator.cpp
// Generate skeletons around the perimeter of the crypt.
Generate skeletons around the perimeter of the crypt.
Generate skeletons around the perimeter of the crypt .
void CryptGenerator::generate_perimeter_skeletons(const std::tuple<Coordinate, Coordinate, Coordinate>& loc_details, MapPtr map)
{
  Coordinate top_left = get<1>(loc_details);
  Coordinate bottom_right = get<2>(loc_details);
  vector<Coordinate> coords = CoordUtils::get_perimeter_coordinates(top_left, bottom_right);
  TilePtr tile;
  for (const auto& coord : coords)
  {
    tile = map->at(coord.first, coord.second);
    ItemPtr bones = ItemManager::create_item("_pile_of_bones");
    if (tile && (tile->get_tile_type() == TileType::TILE_TYPE_DUNGEON) && (bones != nullptr))
    {
      tile->get_items()->add(bones);
    }
  }
}
void CryptGenerator :: generate_perimeter_skeletons ( const std :: tuple < Coordinate , Coordinate , Coordinate > & loc_details , MapPtr map ) { Coordinate top_left = get < 1 > ( loc_details ) ; Coordinate bottom_right = get < 2 > ( loc_details ) ; vector < Coordinate > coords = CoordUtils :: get_perimeter_coordinates ( top_left , bottom_right ) ; TilePtr tile ; for ( const auto & coord : coords ) { tile = map -> at ( coord . first , coord . second ) ; ItemPtr bones = ItemManager :: create_item ( " " ) ; if ( tile && ( tile -> get_tile_type ( ) == TileType :: TILE_TYPE_DUNGEON ) && ( bones != nullptr ) ) { tile -> get_items ( ) -> add ( bones ) ; } } }
Generate skeletons around the perimeter of the crypt.
Generate skeletons around the perimeter of the crypt .