From 10f930d20de0a8f99e66722027d03ef05cc89758 Mon Sep 17 00:00:00 2001 From: cswimr Date: Thu, 7 Nov 2024 19:54:14 -0500 Subject: [PATCH] fixed a runtime error --- Program.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)