Skip to content

Commit

Permalink
adjust better pocket formula to prefer non watertight containers
Browse files Browse the repository at this point in the history
  • Loading branch information
KorGgenT committed May 7, 2020
1 parent 971d80f commit d06af46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/item_pocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ bool item_pocket::better_pocket( const item_pocket &rhs, const item &it ) const
// a lower spoil multiplier is better
return rhs.spoil_multiplier() < spoil_multiplier();
}
if( data->rigid != rhs.data->rigid ) {
return rhs.data->rigid;
}
if( it.made_of( SOLID ) ) {
if( data->watertight != rhs.data->watertight ) {
return rhs.data->watertight;
return !rhs.data->watertight;
}
}
if( data->rigid != rhs.data->rigid ) {
return rhs.data->rigid;
}
if( remaining_volume() == rhs.remaining_volume() ) {
return rhs.obtain_cost( it ) < obtain_cost( it );
}
Expand Down

0 comments on commit d06af46

Please sign in to comment.