projects cleanup

This commit is contained in:
zznty
2022-10-09 17:52:30 +07:00
parent 49f68a8fcc
commit c5c8e527da
22 changed files with 94 additions and 375 deletions

View File

@@ -236,9 +236,9 @@ namespace Torch.Server.Managers
{
var world = DedicatedConfig.SelectedWorld;
world.Checkpoint.SessionName = string.IsNullOrEmpty(DedicatedConfig.WorldName)
world.Checkpoint.SessionName = string.IsNullOrEmpty(world.Checkpoint.SessionName)
? Path.GetDirectoryName(DedicatedConfig.LoadWorld)
: DedicatedConfig.WorldName;
: world.Checkpoint.SessionName;
world.WorldConfiguration.Settings = DedicatedConfig.SessionSettings;
world.WorldConfiguration.Mods.Clear();
@@ -284,7 +284,6 @@ namespace Torch.Server.Managers
{
private static readonly Logger Log = LogManager.GetCurrentClassLogger();
public string FolderName { get; set; }
public string WorldPath { get; }
public MyObjectBuilder_SessionSettings KeenSessionSettings => WorldConfiguration.Settings;
public MyObjectBuilder_Checkpoint KeenCheckpoint => Checkpoint;
@@ -313,7 +312,6 @@ namespace Torch.Server.Managers
WorldSizeKB = new DirectoryInfo(worldPath).GetFiles().Sum(x => x.Length) / 1024;
_checkpointPath = Path.Combine(WorldPath, "Sandbox.sbc");
_worldConfigPath = Path.Combine(WorldPath, "Sandbox_config.sbc");
FolderName = Path.GetFileName(worldPath);
if (loadFiles)
LoadSandbox();
}

View File

@@ -12,7 +12,6 @@ using Sandbox.Engine.Multiplayer;
using Sandbox.Engine.Networking;
using Sandbox.Game.Gui;
using Sandbox.Game.World;
using Steamworks;
using Torch.API;
using Torch.API.Managers;
using Torch.Managers;