Skip to content

Commit df60981

Browse files
committed
Merge pull request #2 from Pharylon/antenna-control
Added ability to control antenna without connection to mission control
2 parents 2dc7e29 + 2db0887 commit df60981

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/RemoteTech/Modules/ModuleSPU.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,16 @@ public void HookPartMenus()
185185
vs.SignalProcessor.FlightComputer.Enqueue(EventCommand.Event(e));
186186
}
187187
}
188+
else if (e.listParent.part.Modules.OfType<IAntenna>().Any() &&
189+
!e.listParent.part.Modules.OfType<ModuleRTAntennaPassive>().Any() &&
190+
RTSettings.Instance.ControlAntennaWithoutConnection)
191+
{
192+
e.Invoke();
193+
}
188194
else
189195
{
190-
ScreenMessages.PostScreenMessage(new ScreenMessage("No connection to send command on.", 4.0f, ScreenMessageStyle.UPPER_LEFT));
196+
ScreenMessages.PostScreenMessage(new ScreenMessage("No connection to send command on.", 4.0f,
197+
ScreenMessageStyle.UPPER_LEFT));
191198
}
192199
});
193200
}

src/RemoteTech/RTSettings.cs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class Settings
3535
[Persistent] public Color DishConnectionColor = XKCDColors.Amber;
3636
[Persistent] public Color OmniConnectionColor = XKCDColors.BrownGrey;
3737
[Persistent] public Color ActiveConnectionColor = XKCDColors.ElectricLime;
38+
[Persistent] public bool ControlAntennaWithoutConnection = true;
3839

3940
[Persistent(collectionIndex="STATION")]
4041
public MissionControlSatellite[] GroundStations = new MissionControlSatellite[] { new MissionControlSatellite() };

0 commit comments

Comments
 (0)