engine/generators/settlements/sector/source/ShadeGardenGenerator.cpp
// Generate the bench in the centre of the garden
Generate the bench in the centre of the garden
Generate the bench in the centre of the garden
void ShadeGardenGenerator::generate_features(MapPtr map, const Coordinate& start_coord, const Coordinate& end_coord)
{
  int centre_row = (start_coord.first + end_coord.first) / 2;
  int centre_col = (start_coord.second + end_coord.second) / 2;
  FeaturePtr bench   = FeatureGenerator::generate_bench();
  TilePtr bench_tile = map->at(centre_row, centre_col);
  bench_tile->set_feature(bench);
  bench_tile->get_items()->clear();
}
void ShadeGardenGenerator :: generate_features ( MapPtr map , const Coordinate & start_coord , const Coordinate & end_coord ) { int centre_row = ( start_coord . first + end_coord . first ) / 2 ; int centre_col = ( start_coord . second + end_coord . second ) / 2 ; FeaturePtr bench = FeatureGenerator :: generate_bench ( ) ; TilePtr bench_tile = map -> at ( centre_row , centre_col ) ; bench_tile -> set_feature ( bench ) ; bench_tile -> get_items ( ) -> clear ( ) ; }
Generate the bench in the centre of the garden
Generate the bench in the centre of the garden
// Make sure there are no ferns, etc., generated over top of the bench.