File tree Expand file tree Collapse file tree
common/src/main/kotlin/syncInfo/models/mod
sync-script/src/main/kotlin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ data class ModSyncInfo(
4343 * You will get an error from the mod loader.
4444 *
4545 * */
46- val syncOnlyModsForCurrentEnv : Boolean = true ,
46+ val syncOnlyModsForCurrentEnv : Boolean = false ,
4747 /* *
4848 * Indicates whether optional mods for the current [Environment] should be synced.
4949 *
@@ -55,6 +55,8 @@ data class ModSyncInfo(
5555 * if [syncOptionalModsForCurrentEnv] is `false`, then will only sync the
5656 * required mods for the current system [Environment].
5757 *
58+ * This option is overridable in the script config for a specific client.
59+ *
5860 * @see Mod.syncOptionalForCurrentEnv
5961 * */
6062 val syncOptionalModsForCurrentEnv : Boolean = true ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import gui.theme.ThemeMode
88import kotlinx.serialization.Serializable
99import syncInfo.models.Environment
1010import syncInfo.models.SyncInfo
11+ import syncInfo.models.mod.ModSyncInfo
1112
1213/* *
1314 * A data class that represent the json for the [SyncScriptDotMinecraftFiles.SyncScriptData.ScriptConfig]
@@ -82,6 +83,10 @@ data class ScriptConfig(
8283 * the update process will always update to the minimized JAR.
8384 * */
8485 val autoUpdateEnabled : Boolean = false ,
86+ /* *
87+ * Overrides [ModSyncInfo.syncOnlyModsForCurrentEnv] for this user.
88+ * */
89+ val syncOnlyModsForCurrentEnv : Boolean? = null
8590) {
8691 companion object {
8792 var instance: ScriptConfig ? = null
Original file line number Diff line number Diff line change 11package syncService
22
3+ import config.models.ScriptConfig
34import constants.SyncScriptDotMinecraftFiles
45import gui.dialogs.LoadingIndicatorDialog
56import kotlinx.coroutines.Dispatchers
@@ -100,7 +101,8 @@ class ModsSyncService :
100101 }
101102
102103 private fun getCurrentEnvironmentModsOrAll (mods : List <Mod >): List <Mod > {
103- if (! modSyncInfo.syncOnlyModsForCurrentEnv) {
104+ val syncOnlyModsForCurrentEnv = ScriptConfig .instance?.syncOnlyModsForCurrentEnv ? : modSyncInfo.syncOnlyModsForCurrentEnv
105+ if (! syncOnlyModsForCurrentEnv) {
104106 return mods
105107 }
106108 val currentEnvironmentMods =
You can’t perform that action at this time.
0 commit comments