summaryrefslogtreecommitdiffstats
path: root/src/UI/MinecartWithChestWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/UI/MinecartWithChestWindow.h')
-rw-r--r--src/UI/MinecartWithChestWindow.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/UI/MinecartWithChestWindow.h b/src/UI/MinecartWithChestWindow.h
index 7303ecf96..d600d2f73 100644
--- a/src/UI/MinecartWithChestWindow.h
+++ b/src/UI/MinecartWithChestWindow.h
@@ -16,16 +16,13 @@
-class cMinecartWithChestWindow:
- public cWindow
+class cMinecartWithChestWindow : public cWindow
{
using Super = cWindow;
-public:
-
+ public:
cMinecartWithChestWindow(cMinecartWithChest * a_ChestCart) :
- cWindow(wtChest, "Minecart with Chest"),
- m_ChestCart(a_ChestCart)
+ cWindow(wtChest, "Minecart with Chest"), m_ChestCart(a_ChestCart)
{
m_SlotAreas.push_back(new cSlotAreaMinecartWithChest(a_ChestCart, *this));
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
@@ -34,21 +31,27 @@ public:
a_ChestCart->GetWorld()->BroadcastSoundEffect("block.chest.open", a_ChestCart->GetPosition(), 1, 1);
}
- virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override
+ virtual void DistributeStack(
+ cItem & a_ItemStack,
+ int a_Slot,
+ cPlayer & a_Player,
+ cSlotArea * a_ClickedArea,
+ bool a_ShouldApply
+ ) override
{
cSlotAreas AreasInOrder;
if (a_ClickedArea == m_SlotAreas[0])
{
// Chest 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
{
// Hotbar or Inventory
- AreasInOrder.push_back(m_SlotAreas[0]); /* Chest */
+ AreasInOrder.push_back(m_SlotAreas[0]); /* Chest */
Super::DistributeStackToAreas(a_ItemStack, a_Player, AreasInOrder, a_ShouldApply, false);
}
}
@@ -59,10 +62,6 @@ public:
m_ChestCart->GetWorld()->BroadcastSoundEffect("block.chest.close", m_ChestCart->GetPosition(), 1, 1);
}
-private:
+ private:
cMinecartWithChest * m_ChestCart;
};
-
-
-
-