This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
43 lines
968 B
C++
43 lines
968 B
C++
#include "stdafx.h"
|
|
#include "..\..\..\Minecraft.World\ItemInstance.h"
|
|
#if !(defined _XBOX) && !(defined __PSVITA__)
|
|
#include "..\UI\UI.h"
|
|
#endif
|
|
#include "Tutorial.h"
|
|
#include "XuiCraftingTask.h"
|
|
|
|
bool XuiCraftingTask::isCompleted()
|
|
{
|
|
#ifndef __PSVITA__
|
|
// This doesn't seem to work
|
|
//IUIScene_CraftingMenu *craftScene = reinterpret_cast<IUIScene_CraftingMenu *>(tutorial->getScene());
|
|
#ifdef _XBOX
|
|
CXuiSceneCraftingPanel *craftScene = (CXuiSceneCraftingPanel *)(tutorial->getScene());
|
|
#else
|
|
UIScene_CraftingMenu *craftScene = reinterpret_cast<UIScene_CraftingMenu *>(tutorial->getScene());
|
|
#endif
|
|
|
|
bool completed = false;
|
|
|
|
switch(m_type)
|
|
{
|
|
case e_Crafting_SelectGroup:
|
|
if(craftScene != NULL && craftScene->getCurrentGroup() == m_group)
|
|
{
|
|
completed = true;
|
|
}
|
|
break;
|
|
case e_Crafting_SelectItem:
|
|
if(craftScene != NULL && craftScene->isItemSelected(m_item))
|
|
{
|
|
completed = true;
|
|
}
|
|
break;
|
|
}
|
|
|
|
return completed;
|
|
#else
|
|
return true;
|
|
#endif
|
|
}
|