Skip to content

Commit

Permalink
Add display for pump toggle, sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKell committed Jul 2, 2014
1 parent 58255e3 commit 495a193
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/RefuelingPump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ namespace RealFuels
{
public class RefuelingPump : ModularFuelPartModule
{
[KSPField(isPersistant = true)]
[KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Pump Enabled")]
bool enablePump = true;

[KSPField(isPersistant = true)]
double pump_rate = 100.0;
double pump_rate = 100.0; // 100L/sec per resource

[KSPEvent(guiActive = true, guiActiveEditor = true, guiName = "Toggle Pump")]
public void TogglePump()
Expand All @@ -39,6 +39,10 @@ public override void OnUpdate ()

private void FillAttachedTanks(double deltaTime)
{
// sanity check
if(deltaTime <= 0)
return;

// now, let's look at what we're connected to.
foreach (Part p in vessel.Parts) // look through all parts
{
Expand Down

0 comments on commit 495a193

Please sign in to comment.