From b3c34106a05ecbf3e7cfdb0f27c340fb89df25c6 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Mon, 25 Sep 2023 16:52:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E4=B8=B0=E5=AF=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet-Simulator.Windows/MainWindow.cs | 26 ++++++++++++++++++- VPet-Simulator.Windows/MainWindow.xaml.cs | 9 +++++++ VPet-Simulator.Windows/RichPresence.vdf | 24 ++++++++--------- .../mod/0000_core/lang/en/Base2309.lps | 5 +++- .../mod/0000_core/lang/zh-Hans/Base2309.lps | 5 +++- .../mod/0000_core/lang/zh-Hant/Base2309.lps | 3 +++ 6 files changed, 57 insertions(+), 15 deletions(-) diff --git a/VPet-Simulator.Windows/MainWindow.cs b/VPet-Simulator.Windows/MainWindow.cs index a67bc43..b1c623c 100644 --- a/VPet-Simulator.Windows/MainWindow.cs +++ b/VPet-Simulator.Windows/MainWindow.cs @@ -209,7 +209,7 @@ namespace VPet_Simulator.Windows if (File.Exists(ExtensionValue.BaseDirectory + @"\Save.lps")) File.Move(ExtensionValue.BaseDirectory + @"\Save.lps", ExtensionValue.BaseDirectory + @"\Save.bkp"); - + 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) { + if (HashCheck) + { + SteamFriends.SetRichPresence("lv", $" (lv{GameSavesData.GameSave.Level})"); + } + else + { + SteamFriends.SetRichPresence("lv", ""); + } if (Core.Save.Mode == GameSave.ModeType.Ill) { SteamFriends.SetRichPresence("steam_display", "#Status_Ill"); @@ -653,7 +661,23 @@ namespace VPet_Simulator.Windows if (obj.DisplayType.Name == "music") SteamFriends.SetRichPresence("steam_display", "#Status_Music"); 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"); + } break; } } diff --git a/VPet-Simulator.Windows/MainWindow.xaml.cs b/VPet-Simulator.Windows/MainWindow.xaml.cs index 61dcbc3..d3c2d3c 100644 --- a/VPet-Simulator.Windows/MainWindow.xaml.cs +++ b/VPet-Simulator.Windows/MainWindow.xaml.cs @@ -477,6 +477,15 @@ namespace VPet_Simulator.Windows SteamFriends.SetRichPresence("username", Core.Save.Name); SteamFriends.SetRichPresence("mode", (Core.Save.Mode.ToString() + "ly").Translate()); SteamFriends.SetRichPresence("steam_display", "#Status_IDLE"); + SteamFriends.SetRichPresence("idel", "闲逛".Translate()); + if (HashCheck) + { + SteamFriends.SetRichPresence("lv", $" (lv{GameSavesData.GameSave.Level})"); + } + else + { + SteamFriends.SetRichPresence("lv", ""); + } } else { diff --git a/VPet-Simulator.Windows/RichPresence.vdf b/VPet-Simulator.Windows/RichPresence.vdf index babe22d..d433d9f 100644 --- a/VPet-Simulator.Windows/RichPresence.vdf +++ b/VPet-Simulator.Windows/RichPresence.vdf @@ -4,10 +4,10 @@ { "tokens" { - "#Status_IDLE" "%username%在%mode%闲逛" - "#Status_Music" "%username%在%mode%跳舞" - "#Status_Sleep" "%username%在%mode%睡大觉" - "#Status_Work" "%username%在%mode%%work%" + "#Status_IDLE" "%username%在%mode%%idel%%lv%" + "#Status_Music" "%username%在%mode%跳舞%lv%" + "#Status_Sleep" "%username%在%mode%睡大觉%lv%" + "#Status_Work" "%username%在%mode%%work%%lv%" "#Status_DIY" "%DIY%" "#Status_Ill" "%username% 生病了" } @@ -16,10 +16,10 @@ { "tokens" { - "#Status_IDLE" "%username%在%mode%閒逛" - "#Status_Music" "%username%在%mode%跳舞" - "#Status_Sleep" "%username%在%mode%睡大覺" - "#Status_Work" "%username%在%mode%%work%" + "#Status_IDLE" "%username%在%mode%%idel%%lv%" + "#Status_Music" "%username%在%mode%跳舞%lv%" + "#Status_Sleep" "%username%在%mode%睡大覺%lv%" + "#Status_Work" "%username%在%mode%%work%%lv%" "#Status_DIY" "%DIY%" "#Status_Ill" "%username% 生病了" } @@ -28,10 +28,10 @@ { "tokens" { - "#Status_IDLE" "%username% is %mode% idle" - "#Status_Music" "%username% dancing %mode%" - "#Status_Sleep" "%username% Sleep %mode%" - "#Status_Work" "%username% %work% %mode%" + "#Status_IDLE" "%username% is %mode% %idel%%lv%" + "#Status_Music" "%username% dancing %mode%%lv%" + "#Status_Sleep" "%username% Sleep %mode%%lv%" + "#Status_Work" "%username% %work% %mode%%lv%" "#Status_DIY" "%DIY%" "#Status_Ill" "%username% is sick" } diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2309.lps b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2309.lps index cb1a887..7310a07 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2309.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/en/Base2309.lps @@ -35,4 +35,7 @@ EXP#EXP:| 在任务切换器中隐藏窗口#Hide window from task switcher:| 在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.:| -音频错误#audio error:| \ No newline at end of file +音频错误#audio error:| +闲逛#Idle:| +乱爬#Climb:| +发呆#Stare:| \ No newline at end of file diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2309.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2309.lps index 9501805..f7de0ec 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2309.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hans/Base2309.lps @@ -35,4 +35,7 @@ EXP#EXP:| 在任务切换器中隐藏窗口#在任务切换器中隐藏窗口:| 在Alt+Tab中隐藏#在Alt+Tab中隐藏:| 音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer:| -音频错误#音频错误:| \ No newline at end of file +音频错误#音频错误:| +闲逛#闲逛:| +乱爬#乱爬:| +发呆#发呆:| \ No newline at end of file diff --git a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2309.lps b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2309.lps index 0bc167b..5562539 100644 --- a/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2309.lps +++ b/VPet-Simulator.Windows/mod/0000_core/lang/zh-Hant/Base2309.lps @@ -36,3 +36,6 @@ EXP#EXP:| 在Alt+Tab中隐藏#在Alt+Tab選單中隱藏視窗:| 音频播放失败,已尝试自动切换到备用播放器. 如果问题持续,请检查是否已安装WindowsMediaPlayer#無法播放音訊,已嘗試自動切換到備用播放器。如果問題仍然出現,請檢查是否已安裝WindowsMediaPlayer:| 音频错误#音訊錯誤:| +闲逛#閒逛:| +乱爬#亂爬:| +发呆#發呆:| \ No newline at end of file