Skip to content

Commit

Permalink
Revert overmap search radius option.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingranade committed Dec 30, 2019
1 parent 072ff2f commit fe5ba30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 0 additions & 5 deletions src/options.cpp
Expand Up @@ -1245,11 +1245,6 @@ void options_manager::add_options_general()
"ask"
);

add( "MAP_UI_SEARCH_RADIUS", "general", translate_marker( "Map search radius" ),
translate_marker( "Radius around the cursor to search in the map UI. Setting very high may be slow." ),
10, 4000, 100
);

mOptionsSort["general"]++;

add( "SOUND_ENABLED", "general", translate_marker( "Sound Enabled" ),
Expand Down
8 changes: 2 additions & 6 deletions src/overmap_ui.cpp
Expand Up @@ -1089,14 +1089,9 @@ void create_note( const tripoint &curs )
static bool search( tripoint &curs, const tripoint &orig, const bool show_explored,
const bool fast_scroll, std::string &action )
{
const int radius = get_option<int>( "MAP_UI_SEARCH_RADIUS" );

std::string term = string_input_popup()
.title( _( "Search term:" ) )
.description( string_format(
_( "Multiple entries separated with comma (,). Excludes starting with hyphen (-)\n"
"Current search radius is %d. It can be changed in options." ),
radius ) )
.description( _( "Multiple entries separated with comma (,). Excludes starting with hyphen (-)." ) )
.query_string();
if( term.empty() ) {
return false;
Expand All @@ -1105,6 +1100,7 @@ static bool search( tripoint &curs, const tripoint &orig, const bool show_explor
std::vector<point> locations;
std::vector<point> overmap_checked;

const int radius = OMAPX / 2; // arbitrary
for( const tripoint &p : points_in_radius( curs, radius ) ) {
overmap_with_local_coords om_loc = overmap_buffer.get_existing_om_global( p );

Expand Down

3 comments on commit fe5ba30

@AlexMooney
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I, for one, was really happy to be able to crank up my search radius and not miss distant locales. Why revert this? May be better to comment in the issue: #35690

@CEG86
Copy link

@CEG86 CEG86 commented on fe5ba30 Dec 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super disappointing decision to make. And without comment or explanation.

@AlexMooney
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see now that there was an explanation in the original PR:

This doesn't need an option, this needs a better default, and if there are performance issues it needs performance work.

Please sign in to comment.