This commit is contained in:
Byte
2026-06-14 10:23:25 +02:00
parent 3c154f858d
commit b32e298a18
98 changed files with 39416 additions and 1625 deletions
+28 -2
View File
@@ -12,6 +12,7 @@
#include "FurnaceScreen.h"
#include "TrapScreen.h"
#include "../Minecraft.Client/Common/UI/UIScene.h"
#include "MultiPlayerLocalPlayer.h"
#include "CreativeMode.h"
#include "GameRenderer.h"
@@ -56,6 +57,8 @@
#ifndef _DURANGO
#include "../Minecraft.World/CommonStats.h"
#endif
#include "Common/StringUtils.h"
extern ConsoleUIController ui;
@@ -798,6 +801,30 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
if (stat->isAchievement())
{
Achievement *ach = static_cast<Achievement *>(stat);
/*ui.ShowAchievementToast(
WideToUtf8(app.GetString(ach->nameID)),
WideToUtf8(app.GetString(IDS_ACHIEVEMENT_VIEW))
);*/
std::wstring iconStr(ach->iconInt.begin(),
ach->iconInt.end());
wstring path = L"Graphics\\Achievements\\TROP" +
(iconStr.empty() ? L"000" : iconStr) +
L".png";
byteArray ba = app.getArchiveFile(path);
//auto t = ui.GetTopScene(0);
//t->registerSubstitutionTexture(path, ba.data, ba.length);
if (!minecraft->stats[m_iPad]->hasTaken(ach))
{
ui.ShowAchievementToast(
UtilityGame::StringUtils::WideToUtf8(app.GetString(ach->nameID)),
UtilityGame::StringUtils::WideToUtf8(app.FormatHTMLString(0, app.GetString(IDS_ACHIEVEMENT_VIEW), 0xFFFFFFFF, true).c_str()), ba,
UtilityGame::StringUtils::WideToUtf8(path.c_str())
);
minecraft->achID = ach->getAchievementID();
}
//app.FormatHTMLString(0, app.GetString(IDS_ACHIEVEMENT_VIEW));
// 4J-PB - changed to attempt to award everytime - the award may need a storage device, so needs a primary player, and the player may not have been a primary player when they first 'got' the award
// so let the award manager figure it out
//if (!minecraft->stats[m_iPad]->hasTaken(ach))
@@ -934,7 +961,6 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
}
#endif
#ifdef _EXTENDED_ACHIEVEMENTS
// AWARD : Porkchop, cook and eat a porkchop.
{
@@ -1094,7 +1120,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param)
}
#endif
}
#endif
}
bool LocalPlayer::isSolidBlock(int x, int y, int z)