25 lines
641 B
C++
25 lines
641 B
C++
#pragma once
|
|
|
|
#include "Achievements.h"
|
|
#include "Util.h"
|
|
|
|
namespace Papyrus::PapyrusFunctions
|
|
{
|
|
bool CallUnlockAchievement(RE::StaticFunctionTag* tag, RE::BSFixedString achievement)
|
|
{
|
|
if (AchievementsEnabled()) {
|
|
return SteamInstance()->setAchievementUnlocked(achievement.c_str());
|
|
} else {
|
|
RE::DebugNotification(std::format("Achievement unlocked: {}", achievement.c_str()).c_str());
|
|
logger::info("{}", std::format("Achievement unlocked: {}", achievement.c_str()).c_str());
|
|
return true;
|
|
}
|
|
}
|
|
|
|
inline void Bind(VM& a_vm)
|
|
{
|
|
BIND(CallUnlockAchievement);
|
|
logger::info("{}", "Registered CallUnlockAchievement"sv);
|
|
}
|
|
}
|