Skip to content

Commit

Permalink
fix starting repair
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmuolio committed Jul 12, 2021
1 parent a74fabd commit bab395f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8482,12 +8482,7 @@ int item::units_remaining( const Character &ch, int limit ) const
return std::min( static_cast<int>( charges ), limit );
}

int res = ammo_remaining();
if( res < limit && has_flag( flag_USE_UPS ) ) {
res += std::min( ch.available_ups(), limit - res );
}

return std::min( static_cast<int>( res ), limit );
return std::min( ammo_remaining( &ch ), limit );
}

bool item::units_sufficient( const Character &ch, int qty ) const
Expand Down

0 comments on commit bab395f

Please sign in to comment.