Include Weapon Upgrade/Equipment related Achievements. Release Build 8548.

This commit is contained in:
2024-03-29 10:47:49 -05:00
parent e15f23bad1
commit dfff1762f3
7 changed files with 79 additions and 1 deletions
@@ -50,6 +50,9 @@ All rights reserved.
#include "SoundEffect.h"
#include "ProgressBar.h"
#include "MenuItemLabel.h"
#ifndef __EMSCRIPTEN__
#include <isteamuserstats.h>
#endif
INCLUDE_game
INCLUDE_GFX
@@ -99,6 +102,19 @@ namespace CharacterMenuWindow{
if(!comp.expired()){
if(SelectedEquipIsDifferent(comp)){ //If we find that the opposite ring slot is equipped to us, this would be an item swap or the exact same ring, therefore no stat calculations apply.
Inventory::EquipItem(comp.lock()->GetItem(),EquipSlot(comp.lock()->I(Attribute::EQUIP_TYPE)));
#pragma region Achievement Stuff
if(SteamUserStats()){
#pragma region Fully Decked Out Achievement
datafile&unlock=DATA.GetProperty("Achievement.Equip Unlocks.Fully Decked Out");
if(Inventory::EquipsFullyMaxedOut(unlock["Weapon Max Level"].GetInt(),unlock["Armor Max Level"].GetInt())){
SteamUserStats()->SetAchievement(unlock["API Name"].GetString().c_str());
SteamUserStats()->StoreStats();
}
#pragma endregion
}
#pragma endregion
if(Menu::IsCurrentlyActive(data.menu.GetType())){
SoundEffect::PlaySFX(comp.lock()->GetItem().lock()->UseSound(),SoundEffect::CENTERED);
}