更多丰富状态

This commit is contained in:
ZouJin 2023-09-25 16:52:20 +08:00
parent 2dd4393b9e
commit b3c34106a0
6 changed files with 57 additions and 15 deletions

View File

@ -209,7 +209,7 @@ namespace VPet_Simulator.Windows
if (File.Exists(ExtensionValue.BaseDirectory + @"\Save.lps")) if (File.Exists(ExtensionValue.BaseDirectory + @"\Save.lps"))
File.Move(ExtensionValue.BaseDirectory + @"\Save.lps", ExtensionValue.BaseDirectory + @"\Save.bkp"); File.Move(ExtensionValue.BaseDirectory + @"\Save.lps", ExtensionValue.BaseDirectory + @"\Save.bkp");
File.WriteAllText(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps", GameSavesData.ToLPS().ToString()); File.WriteAllText(ExtensionValue.BaseDirectory + $"\\Saves\\Save_{st}.lps", GameSavesData.ToLPS().ToString());
} }
} }
@ -633,6 +633,14 @@ namespace VPet_Simulator.Windows
} }
private void Handle_Steam(Main obj) private void Handle_Steam(Main obj)
{ {
if (HashCheck)
{
SteamFriends.SetRichPresence("lv", $" (lv{GameSavesData.GameSave.Level})");
}
else
{
SteamFriends.SetRichPresence("lv", "");
}
if (Core.Save.Mode == GameSave.ModeType.Ill) if (Core.Save.Mode == GameSave.ModeType.Ill)
{ {
SteamFriends.SetRichPresence("steam_display", "#Status_Ill"); SteamFriends.SetRichPresence("steam_display", "#Status_Ill");
@ -653,7 +661,23 @@ namespace VPet_Simulator.Windows
if (obj.DisplayType.Name == "music") if (obj.DisplayType.Name == "music")
SteamFriends.SetRichPresence("steam_display", "#Status_Music"); SteamFriends.SetRichPresence("steam_display", "#Status_Music");
else else
{
switch (obj.DisplayType.Type)
{
case GraphType.Move:
SteamFriends.SetRichPresence("idel", "乱爬".Translate());
break;
case GraphType.Idel:
case GraphType.StateONE:
case GraphType.StateTWO:
SteamFriends.SetRichPresence("idel", "发呆".Translate());
break;
default:
SteamFriends.SetRichPresence("idel", "闲逛".Translate());
break;
}
SteamFriends.SetRichPresence("steam_display", "#Status_IDLE"); SteamFriends.SetRichPresence("steam_display", "#Status_IDLE");
}
break; break;
} }
} }

View File

