Add in Steam Rich Presence. Fix Display names of stage plates to be consistent with original naming conventions. Release Build 8226.
This commit is contained in:
@@ -74,11 +74,11 @@ All rights reserved.
|
||||
#include "InventoryScrollableWindowComponent.h"
|
||||
#ifndef __EMSCRIPTEN__
|
||||
#include "discord.h"
|
||||
#include <steam_api.h>
|
||||
#endif
|
||||
#include "GameSettings.h"
|
||||
#include "LoadingScreen.h"
|
||||
#include "Tutorial.h"
|
||||
#include <steam_api.h>
|
||||
|
||||
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!"<<std::endl;
|
||||
if(SteamUtils()!=nullptr){
|
||||
SteamUtils()->SetWarningMessageHook([](int severity,const char*message){
|
||||
std::cout<<std::format("STEAM[{}]: {}",severity,std::string(message))<<std::endl;
|
||||
});
|
||||
}
|
||||
if(SteamInput()!=nullptr){
|
||||
SteamInput()->Init(false);
|
||||
}
|
||||
}else{
|
||||
std::cout<<"Steam API failed to initialize!"<<std::endl;
|
||||
}
|
||||
if(SteamUtils()!=nullptr)
|
||||
SteamUtils()->SetWarningMessageHook([](int severity,const char*message){
|
||||
std::cout<<std::format("STEAM[{}]: {}",severity,std::string(message))<<std::endl;
|
||||
});
|
||||
if(SteamInput()!=nullptr)
|
||||
SteamInput()->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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -583,7 +583,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="WORLD_MAP"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="6" name="Stage III" type="StagePlate" x="196" y="636" width="44" height="16">
|
||||
<object id="6" name="Stage I-III" type="StagePlate" x="196" y="636" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 1 - North" type="object" value="9"/>
|
||||
<property name="Connection 4 - West" type="object" value="9"/>
|
||||
@@ -609,7 +609,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="STORY_1_1"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="9" name="Stage IV" type="StagePlate" x="172" y="580" width="44" height="16">
|
||||
<object id="9" name="Stage I-IV" type="StagePlate" x="172" y="580" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 1 - North" type="object" value="12"/>
|
||||
<property name="Connection 4 - West" type="object" value="12"/>
|
||||
@@ -626,7 +626,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="CAMPAIGN_1_8"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="12" name="Stage V" type="StagePlate" x="112" y="532" width="44" height="16">
|
||||
<object id="12" name="Stage I-V" type="StagePlate" x="112" y="532" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 1 - North" type="object" value="17"/>
|
||||
<property name="Connection 2 - East" type="object" value="17"/>
|
||||
@@ -636,7 +636,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="CAMPAIGN_1_4"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="13" name="Stage VI" type="StagePlate" x="60" y="484" width="44" height="16">
|
||||
<object id="13" name="Stage I-VI" type="StagePlate" x="60" y="484" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 3 - South" type="object" value="14"/>
|
||||
<property name="Connection 4 - West" type="object" value="14"/>
|
||||
@@ -645,7 +645,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="CAMPAIGN_1_5"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="14" name="Stage VII" type="StagePlate" x="36" y="556" width="44" height="16">
|
||||
<object id="14" name="Stage I-VII" type="StagePlate" x="36" y="556" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 2 - East" type="object" value="15"/>
|
||||
<property name="Connection 3 - South" type="object" value="15"/>
|
||||
@@ -654,7 +654,7 @@
|
||||
<property name="Unlock Condition" propertytype="Level" value="CAMPAIGN_1_6"/>
|
||||
</properties>
|
||||
</object>
|
||||
<object id="15" name="Stage VIII" type="StagePlate" x="72" y="612" width="44" height="16">
|
||||
<object id="15" name="Stage I-VIII" type="StagePlate" x="72" y="612" width="44" height="16">
|
||||
<properties>
|
||||
<property name="Connection 2 - East" type="object" value="11"/>
|
||||
<property name="Connection 3 - South" type="object" value="11"/>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
"lang"
|
||||
{
|
||||
"english"
|
||||
{
|
||||
"tokens"
|
||||
{
|
||||
"#Status" "%status%"
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user