mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
支持离线创意工坊
This commit is contained in:
parent
1da42926cf
commit
16f907b358
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user