Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bed requirement for base expansion #67908

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/basecamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ bool basecamp::has_provides( const std::string &req, const std::optional<point>
return false;
}

bool basecamp::can_expand() const
{
return has_provides( "bed", base_camps::base_dir, directions.size() * 2 );
}

bool basecamp::has_water() const
{
// special case required for fbmh_well_north constructed between b9162 (Jun 16, 2019) and b9644 (Sep 20, 2019)
Expand Down
1 change: 0 additions & 1 deletion src/basecamp.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ class basecamp
void update_provides( const std::string &bldg, expansion_data &e_data );
void update_in_progress( const std::string &bldg, const point &dir );

bool can_expand() const;
/// Returns the name of the building the current building @ref dir upgrades into,
/// "null" if there isn't one
std::string next_upgrade( const point &dir, int offset = 1 ) const;
Expand Down
13 changes: 2 additions & 11 deletions src/faction_camp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ void talk_function::start_camp( npc &p )
}
std::optional<basecamp *> camp = get_basecamp( p, camp_type.str() );
if( camp.has_value() ) {
for( int tab_num = base_camps::TAB_MAIN; tab_num < base_camps::TAB_NW; tab_num++ ) {
for( int tab_num = base_camps::TAB_MAIN; tab_num <= base_camps::TAB_NW; tab_num++ ) {
std::vector<ui_mission_id> temp;
camp.value()->hidden_missions.push_back( temp );
}
Expand Down Expand Up @@ -1374,7 +1374,7 @@ void basecamp::get_available_missions( mission_data &mission_key, map &here )

// Missions that belong exclusively to the central tile
{
if( can_expand() ) {
if( directions.size() < 8 ) {
const mission_id miss_id = { Camp_Survey_Expansion, "", {}, base_dir };
comp_list npc_list = get_mission_workers( miss_id );
entry = string_format( _( "Notes:\n"
Expand Down Expand Up @@ -1403,15 +1403,6 @@ void basecamp::get_available_missions( mission_data &mission_key, map &here )
mission_key.add_return( miss_id, _( "Recover Surveyor" ),
entry, avail );
}
} else {
// Unless maximum expansions have been reached, show "Expand Base",
// but in a disabled state, with a message about what is required.
if( directions.size() < 8 ) {
const mission_id miss_id = { Camp_Survey_Expansion, "", {}, base_dir };
entry = _( "You will need more beds before you can expand your base." );
mission_key.add_start( miss_id, name_display_of( miss_id ),
entry, false );
}
}
}

Expand Down