engine/maps/source/MapUtils.cpp
// Does the area around a tile allow creature generation?
// Creatures can't be generated within a couple of steps of a stairway.
// They also shouldn't be generated close to the player.
Does the area around a tile allow creature generation.
Creatures can't be generated within a couple of steps of a stairway.
They also shouldn't be generated close to the player.
Does the area around a tile allow creature generation . Creatures can ' t be generated within a couple of steps of a stairway . They also shouldn ' t be generated close to the player .
bool MapUtils::does_area_around_tile_allow_creature_generation(MapPtr map, const Coordinate& c)
{
  bool gen_ok = true;
  if (map != nullptr)
  {
    gen_ok = (MapUtils::does_area_around_tile_contain_staircase(map, c) == false);
    if (gen_ok)
    {
      gen_ok = (MapUtils::is_coordinate_within_player_restricted_zone(map, c) == false);
    }
  }
  return gen_ok;
}
bool MapUtils :: does_area_around_tile_allow_creature_generation ( MapPtr map , const Coordinate & c ) { bool gen_ok = true ; if ( map != nullptr ) { gen_ok = ( MapUtils :: does_area_around_tile_contain_staircase ( map , c ) == false ) ; if ( gen_ok ) { gen_ok = ( MapUtils :: is_coordinate_within_player_restricted_zone ( map , c ) == false ) ; } } return gen_ok ; }
Does the area around a tile allow creature generation?
Does the area around a tile allow creature generation?