2014-12-13 09:06:55 -05:00
|
|
|
|
|
|
|
// ChestWindow.h
|
|
|
|
|
|
|
|
// Representing the UI window for the chest block
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Window.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cChestWindow :
|
|
|
|
public cWindow
|
|
|
|
{
|
|
|
|
typedef cWindow super;
|
|
|
|
|
|
|
|
public:
|
2015-03-10 14:40:53 -04:00
|
|
|
cChestWindow(cChestEntity * a_Chest);
|
|
|
|
|
|
|
|
cChestWindow(cChestEntity * a_PrimaryChest, cChestEntity * a_SecondaryChest);
|
|
|
|
|
2017-05-20 02:16:28 -04:00
|
|
|
virtual ~cChestWindow() override;
|
2015-03-10 14:40:53 -04:00
|
|
|
|
|
|
|
virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) override;
|
|
|
|
|
|
|
|
virtual void OpenedByPlayer(cPlayer & a_Player) override;
|
|
|
|
|
|
|
|
virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override;
|
2016-02-05 16:45:45 -05:00
|
|
|
|
2014-12-13 09:06:55 -05:00
|
|
|
protected:
|
|
|
|
cWorld * m_World;
|
2017-09-19 10:12:54 -04:00
|
|
|
Vector3i m_BlockPos; // Position of the chest, for the window-close packet
|
2014-12-13 09:06:55 -05:00
|
|
|
cChestEntity * m_PrimaryChest;
|
|
|
|
cChestEntity * m_SecondaryChest;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|