Set up code for quickly handling antennas and solar panels.
This commit is contained in:
parent
27ad3c11d7
commit
081fcb3618
5 changed files with 108 additions and 36 deletions
|
@ -2,11 +2,15 @@
|
|||
// Assumes stage 0 contains only parachutes.
|
||||
// Primarily written for small science payload probes.
|
||||
|
||||
RunOncePath("lib/systems").
|
||||
|
||||
function PerformReentry {
|
||||
parameter retractAntennae is true.
|
||||
|
||||
SAS off.
|
||||
|
||||
print "Reentry mode activated. Control permanently locked.".
|
||||
|
||||
// stage until only stage 0 remains.
|
||||
until STAGE:NUMBER <= 1 {
|
||||
stage.
|
||||
|
@ -15,11 +19,7 @@ function PerformReentry {
|
|||
lock STEERING to SHIP:SRFRETROGRADE.
|
||||
|
||||
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").
|
||||
}
|
||||
}
|
||||
Antennas(false).
|
||||
}
|
||||
|
||||
when SHIP:ALTITUDE - SHIP:GEOPOSITION:TERRAINHEIGHT < 2500 then {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue