engine/generators/worship_sites/source/CathedralGenerator.cpp
// Generate a 5x5 dais, placing an altar in the centre.
Generate a 5x5 dais, placing an altar in the centre.
Generate a 5x5 dais placing an altar in the centre .
void CathedralGenerator::generate_dais_and_altar(MapPtr map, const int dais_start_row, const int dais_start_col, const int dais_height, const int dais_width)
{
  TileGenerator tg;
  TilePtr dais_tile;
  for (int row = dais_start_row; row < dais_start_row + dais_height; row++)
  {
    for (int col = dais_start_col; col < dais_start_col + dais_width; col++)
    {
      dais_tile = tg.generate(TileType::TILE_TYPE_DAIS);
      map->insert(row, col, dais_tile);
    }
  }
  int altar_row = dais_start_row + (dais_height/2);
  int altar_col = dais_start_col + (dais_width/2);
  dais_tile = map->at(altar_row, altar_col);
  FeaturePtr altar = FeatureGenerator::generate_altar(deity_id, AlignmentRange::ALIGNMENT_RANGE_GOOD);
  dais_tile->set_feature(altar);
}
void CathedralGenerator :: generate_dais_and_altar ( MapPtr map , const int dais_start_row , const int dais_start_col , const int dais_height , const int dais_width ) { TileGenerator tg ; TilePtr dais_tile ; for ( int row = dais_start_row ; row < dais_start_row + dais_height ; row ++ ) { for ( int col = dais_start_col ; col < dais_start_col + dais_width ; col ++ ) { dais_tile = tg . generate ( TileType :: TILE_TYPE_DAIS ) ; map -> insert ( row , col , dais_tile ) ; } } int altar_row = dais_start_row + ( dais_height / 2 ) ; int altar_col = dais_start_col + ( dais_width / 2 ) ; dais_tile = map -> at ( altar_row , altar_col ) ; FeaturePtr altar = FeatureGenerator :: generate_altar ( deity_id , AlignmentRange :: ALIGNMENT_RANGE_GOOD ) ; dais_tile -> set_feature ( altar ) ; }
Generate a 5x5 dais, placing an altar in the centre.
Generate a 5x5 dais placing an altar in the centre .
// Get the centre tile and generate a GoodAltar.