Skip to content

Commit

Permalink
ensure we do not ser/des if dependencies are installing
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCs committed Feb 14, 2024
1 parent 828ea96 commit c0d3ccc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/extensions/file_based_loadorder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ async function genLoadOrderChange(api: types.IExtensionApi, oldState: any, newSt
// Maybe it was changed by an extension ?
return;
}
if ((state.session.base.activity?.installing_dependencies ?? []).length > 0) {
// Don't do anything if we're in the middle of installing deps
log('info', 'skipping load order serialization/deserialization');
return;
}

const gameEntry = findGameEntry(profile.gameId);
if (gameEntry === undefined) {
Expand Down Expand Up @@ -200,6 +205,12 @@ async function applyNewLoadOrder(api: types.IExtensionApi,

function genDidDeploy(api: types.IExtensionApi) {
return async (profileId: string, deployment: IDeployment) => {
const state = api.getState();
if ((state.session.base.activity?.installing_dependencies ?? []).length > 0) {
// Don't do anything if we're in the middle of installing deps
log('info', 'skipping load order serialization/deserialization');
return Promise.resolve();
}
const gameId = selectors.profileById(api.getState(), profileId)?.gameId;
const gameEntry: ILoadOrderGameInfo = findGameEntry(gameId);
const redundancy = (gameEntry.clearStateOnPurge === false)
Expand Down

0 comments on commit c0d3ccc

Please sign in to comment.