@ -477,6 +477,15 @@ namespace VPet_Simulator.Windows
SteamFriends.SetRichPresence("username", Core.Save.Name); SteamFriends.SetRichPresence("username", Core.Save.Name);
SteamFriends.SetRichPresence("mode", (Core.Save.Mode.ToString() + "ly").Translate()); SteamFriends.SetRichPresence("mode", (Core.Save.Mode.ToString() + "ly").Translate());
SteamFriends.SetRichPresence("steam_display", "#Status_IDLE"); SteamFriends.SetRichPresence("steam_display", "#Status_IDLE");
SteamFriends.SetRichPresence("idel", "闲逛".Translate());
if (HashCheck)
{
SteamFriends.SetRichPresence("lv", $" (lv{GameSavesData.GameSave.Level})");
}
else
{
SteamFriends.SetRichPresence("lv", "");
}
} }
else else
{ {

View File

@ -4,10 +4,10 @@
{ {
"tokens" "tokens"
{ {
"#Status_IDLE" "%username%在%mode%闲逛" "#Status_IDLE" "%username%在%mode%%idel%%lv%"
"#Status_Music" "%username%在%mode%跳舞" "#Status_Music" "%username%在%mode%跳舞%lv%"
"#Status_Sleep" "%username%在%mode%睡大觉" "#Status_Sleep" "%username%在%mode%睡大觉%lv%"
"#Status_Work" "%username%在%mode%%work%" "#Status_Work" "%username%在%mode%%work%%lv%"
"#Status_DIY" "%DIY%" "#Status_DIY" "%DIY%"
"#Status_Ill" "%username% 生病了" "#Status_Ill" "%username% 生病了"
} }
@ -16,10 +16,10 @@
{ {
"tokens" "tokens"
{ {
"#Status_IDLE" "%username%在%mode%閒逛" "#Status_IDLE" "%username%在%mode%%idel%%lv%"
"#Status_Music" "%username%在%mode%跳舞" "#Status_Music" "%username%在%mode%跳舞%lv%"
"#Status_Sleep" "%username%在%mode%睡大覺" "#Status_Sleep" "%username%在%mode%睡大覺%lv%"
"#Status_Work" "%username%在%mode%%work%" "#Status_Work" "%username%在%mode%%work%%lv%"
"#Status_DIY" "%DIY%" "#Status_DIY" "%DIY%"
"#Status_Ill" "%username% 生病了" "#Status_Ill" "%username% 生病了"
} }
@ -28,10 +28,10 @@
{ {
"tokens" "tokens"
{ {
"#Status_IDLE" "%username% is %mode% idle" "#Status_IDLE" "%username% is %mode% %idel%%lv%"
"#Status_Music" "%username% dancing %mode%" "#Status_Music" "%username% dancing %mode%%lv%"
"#Status_Sleep" "%username% Sleep %mode%" "#Status_Sleep" "%username% Sleep %mode%%lv%"
"#Status_Work" "%username% %work% %mode%" "#Status_Work" "%username% %work% %mode%%lv%"
"#Status_DIY" "%DIY%" "#Status_DIY" "%DIY%"
"#Status_Ill" "%username% is sick" "#Status_Ill" "%username% is sick"
} }

View File

@ -35,4 +35,7 @@ EXP#EXP:|
在任务切换器中隐藏窗口#Hide window from task switcher:| 在任务切换器中隐藏窗口#Hide window from task switcher:|
在Alt+Tab中隐藏#Hide from Alt+Tab:| 在Alt+Tab中隐藏#Hide from Alt+Tab:|
音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#Audio playback failed, attempted automatic switch to backup player. If the issue persists, please check if Windows Media Player is installed.:| 音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#Audio playback failed, attempted automatic switch to backup player. If the issue persists, please check if Windows Media Player is installed.:|
音频错误#audio error:| 音频错误#audio error:|
闲逛#Idle:|
乱爬#Climb:|
发呆#Stare:|

View File

@ -35,4 +35,7 @@ EXP#EXP:|
在任务切换器中隐藏窗口#在任务切换器中隐藏窗口:| 在任务切换器中隐藏窗口#在任务切换器中隐藏窗口:|
在Alt+Tab中隐藏#在Alt+Tab中隐藏:| 在Alt+Tab中隐藏#在Alt+Tab中隐藏:|
音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer:| 音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer:|
音频错误#音频错误:| 音频错误#音频错误:|
闲逛#闲逛:|
乱爬#乱爬:|
发呆#发呆:|

View File

@ -36,3 +36,6 @@ EXP#EXP:|
在Alt+Tab中隐藏#在Alt+Tab選單中隱藏視窗:| 在Alt+Tab中隐藏#在Alt+Tab選單中隱藏視窗:|
音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#無法播放音訊已嘗試自動切換到備用播放器。如果問題仍然出現請檢查是否已安裝WindowsMediaPlayer:| 音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#無法播放音訊已嘗試自動切換到備用播放器。如果問題仍然出現請檢查是否已安裝WindowsMediaPlayer:|
音频错误#音訊錯誤:| 音频错误#音訊錯誤:|
闲逛#閒逛:|
乱爬#亂爬:|
发呆#發呆:|