the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 43 lines 1.4 kB view raw
1#pragma once 2 3#include "AbstractContainerMenu.h" 4 5class CraftingContainer; 6class Container; 7 8class FireworksMenu : public AbstractContainerMenu 9{ 10 // 4J Stu Made these public for UI menus, perhaps should make friend class? 11public: 12 static const int RESULT_SLOT = 0; 13 static const int CRAFT_SLOT_START = 1; 14 static const int CRAFT_SLOT_END = CRAFT_SLOT_START + 9; 15 static const int INV_SLOT_START = CRAFT_SLOT_END; 16 static const int INV_SLOT_END = INV_SLOT_START + (9*3); 17 static const int USE_ROW_SLOT_START = INV_SLOT_END; 18 static const int USE_ROW_SLOT_END = USE_ROW_SLOT_START + 9; 19 20public: 21 shared_ptr<CraftingContainer> craftSlots; 22 shared_ptr<Container> resultSlots; 23 24private: 25 Level *level; 26 int x, y, z; 27 28 bool m_canMakeFireworks; 29 bool m_canMakeCharge; 30 bool m_canMakeFade; 31 32public: 33 FireworksMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt); 34 35 virtual void slotsChanged();// 4J used to take a shared_ptr<Container> but wasn't using it, so removed to simplify things 36 virtual void removed(shared_ptr<Player> player); 37 virtual bool stillValid(shared_ptr<Player> player); 38 virtual shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex); 39 virtual bool canTakeItemForPickAll(shared_ptr<ItemInstance> carried, Slot *target); 40 41 // 4J Added 42 virtual bool isValidIngredient(shared_ptr<ItemInstance> item, int slotId); 43};