4
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
629 B

#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);
}
}