mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
Switch Satellites on again when Space Missions returns after a busy restore
A restore that found Satellites still busy keeps the saved state, and the next Space Missions start then skipped switching Satellites on, so it came up with no satellites. It now keeps that saved state (still the one from before the mission) and switches Satellites on for the mission again. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
71229c8549
commit
74d38e6d14
2 files changed
+49
-7
No files matched your search
@@ -108,7 +108,7 @@ export function createIngestion({
|
||||
|
||||
async function captureSatelliteDependency() {
|
||||
const manager = layerState._dataManager;
|
||||
if (!manager || layerState._satelliteStateBeforeMission) return;
|
||||
if (!manager) return;
|
||||
const token = layerState._lifecycleToken;
|
||||
// Let a pending Satellites action finish before reserving dependency ON.
|
||||
// A successful explicit OFF can cancel this mission entry while we wait.
|
||||
@@ -127,12 +127,16 @@ export function createIngestion({
|
||||
!manager.isEffectivelyEnabled('rocket-launches'))
|
||||
)
|
||||
return;
|
||||
layerState._satelliteStateBeforeMission = {
|
||||
enabled: manager.isEnabled('satellites'),
|
||||
params: parts.policyHelpers.satelliteParamsAfterSpaceMissions(
|
||||
manager.getLayerParams('satellites'),
|
||||
),
|
||||
};
|
||||
// A saved state kept by a restore that could not finish (Satellites was
|
||||
// busy) is still the one from before the mission: keep it, and switch
|
||||
// Satellites on for the mission again.
|
||||
if (!layerState._satelliteStateBeforeMission)
|
||||
layerState._satelliteStateBeforeMission = {
|
||||
enabled: manager.isEnabled('satellites'),
|
||||
params: parts.policyHelpers.satelliteParamsAfterSpaceMissions(
|
||||
manager.getLayerParams('satellites'),
|
||||
),
|
||||
};
|
||||
manager.setLayerParams(
|
||||
'satellites',
|
||||
parts.policyHelpers.satelliteParamsForSpaceMissions(
|
||||
|
||||
Reference in new issue
Block a user