Skip to content

Commit f79b470

Browse files
committed
WIP Store target version of the mod loader of the active game in Vuex
Some of the communities share a common BepInEx package. If a newer version is needed for one community, it's risky to just publish the new version, since it would trigger the auto update feature for all these communities, possibly breaking something. To prevent this, the Thunderstore ecosystem schema will eventually include an optional field for defining which version a community should use. WIP: don't know where to read the value from yet.
1 parent 66bc8d9 commit f79b470

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/store/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Vue.use(Vuex);
1717

1818
export interface State {
1919
activeGame: Game;
20+
activeGameModLoaderTarget: string | null;
2021
isMigrationChecked: boolean;
2122
_settings: ManagerSettings | null;
2223
}
@@ -31,6 +32,7 @@ type Context = ActionContext<State, State>;
3132
export const store = {
3233
state: {
3334
activeGame: GameManager.defaultGame,
35+
activeGameModLoaderTarget: null,
3436
isMigrationChecked: false,
3537

3638
// Access through getters to ensure the settings are loaded.
@@ -68,12 +70,18 @@ export const store = {
6870
const settings = await ManagerSettings.getSingleton(game);
6971
commit('setSettings', settings);
7072
return settings;
73+
74+
// TODO: update setActiveGameModLoaderTarget once we know
75+
// where to read it from.
7176
}
7277
},
7378
mutations: {
7479
setActiveGame(state: State, game: Game) {
7580
state.activeGame = game;
7681
},
82+
setActiveGameModLoaderTarget(state: State, dependencyString: string) {
83+
state.activeGameModLoaderTarget = dependencyString;
84+
},
7785
setMigrationChecked(state: State) {
7886
state.isMigrationChecked = true;
7987
},

0 commit comments

Comments
 (0)