mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
支持上传mod时保留名字和介绍
Co-Authored-By: 蓝白bw <88317123+bwnotfound@users.noreply.github.com>
This commit is contained in:
parent
e50ee77aac
commit
477213a110
@ -521,11 +521,25 @@ namespace VPet_Simulator.Windows
|
|||||||
}
|
}
|
||||||
else if (mods.AuthorID == Steamworks.SteamClient.SteamId.AccountId)
|
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)
|
.WithTitle(mods.Name)
|
||||||
.WithDescription(mods.Intro)
|
.WithDescription(mods.Intro)
|
||||||
.WithPreviewFile(mods.Path.FullName + @"\icon.png")
|
.WithPreviewFile(mods.Path.FullName + @"\icon.png")
|
||||||
.WithContent(mods.Path);
|
.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)
|
foreach (string tag in mods.Tag)
|
||||||
result.WithTag(tag);
|
result.WithTag(tag);
|
||||||
var r = await result.SubmitAsync(new ProgressClass(ProgressBarUpload));
|
var r = await result.SubmitAsync(new ProgressClass(ProgressBarUpload));
|
||||||
|
Loading…
Reference in New Issue
Block a user