xbox compat support
This commit is contained in:
@@ -9,6 +9,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Havok;
|
||||
using NLog;
|
||||
using Sandbox;
|
||||
using Sandbox.Engine.Networking;
|
||||
using Sandbox.Engine.Utils;
|
||||
using Sandbox.Game;
|
||||
@@ -56,17 +57,19 @@ namespace Torch.Server.Managers
|
||||
//Initializes saves path. Why this isn't in Init() we may never know.
|
||||
MyFileSystem.InitUserSpecific(null);
|
||||
|
||||
var configPath = Path.Combine(path, CONFIG_NAME);
|
||||
if (!File.Exists(configPath))
|
||||
{
|
||||
Log.Error($"Failed to load dedicated config at {path}");
|
||||
return;
|
||||
}
|
||||
// why?....
|
||||
// var configPath = Path.Combine(path, CONFIG_NAME);
|
||||
// if (!File.Exists(configPath))
|
||||
// {
|
||||
// Log.Error($"Failed to load dedicated config at {path}");
|
||||
// return;
|
||||
// }
|
||||
|
||||
var config = new MyConfigDedicated<MyObjectBuilder_SessionSettings>(configPath);
|
||||
config.Load(configPath);
|
||||
|
||||
DedicatedConfig = new ConfigDedicatedViewModel(config);
|
||||
// var config = new MyConfigDedicated<MyObjectBuilder_SessionSettings>(configPath);
|
||||
// config.Load(configPath);
|
||||
|
||||
DedicatedConfig = new ConfigDedicatedViewModel((MyConfigDedicated<MyObjectBuilder_SessionSettings>) MySandboxGame.ConfigDedicated);
|
||||
|
||||
var worldFolders = Directory.EnumerateDirectories(Path.Combine(Torch.Config.InstancePath, "Saves"));
|
||||
|
||||
|
@@ -46,7 +46,8 @@ namespace Torch.Session
|
||||
public TorchSessionManager(ITorchBase torchInstance) : base(torchInstance)
|
||||
{
|
||||
_overrideMods = new Dictionary<ulong, MyObjectBuilder_Checkpoint.ModItem>();
|
||||
_overrideMods.Add(TorchModCore.MOD_ID, ModItemUtils.Create(TorchModCore.MOD_ID));
|
||||
if (Torch.Config.UgcServiceType == UGCServiceType.Steam)
|
||||
_overrideMods.Add(TorchModCore.MOD_ID, ModItemUtils.Create(TorchModCore.MOD_ID));
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
@@ -160,6 +160,11 @@ namespace Torch
|
||||
MyFileSystem.Reset();
|
||||
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, _userDataPath);
|
||||
|
||||
_log.Info("Loading Dedicated Config");
|
||||
// object created in SpaceEngineersGame.SetupPerGameSettings()
|
||||
MySandboxGame.ConfigDedicated.Load();
|
||||
MyPlatformGameSettings.CONSOLE_COMPATIBLE = MySandboxGame.ConfigDedicated.ConsoleCompatibility;
|
||||
|
||||
//Type.GetType("VRage.Steam.MySteamService, VRage.Steam").GetProperty("IsActive").GetSetMethod(true).Invoke(service, new object[] {SteamAPI.Init()});
|
||||
_log.Info("Initializing network services");
|
||||
|
||||
@@ -192,7 +197,7 @@ namespace Torch
|
||||
MySandboxGame.ConfigDedicated.VerboseNetworkLogging,
|
||||
Enumerable.Empty<string>(),
|
||||
aggregator,
|
||||
Array.Empty<byte>());
|
||||
MyMultiplayer.Channels);
|
||||
|
||||
var mockingInventory = new MyMockingInventory(service);
|
||||
MyServiceManager.Instance.AddService<IMyInventoryService>(mockingInventory);
|
||||
|
Reference in New Issue
Block a user