diff options
author | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-19 22:19:36 +0100 |
---|---|---|
committer | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-12-19 22:19:36 +0100 |
commit | 05d71675f69e13d8ab590a33b38ee6d0f8a77b6f (patch) | |
tree | 97453620e42516f0e6da1e969397e14becdc15b4 /source/UI/SlotArea.cpp | |
parent | Implemented double doors (diff) | |
download | cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.gz cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.bz2 cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.lz cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.xz cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.tar.zst cuberite-05d71675f69e13d8ab590a33b38ee6d0f8a77b6f.zip |
Diffstat (limited to 'source/UI/SlotArea.cpp')
-rw-r--r-- | source/UI/SlotArea.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/source/UI/SlotArea.cpp b/source/UI/SlotArea.cpp index 4b6d237ba..01f77d74a 100644 --- a/source/UI/SlotArea.cpp +++ b/source/UI/SlotArea.cpp @@ -7,6 +7,7 @@ #include "SlotArea.h"
#include "../Player.h"
#include "../ChestEntity.h"
+#include "../DispenserEntity.h"
#include "../FurnaceEntity.h"
#include "../Items/ItemHandler.h"
#include "Window.h"
@@ -417,6 +418,53 @@ cCraftingRecipe & cSlotAreaCrafting::GetRecipeForPlayer(cPlayer & a_Player) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cSlotAreaFurnace:
+cSlotAreaDispenser::cSlotAreaDispenser(cDispenserEntity * a_Dispenser, cWindow & a_ParentWindow) :
+ cSlotArea(9, a_ParentWindow),
+ m_Dispenser(a_Dispenser)
+{
+}
+
+
+
+
+
+void cSlotAreaDispenser::Clicked(cPlayer & a_Player, int a_SlotNum, bool a_IsRightClick, bool a_IsShiftPressed, const cItem & a_ClickedItem)
+{
+ super::Clicked(a_Player, a_SlotNum, a_IsRightClick, a_IsShiftPressed, a_ClickedItem);
+
+ if (m_Dispenser == NULL)
+ {
+ LOGERROR("cSlotAreaDispenser::Clicked(): m_Dispenser == NULL");
+ ASSERT(!"cSlotAreaDispenser::Clicked(): m_Dispenser == NULL");
+ return;
+ }
+}
+
+
+
+
+
+const cItem * cSlotAreaDispenser::GetSlot(int a_SlotNum, cPlayer & a_Player)
+{
+ return m_Dispenser->GetSlot(a_SlotNum);
+}
+
+
+
+
+
+void cSlotAreaDispenser::SetSlot(int a_SlotNum, cPlayer & a_Player, const cItem & a_Item)
+{
+ m_Dispenser->SetSlot(a_SlotNum, a_Item);
+}
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// cSlotAreaFurnace:
+
cSlotAreaFurnace::cSlotAreaFurnace(cFurnaceEntity * a_Furnace, cWindow & a_ParentWindow) :
cSlotArea(3, a_ParentWindow),
m_Furnace(a_Furnace)
|