Skip to content

Commit

Permalink
Backporting CleverRaven#51262 Fix sealed containers being targets for…
Browse files Browse the repository at this point in the history
… pickup actions
  • Loading branch information
BrettDong authored and ZhilkinSerg committed Nov 27, 2021
1 parent 100ccda commit 9e3c288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ bool can_examine_at( const tripoint &p )
if( here.has_flag( flag_CONSOLE, p ) ) {
return true;
}
if( here.has_items( p ) ) {
if( !here.has_flag( TFLAG_SEALED, p ) && here.has_items( p ) ) {
return true;
}
const furn_t &xfurn_t = here.furn( p ).obj();
Expand Down Expand Up @@ -677,7 +677,7 @@ static bool can_pickup_at( const tripoint &p )
const int cargo_part = vp->vehicle().part_with_feature( vp->part_index(), "CARGO", false );
veh_has_items = cargo_part >= 0 && !vp->vehicle().get_items( cargo_part ).empty();
}
return here.has_items( p ) || veh_has_items;
return ( !here.has_flag( TFLAG_SEALED, p ) && here.has_items( p ) ) || veh_has_items;
}

bool can_interact_at( action_id action, const tripoint &p )
Expand Down

0 comments on commit 9e3c288

Please sign in to comment.