Skip to content

Commit

Permalink
Merge pull request #67908 from PatrikLundell/unchained_camp_expansion
Browse files Browse the repository at this point in the history
Remove bed requirement for base expansion
  • Loading branch information
Maleclypse authored Aug 30, 2023
2 parents c8c37e6 + 586c83e commit 3783fae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
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

0 comments on commit 3783fae

Please sign in to comment.