VOID_Core: Power consumption will no longer persist when the core is 'powered off'. Thanks to Shad0wCatcher for the bughunting.
[VOID.git] / VOID_Core.cs
blob:a/VOID_Core.cs -> blob:b/VOID_Core.cs
--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -840,12 +840,14 @@
 		{
 			bool newPowerState = this.powerAvailable;
 
-			if (this.consumeResource &&
+			if (this.togglePower && this.consumeResource &&
 			    this.vessel.vesselType != VesselType.EVA &&
 			    TimeWarp.deltaTime != 0)
 			{
-				float powerReceived = this.vessel.rootPart.RequestResource(this.resourceName,
-					                      this.resourceRate * TimeWarp.fixedDeltaTime);
+				float powerReceived = this.vessel.rootPart.RequestResource(
+					this.resourceName,
+					this.resourceRate * TimeWarp.fixedDeltaTime
+				);
 
 				if (powerReceived > 0)
 				{