summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-11 14:26:04 +0100
committerMattes D <github@xoft.cz>2015-03-11 14:26:04 +0100
commit1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0 (patch)
tree961b0a521e31ba4f0a1b3516b49173c723ae24bd /src/Bindings
parentMerge pull request #1805 from mc-server/chunkDataFix (diff)
parentMoved window code into cpp files (diff)
downloadcuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar.gz
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar.bz2
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar.lz
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar.xz
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.tar.zst
cuberite-1b60fe12a859287d1fc9f923fb2c85e30e7f9ad0.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/LuaWindow.cpp18
-rw-r--r--src/Bindings/LuaWindow.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp
index 35730878d..d4014059b 100644
--- a/src/Bindings/LuaWindow.cpp
+++ b/src/Bindings/LuaWindow.cpp
@@ -167,6 +167,24 @@ void cLuaWindow::Destroy(void)
+void cLuaWindow::DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer& a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply)
+{
+ cSlotAreas Areas;
+ for (auto Area : m_SlotAreas)
+ {
+ if (Area != a_ClickedArea)
+ {
+ Areas.push_back(Area);
+ }
+ }
+
+ super::DistributeStackToAreas(a_ItemStack, a_Player, Areas, a_ShouldApply, false);
+}
+
+
+
+
+
void cLuaWindow::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum)
{
if (a_ItemGrid != &m_Contents)
diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h
index dab99a2e2..76530d99d 100644
--- a/src/Bindings/LuaWindow.h
+++ b/src/Bindings/LuaWindow.h
@@ -84,6 +84,7 @@ protected:
// cWindow overrides:
virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) override;
virtual void Destroy(void) override;
+ virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
// cItemGrid::cListener overrides:
virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override;