diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index d3024ad9..afe114dd 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -74,11 +74,11 @@ All rights reserved. #include "InventoryScrollableWindowComponent.h" #ifndef __EMSCRIPTEN__ #include "discord.h" + #include #endif #include "GameSettings.h" #include "LoadingScreen.h" #include "Tutorial.h" -#include INCLUDE_EMITTER_LIST INCLUDE_ITEM_CATEGORIES @@ -325,15 +325,17 @@ bool AiL::OnUserCreate(){ if(SteamAPI_RestartAppIfNecessary(2895980U))return false; //Immediately quit if steam is detected and can be started through it. if(SteamAPI_Init()){ std::cout<<"Steam API Initialized successfully!"<SetWarningMessageHook([](int severity,const char*message){ + std::cout<Init(false); + } }else{ std::cout<<"Steam API failed to initialize!"<SetWarningMessageHook([](int severity,const char*message){ - std::cout<Init(false); #endif @@ -3489,6 +3491,7 @@ void AiL::EndGame(){ #endif void AiL::UpdateDiscordStatus(std::string levelName,std::string className){ + std::string originalClassName=className; #ifndef __EMSCRIPTEN__ if(Discord){ ::discord::Activity newActivity{}; @@ -3518,6 +3521,15 @@ void AiL::UpdateDiscordStatus(std::string levelName,std::string className){ UpdateDiscordStatus(levelName,className); } } + + if(SteamFriends()!=nullptr){ + if(levelName!="Main Menu"){ + SteamFriends()->SetRichPresence("status",std::format("Level {} {} - Exploring {}",player->Level(),originalClassName,levelName.c_str()).c_str()); + }else{ + SteamFriends()->SetRichPresence("status","Main Menu"); + } + SteamFriends()->SetRichPresence("steam_display","#Status"); + } #endif } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 9bde1622..3e6c7931 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 5 #define VERSION_PATCH 1 -#define VERSION_BUILD 8224 +#define VERSION_BUILD 8226 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/World_Map.tmx b/Adventures in Lestoria/assets/Campaigns/World_Map.tmx index 7401db94..45aab036 100644 --- a/Adventures in Lestoria/assets/Campaigns/World_Map.tmx +++ b/Adventures in Lestoria/assets/Campaigns/World_Map.tmx @@ -583,7 +583,7 @@ - + @@ -609,7 +609,7 @@ - + @@ -626,7 +626,7 @@ - + @@ -636,7 +636,7 @@ - + @@ -645,7 +645,7 @@ - + @@ -654,7 +654,7 @@ - + diff --git a/Adventures in Lestoria/assets/config/richpresence.txt b/Adventures in Lestoria/assets/config/richpresence.txt new file mode 100644 index 00000000..35b8a33c --- /dev/null +++ b/Adventures in Lestoria/assets/config/richpresence.txt @@ -0,0 +1,10 @@ +"lang" +{ + "english" + { + "tokens" + { + "#Status" "%status%" + } + } +} \ No newline at end of file diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 9c671771..e1311738 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