mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-23 15:36:07 +00:00
Notably also adds some metadata files for NixOS * add support for linux clang cross compiles * add linux clang instructions * un-capitalize Mob.horse.* * update the description in flake.nix --------- Co-authored-by: Loki <lokirautio@gmail.com>
43 lines
974 B
C++
43 lines
974 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 != nullptr && craftScene->getCurrentGroup() == m_group)
|
|
{
|
|
completed = true;
|
|
}
|
|
break;
|
|
case e_Crafting_SelectItem:
|
|
if(craftScene != nullptr && craftScene->isItemSelected(m_item))
|
|
{
|
|
completed = true;
|
|
}
|
|
break;
|
|
}
|
|
|
|
return completed;
|
|
#else
|
|
return true;
|
|
#endif
|
|
}
|