mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Server File Changes
- added Testlive server option - changed code to use different appids.
This commit is contained in:
parent
96ba2c3474
commit
a20354c1b1
32 changed files with 969 additions and 812 deletions
|
|
@ -104,7 +104,7 @@ namespace ServerManagerTool
|
|||
{
|
||||
try
|
||||
{
|
||||
WorkshopFiles = await LoadWorkshopItemsAsync(_profile.SOTF_Enabled);
|
||||
WorkshopFiles = await LoadWorkshopItemsAsync();
|
||||
await LoadModsFromProfile();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -156,7 +156,7 @@ namespace ServerManagerTool
|
|||
|
||||
try
|
||||
{
|
||||
WorkshopFiles = await LoadWorkshopItemsAsync(_profile.SOTF_Enabled);
|
||||
WorkshopFiles = await LoadWorkshopItemsAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -506,12 +506,15 @@ namespace ServerManagerTool
|
|||
ModDetailsChanged = true;
|
||||
}
|
||||
|
||||
private async Task<WorkshopFileList> LoadWorkshopItemsAsync(bool isSotF)
|
||||
private async Task<WorkshopFileList> LoadWorkshopItemsAsync()
|
||||
{
|
||||
WorkshopFileDetailResponse localCache = null;
|
||||
|
||||
var appId = _profile.SOTF_Enabled ? Config.Default.AppId_SotF : Config.Default.AppId;
|
||||
var workshopCacheFile = string.Format(Config.Default.WorkshopCacheFile, appId);
|
||||
|
||||
await Task.Run(() => {
|
||||
var file = Path.Combine(Config.Default.DataDir, isSotF ? Config.Default.WorkshopCacheFile_SotF : Config.Default.WorkshopCacheFile);
|
||||
var file = Path.Combine(Config.Default.DataDir, workshopCacheFile);
|
||||
|
||||
// try to load the cache file.
|
||||
localCache = WorkshopFileDetailResponse.Load(file);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue