Skip to content

Commit

Permalink
fix charcoal reloading issue in CleverRaven#38462
Browse files Browse the repository at this point in the history
  • Loading branch information
jkraybill committed Mar 1, 2020
1 parent 120749f commit d10be52
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3628,10 +3628,15 @@ void iexamine::reload_furniture( player &p, const tripoint &examp )
if( amount_in_furn > 0 ) {
if( p.query_yn( _( "The %1$s contains %2$d %3$s. Unload?" ), f.name(), amount_in_furn,
ammo->nname( amount_in_furn ) ) ) {
p.assign_activity( ACT_PICKUP );
p.activity.targets.emplace_back( map_cursor( examp ), &g->m.i_at( examp ).only_item() );
p.activity.values.push_back( 0 );
return;
auto items = g->m.i_at( examp );
for( auto &itm : items ) {
if( itm.type == ammo ) {
p.assign_activity( ACT_PICKUP );
p.activity.targets.emplace_back( map_cursor( examp ), &itm );
p.activity.values.push_back( 0 );
return;
}
}
}
}

Expand Down

0 comments on commit d10be52

Please sign in to comment.