mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-16 16:15:24 +00:00
allow autostart override
This commit is contained in:
parent
84ee48ecb2
commit
7e0312f026
@ -157,6 +157,9 @@ public class QSBCore : ModBehaviour
|
||||
if (DebugSettings.AutoStart)
|
||||
{
|
||||
UseKcpTransport = true;
|
||||
var config = Helper.Config;
|
||||
config.SetSettingsValue("useKcpTransport", UseKcpTransport);
|
||||
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
||||
DebugSettings.DebugMode = true;
|
||||
}
|
||||
|
||||
@ -256,11 +259,11 @@ public class QSBCore : ModBehaviour
|
||||
public override void Configure(IModConfig config)
|
||||
{
|
||||
var useKcpTransport = UseKcpTransport;
|
||||
UseKcpTransport = config.GetSettingsValue<bool>("useKcpTransport") || DebugSettings.AutoStart;
|
||||
UseKcpTransport = config.GetSettingsValue<bool>("useKcpTransport");
|
||||
if (!QSBNetworkManager.UpdateTransport())
|
||||
{
|
||||
UseKcpTransport = useKcpTransport;
|
||||
config.SetSettingsValue("useKcpTransport", useKcpTransport);
|
||||
config.SetSettingsValue("useKcpTransport", UseKcpTransport);
|
||||
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user