diff options
Diffstat (limited to 'src/UI/BrewingstandWindow.cpp')
-rw-r--r-- | src/UI/BrewingstandWindow.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/UI/BrewingstandWindow.cpp b/src/UI/BrewingstandWindow.cpp index 928eef7a8..25dc72068 100644 --- a/src/UI/BrewingstandWindow.cpp +++ b/src/UI/BrewingstandWindow.cpp @@ -13,7 +13,7 @@ -cBrewingstandWindow::cBrewingstandWindow(cBrewingstandEntity * a_Brewingstand): +cBrewingstandWindow::cBrewingstandWindow(cBrewingstandEntity * a_Brewingstand) : Super(wtBrewery, "Brewingstand") { m_SlotAreas.push_back(new cSlotAreaBrewingstand(a_Brewingstand, *this)); @@ -25,7 +25,13 @@ cBrewingstandWindow::cBrewingstandWindow(cBrewingstandEntity * a_Brewingstand): -void cBrewingstandWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) +void cBrewingstandWindow::DistributeStack( + cItem & a_ItemStack, + int a_Slot, + cPlayer & a_Player, + cSlotArea * a_ClickedArea, + bool a_ShouldApply +) { cSlotAreas AreasInOrder; @@ -34,14 +40,14 @@ void cBrewingstandWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlay if ((a_Slot >= 0) && (a_Slot <= 4)) { // Brewing stand Area - AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ - AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ + AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ + AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, true); } else { - AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ - AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ + AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ + AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false); } } @@ -50,17 +56,17 @@ void cBrewingstandWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlay cBrewingRecipes * BR = cRoot::Get()->GetBrewingRecipes(); if ((BR->IsBottle(a_ItemStack)) || (BR->IsIngredient(a_ItemStack)) || BR->IsFuel(a_ItemStack)) { - AreasInOrder.push_back(m_SlotAreas[0]); /* brewing stand Area */ + AreasInOrder.push_back(m_SlotAreas[0]); /* brewing stand Area */ } else if (a_ClickedArea == m_SlotAreas[1]) { // Inventory Area - AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ + AreasInOrder.push_back(m_SlotAreas[2]); /* Hotbar */ } else { // Hotbar Area - AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ + AreasInOrder.push_back(m_SlotAreas[1]); /* Inventory */ } Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false); |