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

Reduce liquid volume per turn by a factor of 6 #34234

Merged
merged 4 commits into from
Sep 26, 2019
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion src/activity_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ void activity_handlers::fill_liquid_do_turn( player_activity *act, player *p )
break;
}

static const auto volume_per_turn = units::from_liter( 4 );
static const auto volume_per_turn = units::from_liter( 4 / 6 );
Copy link
Member

@KorGgenT KorGgenT Sep 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you're at it, wanna remove that auto in favor of units::volume? also that's integer division.

ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved
const int charges_per_turn = std::max( 1, liquid.charges_per_volume( volume_per_turn ) );
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved
liquid.charges = std::min( charges_per_turn, liquid.charges );
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved
const int original_charges = liquid.charges;
Expand Down