mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-29 09:32:38 +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)
|
if (DebugSettings.AutoStart)
|
||||||
{
|
{
|
||||||
UseKcpTransport = true;
|
UseKcpTransport = true;
|
||||||
|
var config = Helper.Config;
|
||||||
|
config.SetSettingsValue("useKcpTransport", UseKcpTransport);
|
||||||
|
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
||||||
DebugSettings.DebugMode = true;
|
DebugSettings.DebugMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,11 +259,11 @@ public class QSBCore : ModBehaviour
|
|||||||
public override void Configure(IModConfig config)
|
public override void Configure(IModConfig config)
|
||||||
{
|
{
|
||||||
var useKcpTransport = UseKcpTransport;
|
var useKcpTransport = UseKcpTransport;
|
||||||
UseKcpTransport = config.GetSettingsValue<bool>("useKcpTransport") || DebugSettings.AutoStart;
|
UseKcpTransport = config.GetSettingsValue<bool>("useKcpTransport");
|
||||||
if (!QSBNetworkManager.UpdateTransport())
|
if (!QSBNetworkManager.UpdateTransport())
|
||||||
{
|
{
|
||||||
UseKcpTransport = useKcpTransport;
|
UseKcpTransport = useKcpTransport;
|
||||||
config.SetSettingsValue("useKcpTransport", useKcpTransport);
|
config.SetSettingsValue("useKcpTransport", UseKcpTransport);
|
||||||
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
Helper.Storage.Save(config, Constants.ModConfigFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user