1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

bulk move artifacts only equipped, only backpack

This commit is contained in:
SoundSSGood
2023-07-24 19:09:17 +03:00
parent c6a86d9a5f
commit a83f290e13
16 changed files with 99 additions and 53 deletions

View File

@@ -654,7 +654,12 @@ std::function<void()> CExchangeController::onSwapArtifacts()
{
return [&]()
{
cb->bulkMoveArtifacts(left->id, right->id, true);
if(GH.isKeyboardCtrlDown())
cb->bulkMoveArtifacts(left->id, right->id, true, true, false);
else if(GH.isKeyboardShiftDown())
cb->bulkMoveArtifacts(left->id, right->id, true, false, true);
else
cb->bulkMoveArtifacts(left->id, right->id, true);
};
}
@@ -810,11 +815,14 @@ void CExchangeController::moveArtifacts(bool leftToRight)
const CGHeroInstance * target = leftToRight ? right : left;
if(source->tempOwner != cb->getPlayerID())
{
return;
}
cb->bulkMoveArtifacts(source->id, target->id, false);
if(GH.isKeyboardCtrlDown())
cb->bulkMoveArtifacts(source->id, target->id, false, true, false);
else if(GH.isKeyboardShiftDown())
cb->bulkMoveArtifacts(source->id, target->id, false, false, true);
else
cb->bulkMoveArtifacts(source->id, target->id, false);
}
void CExchangeController::moveArtifact(