From 477213a110756c0b89de30e58d950d16c74f9b35 Mon Sep 17 00:00:00 2001 From: ZouJin Date: Sat, 19 Aug 2023 01:07:02 +1000 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=B8=8A=E4=BC=A0mod?= =?UTF-8?q?=E6=97=B6=E4=BF=9D=E7=95=99=E5=90=8D=E5=AD=97=E5=92=8C=E4=BB=8B?= =?UTF-8?q?=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: 蓝白bw <88317123+bwnotfound@users.noreply.github.com> --- .../WinDesign/winGameSetting.xaml.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs index 4b7951b..57c3f1d 100644 --- a/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs +++ b/VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs @@ -521,11 +521,25 @@ namespace VPet_Simulator.Windows } else if (mods.AuthorID == Steamworks.SteamClient.SteamId.AccountId) { - var result = new Editor(new Steamworks.Data.PublishedFileId() { Value = mods.ItemID }) + var item = Item.GetAsync(mod.ItemID).Result; + Editor result; + if (item == null) + { + result = new Editor(new Steamworks.Data.PublishedFileId() { Value = mods.ItemID }) .WithTitle(mods.Name) .WithDescription(mods.Intro) .WithPreviewFile(mods.Path.FullName + @"\icon.png") .WithContent(mods.Path); + } + else + { + result = new Editor(new Steamworks.Data.PublishedFileId() { Value = mods.ItemID }) + .WithTitle(item.Value.Title) + .WithDescription(item.Value.Description) + .WithPreviewFile(mods.Path.FullName + @"\icon.png") + .WithContent(mods.Path); + } + foreach (string tag in mods.Tag) result.WithTag(tag); var r = await result.SubmitAsync(new ProgressClass(ProgressBarUpload));