Skip to content

Commit

Permalink
Invalidate non-adjacent containers for ALL and DRAGGED (CleverRaven#7…
Browse files Browse the repository at this point in the history
…0172)

This also changes it to not update the container_base_loc's position for ALL and DRAGGED, which made it so pressing X would exit out to a 1-9 location instead of ALL or DRAGGED

Co-authored-by: andrei <[email protected]>
  • Loading branch information
2 people authored and gkarfakis19 committed Dec 14, 2023
1 parent 193d233 commit a8b11b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/advanced_inv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void advanced_inventory::recalc_pane( side p )
advanced_inv_area &other = squares[there.get_area()];
avatar &player_character = get_avatar();
if( pane.container &&
pane.container_base_loc >= AIM_SOUTHWEST && pane.container_base_loc <= AIM_NORTHEAST ) {
pane.container_base_loc >= AIM_SOUTHWEST && pane.container_base_loc <= AIM_ALL ) {

const tripoint_rel_ms offset = player_character.pos_bub() - pane.container.pos_bub();

Expand All @@ -717,7 +717,7 @@ void advanced_inventory::recalc_pane( side p )

pane.container = item_location::nowhere;
pane.container_base_loc = NUM_AIM_LOCATIONS;
} else {
} else if( pane.container_base_loc <= AIM_NORTHEAST ) {
pane.container_base_loc = static_cast<aim_location>( ( offset.y() + 1 ) * 3 - offset.x() + 2 );
}
}
Expand Down

0 comments on commit a8b11b4

Please sign in to comment.