Skip to content

Commit

Permalink
#265 big fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Finnik723 committed Nov 16, 2024
1 parent 0521ce4 commit 5f99a69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Basescape/CovertOperationStartState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ void CovertOperationStartState::init()
if (!reqItems.empty())
{
int reqItemsN = 0;
for (auto& it : reqItems)
for (auto& [reqItem, reqValue] : reqItems)
{
reqItemsN += it.second;
for (auto& j : *_items->getContents())
reqItemsN += reqValue;
for (const auto& [contentItem, contentValue] : *_items->getContents())
{
if (j.first == it.first && j.second > it.second)
if (contentItem == reqItem)
{
reqItemsN -= j.second;
reqItemsN -= contentValue;
}
}
}
Expand Down

0 comments on commit 5f99a69

Please sign in to comment.