diff --git a/ascend.ks b/ascend.ks index 6ec6c6e..d2d9734 100644 --- a/ascend.ks +++ b/ascend.ks @@ -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". diff --git a/lib/rocket.ks b/lib/rocket.ks index 75138d8..a9b377e 100644 --- a/lib/rocket.ks +++ b/lib/rocket.ks @@ -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 } }