Add option to keep antennae extended for more control during reentry.
This commit is contained in:
parent
b8f6e90e1f
commit
5a1e297977
|
@ -3,6 +3,8 @@
|
|||
// Primarily written for small science payload probes.
|
||||
|
||||
function PerformReentry {
|
||||
parameter retractAntennae is true.
|
||||
|
||||
SAS off.
|
||||
|
||||
// stage until only stage 0 remains.
|
||||
|
@ -12,9 +14,11 @@ function PerformReentry {
|
|||
|
||||
lock STEERING to SHIP:SRFRETROGRADE.
|
||||
|
||||
for p in SHIP:PARTS {
|
||||
if p:MODULES:Find("ModuleRTAntenna") > -1 and p:GetModule("ModuleRTAntenna"):ALLEVENTNAMES:Find("Deactivate") > -1 {
|
||||
p:GetModule("ModuleRTAntenna"):DoEvent("Deactivate").
|
||||
if retractAntennae {
|
||||
for p in SHIP:PARTS {
|
||||
if p:MODULES:Find("ModuleRTAntenna") > -1 and p:GetModule("ModuleRTAntenna"):ALLEVENTNAMES:Find("Deactivate") > -1 {
|
||||
p:GetModule("ModuleRTAntenna"):DoEvent("Deactivate").
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,11 +75,13 @@ MakeMenu(
|
|||
MakeMenu(
|
||||
stk,
|
||||
MakeButton(rows[1], "REENTRY"),
|
||||
List(),
|
||||
List(
|
||||
List("Retract Antennae", "BOOL", true)
|
||||
),
|
||||
"Execute",
|
||||
{
|
||||
parameter options.
|
||||
PerformReentry().
|
||||
PerformReentry(options["Retract Antennae"]:PRESSED).
|
||||
}
|
||||
).
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user