mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
支持离线创意工坊
This commit is contained in:
@ -233,6 +233,7 @@ namespace VPet_Simulator.Windows
|
|||||||
Path.AddRange(new DirectoryInfo(ModPath).EnumerateDirectories());
|
Path.AddRange(new DirectoryInfo(ModPath).EnumerateDirectories());
|
||||||
if (IsSteamUser)//如果是steam用户,尝试加载workshop
|
if (IsSteamUser)//如果是steam用户,尝试加载workshop
|
||||||
{
|
{
|
||||||
|
var workshop = Set["workshop"];
|
||||||
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading Steam Workshop"));
|
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading Steam Workshop"));
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (true)
|
while (true)
|
||||||
@ -243,7 +244,10 @@ namespace VPet_Simulator.Windows
|
|||||||
foreach (Steamworks.Ugc.Item entry in page.Value.Entries)
|
foreach (Steamworks.Ugc.Item entry in page.Value.Entries)
|
||||||
{
|
{
|
||||||
if (entry.Directory != null)
|
if (entry.Directory != null)
|
||||||
|
{
|
||||||
Path.Add(new DirectoryInfo(entry.Directory));
|
Path.Add(new DirectoryInfo(entry.Directory));
|
||||||
|
workshop.Add(new Sub(entry.Directory, ""));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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"));
|
await Dispatcher.InvokeAsync(new Action(() => LoadingText.Content = "Loading MOD"));
|
||||||
//加载mod
|
//加载mod
|
||||||
foreach (DirectoryInfo di in Path)
|
foreach (DirectoryInfo di in Path)
|
||||||
|
Reference in New Issue
Block a user