提交 16f907b3 编写于 作者: Z ZouJin

支持离线创意工坊

上级 1da42926
......@@ -233,6 +233,7 @@ namespace VPet_Simulator.Windows
Path.AddRange(new DirectoryInfo(ModPath).EnumerateDirectories());
if (IsSteamUser)//如果是steam用户,尝试加载workshop
{
var workshop = Set["workshop"];
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading Steam Workshop"));
int i = 1;
while (true)
......@@ -243,7 +244,10 @@ namespace VPet_Simulator.Windows
foreach (Steamworks.Ugc.Item entry in page.Value.Entries)
{
if (entry.Directory != null)
{
Path.Add(new DirectoryInfo(entry.Directory));
workshop.Add(new Sub(entry.Directory, ""));
}
}
}
else
......@@ -252,6 +256,14 @@ namespace VPet_Simulator.Windows
}
}
}
else
{
var workshop = Set["workshop"];
foreach (Sub ws in workshop)
{
Path.Add(new DirectoryInfo(ws.Name));
}
}
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading MOD"));
//加载mod
foreach (DirectoryInfo di in Path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册