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

adjust better pocket formula to prefer non watertight containers #40286

Merged
Merged
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
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