diff --git a/Program.cs b/Program.cs index 08c77b6..ba023e4 100644 --- a/Program.cs +++ b/Program.cs @@ -172,11 +172,10 @@ namespace IngameScript } } - public void Save(bool isDocked) + public void Save() { - _isDocked = isDocked; _storageIni.Clear(); - _storageIni.Set("AutomaticConnectorActions", "Is_Docked", isDocked); + _storageIni.Set("AutomaticConnectorActions", "Is_Docked", _isDocked); Storage = _storageIni.ToString(); } @@ -260,7 +259,8 @@ namespace IngameScript Echo("Set grid batteries to recharge."); } - Save(true); + _isDocked = true; + Save(); } private void Undock() @@ -367,7 +367,8 @@ namespace IngameScript Echo("Turned on grid thrusters."); } - Save(false); + _isDocked = false; + Save(); } public void Main(string argument, UpdateType updateSource)