feat(TU31): classic crafting (#48)

credits: comicgab
This commit is contained in:
SevenToaster509
2026-05-01 19:44:30 +03:00
committed by GitHub
parent a51d7ae834
commit 05d7ccb6d4
32 changed files with 819 additions and 186 deletions
-8
View File
@@ -9,14 +9,6 @@
#include "ResultSlot.h"
#include "CraftingMenu.h"
const int CraftingMenu::RESULT_SLOT = 0;
const int CraftingMenu::CRAFT_SLOT_START = 1;
const int CraftingMenu::CRAFT_SLOT_END = CraftingMenu::CRAFT_SLOT_START + 9;
const int CraftingMenu::INV_SLOT_START = CraftingMenu::CRAFT_SLOT_END;
const int CraftingMenu::INV_SLOT_END = CraftingMenu::INV_SLOT_START + 9 * 3;
const int CraftingMenu::USE_ROW_SLOT_START = CraftingMenu::INV_SLOT_END;
const int CraftingMenu::USE_ROW_SLOT_END = CraftingMenu::USE_ROW_SLOT_START + 9;
CraftingMenu::CraftingMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt) : AbstractContainerMenu()
{
craftSlots = std::make_shared<CraftingContainer>(this, 3, 3);
+7 -7
View File
@@ -9,13 +9,13 @@ class CraftingMenu : public AbstractContainerMenu
{
// 4J Stu Made these public for UI menus, perhaps should make friend class?
public:
static const int RESULT_SLOT;
static const int CRAFT_SLOT_START;
static const int CRAFT_SLOT_END;
static const int INV_SLOT_START;
static const int INV_SLOT_END;
static const int USE_ROW_SLOT_START;
static const int USE_ROW_SLOT_END;
static const int RESULT_SLOT = 0;
static const int CRAFT_SLOT_START = 1;
static const int CRAFT_SLOT_END = CRAFT_SLOT_START + 9;
static const int INV_SLOT_START = CRAFT_SLOT_END;
static const int INV_SLOT_END = INV_SLOT_START + (9 * 3);
static const int USE_ROW_SLOT_START = INV_SLOT_END;
static const int USE_ROW_SLOT_END = USE_ROW_SLOT_START + 9;
public:
shared_ptr<CraftingContainer> craftSlots;