Compare commits
No commits in common. "10f930d20de0a8f99e66722027d03ef05cc89758" and "a65e253f645109c7ba7a8b9d97d4828885642ca8" have entirely different histories.
10f930d20d
...
a65e253f64
1 changed files with 14 additions and 19 deletions
33
Program.cs
33
Program.cs
|
@ -84,50 +84,46 @@ namespace IngameScript
|
|||
"Maneuvering_Thruster_Prefix",
|
||||
"[MANEUVERING]"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Polling",
|
||||
"If Polling is enabled, the script will check for docked/undocked connectors every 10 ticks. Otherwise, the script will only run manually."
|
||||
);
|
||||
_configIni.SetComment("AutomaticConnectorActions", "Polling", "Enable polling");
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Connector_Prefix",
|
||||
"If the connector's name contains this string, the script will manage it."
|
||||
"Connector prefix"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Manage_Gyroscopes",
|
||||
"If this is enabled, the script will disable and enable gyroscopes when docking and undocking, respectively."
|
||||
"Manage gyroscopes"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Recharge_Batteries",
|
||||
"If this is enabled, the script will set all batteries to recharge mode when docking and set them to auto mode when undocking."
|
||||
"Recharge batteries"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Stockpile_Gas_Tanks",
|
||||
"If this is enabled, the script will set all gas tanks to stockpile when docking and set them to not stockpile when undocking."
|
||||
"Stockpile gas tanks"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Manage_Thrusters",
|
||||
"If this is enabled, the script will disable all thrusters when docking."
|
||||
"Manage thrusters"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Enable_All_Thrusters_On_Undock",
|
||||
"If this is enabled, the script will enable all thrusters when undocking."
|
||||
"Enable all thrusters on undock"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Manage_Maneuvering_Thrusters",
|
||||
"If this is enabled, the script will disable and enable maneuvering thrusters when docking and undocking, respectively."
|
||||
"Manage maneuvering thrusters"
|
||||
);
|
||||
_configIni.SetComment(
|
||||
"AutomaticConnectorActions",
|
||||
"Maneuvering_Thruster_Prefix",
|
||||
"If the maneuvering thruster's name contains this string, the script will manage it."
|
||||
"Prefix for maneuvering thrusters"
|
||||
);
|
||||
Me.CustomData = _configIni.ToString();
|
||||
}
|
||||
|
@ -172,10 +168,11 @@ namespace IngameScript
|
|||
}
|
||||
}
|
||||
|
||||
public void Save()
|
||||
public void Save(bool isDocked)
|
||||
{
|
||||
_isDocked = isDocked;
|
||||
_storageIni.Clear();
|
||||
_storageIni.Set("AutomaticConnectorActions", "Is_Docked", _isDocked);
|
||||
_storageIni.Set("AutomaticConnectorActions", "Is_Docked", isDocked);
|
||||
Storage = _storageIni.ToString();
|
||||
}
|
||||
|
||||
|
@ -259,8 +256,7 @@ namespace IngameScript
|
|||
Echo("Set grid batteries to recharge.");
|
||||
}
|
||||
|
||||
_isDocked = true;
|
||||
Save();
|
||||
Save(true);
|
||||
}
|
||||
|
||||
private void Undock()
|
||||
|
@ -367,8 +363,7 @@ namespace IngameScript
|
|||
Echo("Turned on grid thrusters.");
|
||||
}
|
||||
|
||||
_isDocked = false;
|
||||
Save();
|
||||
Save(false);
|
||||
}
|
||||
|
||||
public void Main(string argument, UpdateType updateSource)
|
||||
|
|
Loading…
Reference in a new issue