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

Fix house id matching in hardcoded missions #37473

Merged
merged 1 commit into from
Jan 28, 2020
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
7 changes: 5 additions & 2 deletions src/mission_companion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,9 +1253,12 @@ bool talk_function::scavenging_raid_return( npc &p )
}
}
//The loot value needs to be added to the faction - what the player is payed
tripoint loot_location = g->u.global_omt_location();
// Only check at the ground floor.
loot_location.z = 0;
for( int i = 0; i < rng( 2, 3 ); i++ ) {
const tripoint site = overmap_buffer.find_closest( g->u.global_omt_location(), "house",
0, false );
const tripoint site = overmap_buffer.find_closest( loot_location, "house", 0, false,
ot_match_type::prefix );
overmap_buffer.reveal( site, 2 );
loot_building( site );
}
Expand Down
2 changes: 1 addition & 1 deletion src/mission_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static tripoint random_house_in_city( const city_reference &cref )
const tripoint city_center_omt = sm_to_omt_copy( cref.abs_sm_pos );
std::vector<tripoint> valid;
for( const tripoint &p : points_in_radius( city_center_omt, cref.city->size ) ) {
if( overmap_buffer.check_ot( "house", ot_match_type::type, p ) ) {
if( overmap_buffer.check_ot( "house", ot_match_type::prefix, p ) ) {
valid.push_back( p );
}
}
Expand Down