Repository navigation
Staging: a drop tank with a built-in sepratron still holds the stage - #2787
Merged
Merged
Conversation
HasActiveOrIdleEngineOrTankDescendant skipped sepratron parts entirely, including the check for a tank feeding a running engine. Since running engines with drop tanks defer to those tanks (EnginesHaveDropTanks), a booster tank that carries its own separation motor (RO/RN R-7 blocks B/V/G/D: a throttle-locked solid that activates even if disconnected) left nothing holding the stage, and autostage dropped the boosters right after the launch clamps released. Only the engine test now skips sepratrons; the tank test runs for every part. A real sepratron's own fuel is never matched, since its engine is not in the active engine list, so this only changes parts that are both a tank and a sepratron. Crossfeeding boosters are still dropped once their own tanks are empty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #2350 ("Drop engines even though crossfeeding"), autostage drops boosters whose tank part carries a built-in separation motor right after the launch clamps are released, instead of at booster burnout.
Example: RO/RN R-7 blocks B/V/G/D (
rn_r7_blok_bvgd*). Each block is a tank with an anchored decoupler and a small throttle-locked solid motor that activates even if disconnected, soIsSepratron()is true for the tank part. The RD-107 and its verniers are separate parts attached to the tank.Cause: in
HasActiveOrIdleEngineOrTankDescendantthe!p.IsSepratron()guard wrapped both checks: "is this part a running engine" and "is this part a tank feeding a running engine". Since #2350 a running engine with drop tanks no longer holds the stage itself (EnginesHaveDropTanks), it defers to its tanks. With the tank skipped as a sepratron, nothing holds the stage. Before #2350 the RD-107 parts held it themselves, so this didn't show. The FuelFlowSimulation side of #2350 is unaffected (WouldDropAccessibleFuelTankdoesn't look at sepratron status), which is why the Δv window showed the boosters burning ~117 s while autostage dropped them at once.Fix: only the engine check skips sepratrons; the tank check runs for every part. A real sepratron's own fuel is never matched by the tank check because its engine isn't in the active engine list, so this only changes parts that are both a tank and a sepratron. The #2350 behaviour is kept: a crossfeeding booster is still dropped once its own tanks are empty.
Tested in KSP 1.12.5 / RP-1 with a Sputnik 1 R-7 (RN parts, booster sep motors kept), Classic ascent, autostage on, hot staging on: