Only wait for fairings to clear the vessel if there are any to deploy.

This commit is contained in:
Casper V. Kristensen 2019-03-01 23:22:17 +01:00
parent 18402b7084
commit 5193fc9d68
Signed by: caspervk
GPG key ID: 289CA03790535054
2 changed files with 6 additions and 3 deletions

View file

@ -103,7 +103,6 @@ function launch {
if auto_deploy_fairings {
deploy_fairings().
wait 3. // wait for fairings to clear the vessel
}
if auto_deploy_solar_panels {
print "Deploying solar panels".

View file

@ -53,8 +53,12 @@ function isp_sum {
function deploy_fairings {
print "Deploying fairings".
for module in SHIP:modulesnamed("ModuleProceduralFairing") {
module:doaction("deploy", true).
local fairings is SHIP:modulesnamed("ModuleProceduralFairing").
for fairing in fairings {
fairing:doaction("deploy", true).
}
if not fairings:empty {
wait 3. // wait for fairings to clear the vessel
}
}