Server File Changes

- added Testlive server option
- changed code to use different appids.
This commit is contained in:
Brett Hewitson 2022-08-07 19:48:44 +10:00
parent 96ba2c3474
commit a20354c1b1
32 changed files with 969 additions and 812 deletions

View file

@ -479,8 +479,11 @@ namespace ServerManagerTool
{
WorkshopFileDetailResponse localCache = null;
var appId = _profile.UseTestlive ? Config.Default.AppId_Testlive : Config.Default.AppId;
var workshopCacheFile = string.Format(Config.Default.WorkshopCacheFile, appId);
await Task.Run(() => {
var file = Path.Combine(Config.Default.DataPath, Config.Default.WorkshopCacheFile);
var file = Path.Combine(Config.Default.DataPath, workshopCacheFile);
// try to load the cache file.
localCache = WorkshopFileDetailResponse.Load(file);

View file

@ -160,8 +160,11 @@ namespace ServerManagerTool
WorkshopFileDetailResponse localCache = null;
WorkshopFileDetailResponse steamCache = null;
var appId = _profile.UseTestlive ? Config.Default.AppId_Testlive : Config.Default.AppId;
var workshopCacheFile = string.Format(Config.Default.WorkshopCacheFile, appId);
await Task.Run( () => {
var file = Path.Combine(Config.Default.DataPath, Config.Default.WorkshopCacheFile);
var file = Path.Combine(Config.Default.DataPath, workshopCacheFile);
// try to load the cache file.
localCache = WorkshopFileDetailResponse.Load(file);
@ -174,7 +177,7 @@ namespace ServerManagerTool
// check if the cache exists
if (steamCache == null)
{
steamCache = SteamUtils.GetSteamModDetails(Config.Default.AppId);
steamCache = SteamUtils.GetSteamModDetails(appId);
if (steamCache != null)
steamCache.Save(file);
else