| 222 | } |
| 223 | |
| 224 | void ContainerPane::swapSlot(ItemGridWidget* grid) { |
| 225 | auto inv = m_player->inventory(); |
| 226 | if (context()->shiftHeld()) { |
| 227 | auto containerItem = grid->selectedItem(); |
| 228 | if (containerItem && inv->itemsCanFit(containerItem) >= containerItem->count()) { |
| 229 | m_containerInteractor->swapInContainer(grid->selectedIndex(), {}); |
| 230 | m_expectingSwap = ExpectingSwap::Inventory; |
| 231 | } |
| 232 | } else { |
| 233 | m_containerInteractor->swapInContainer(grid->selectedIndex(), inv->swapSlotItem()); |
| 234 | inv->setSwapSlotItem({}); |
| 235 | m_expectingSwap = ExpectingSwap::SwapSlot; |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | void ContainerPane::startCrafting() { |
| 240 | m_containerInteractor->startCraftingInContainer(); |
nothing calls this directly
no test coverage detected