the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 44 lines 1.2 kB view raw
1#pragma once 2 3#include "AbstractContainerMenu.h" 4#include "Slot.h" 5 6class BeaconTileEntity; 7 8class BeaconMenu : public AbstractContainerMenu 9{ 10private: 11 class PaymentSlot : public Slot 12 { 13 public: 14 PaymentSlot(shared_ptr<Container> container, int slot, int x, int y); 15 16 bool mayPlace(shared_ptr<ItemInstance> item); 17 int getMaxStackSize() const; 18 }; 19 20public: 21 static const int PAYMENT_SLOT = 0; 22 static const int INV_SLOT_START = PAYMENT_SLOT + 1; 23 static const int INV_SLOT_END = INV_SLOT_START + 9 * 3; 24 static const int USE_ROW_SLOT_START = INV_SLOT_END; 25 static const int USE_ROW_SLOT_END = USE_ROW_SLOT_START + 9; 26 27private: 28 shared_ptr<BeaconTileEntity> beacon; 29 PaymentSlot *paymentSlot; 30 31 // copied values because container/client system is retarded 32 int levels; 33 int primaryPower; 34 int secondaryPower; 35 36public: 37 BeaconMenu(shared_ptr<Container> inventory, shared_ptr<BeaconTileEntity> beacon); 38 39 void addSlotListener(ContainerListener *listener); 40 void setData(int id, int value); 41 shared_ptr<BeaconTileEntity> getBeacon(); 42 bool stillValid(shared_ptr<Player> player); 43 shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex); 44};