ARConfiguration: Added toggle for ModuleLimitedDataTransmitter.fixedPowerCost.
[AntennaRange.git] / ARConfiguration.cs
blob:a/ARConfiguration.cs -> blob:b/ARConfiguration.cs
--- a/ARConfiguration.cs
+++ b/ARConfiguration.cs
@@ -69,6 +69,7 @@
 				AntennaRelay.requireLineOfSight = this.LoadConfigValue("requireLineOfSight", false);
 				ARFlightController.requireConnectionForControl =
 					this.LoadConfigValue("requireConnectionForControl", false);
+				ModuleLimitedDataTransmitter.fixedPowerCost = this.LoadConfigValue("fixedPowerCost", false);
 
 				Debug.Log(string.Format("{0} v{1} - ARonfiguration loaded!", this.GetType().Name, this.runningVersion));
 			}
@@ -123,6 +124,17 @@
 
 			GUILayout.EndHorizontal();
 
+			GUILayout.BeginHorizontal();
+
+			bool fixedPowerCost = GUILayout.Toggle(ModuleLimitedDataTransmitter.fixedPowerCost, "Use fixed power cost");
+			if (fixedPowerCost != ModuleLimitedDataTransmitter.fixedPowerCost)
+			{
+				ModuleLimitedDataTransmitter.fixedPowerCost = fixedPowerCost;
+				this.SaveConfigValue("fixedPowerCost", fixedPowerCost);
+			}
+
+			GUILayout.EndHorizontal();
+
 			GUILayout.EndVertical();
 
 			GUI.DragWindow();