From ad684dc6a6836d360411f2fc5a3a999a04d64a47 Mon Sep 17 00:00:00 2001 From: Ellet Date: Sat, 6 Jul 2024 05:49:23 +0300 Subject: [PATCH] BREAKING CHANGE: rename properties in ModSyncInfo for clarity --- common/src/main/kotlin/syncInfo/models/mod/Mod.kt | 2 +- .../src/main/kotlin/syncInfo/models/mod/ModSyncInfo.kt | 10 +++++----- .../src/main/kotlin/syncInfo/models/ModExtensions.kt | 2 +- .../src/main/kotlin/syncService/ModsSyncService.kt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/main/kotlin/syncInfo/models/mod/Mod.kt b/common/src/main/kotlin/syncInfo/models/mod/Mod.kt index bf89a88..0ed9e5b 100644 --- a/common/src/main/kotlin/syncInfo/models/mod/Mod.kt +++ b/common/src/main/kotlin/syncInfo/models/mod/Mod.kt @@ -56,7 +56,7 @@ data class Mod( * */ val verifyFileIntegrity: Boolean? = null, /** - * Will override [ModSyncInfo.syncAllOptionalForCurrentEnv] for a specific mod + * Will override [ModSyncInfo.syncOptionalModsForCurrentEnv] for a specific mod * */ val syncOptionalForCurrentEnv: Boolean? = null, ) { diff --git a/common/src/main/kotlin/syncInfo/models/mod/ModSyncInfo.kt b/common/src/main/kotlin/syncInfo/models/mod/ModSyncInfo.kt index 7c77bb7..db9000c 100644 --- a/common/src/main/kotlin/syncInfo/models/mod/ModSyncInfo.kt +++ b/common/src/main/kotlin/syncInfo/models/mod/ModSyncInfo.kt @@ -43,21 +43,21 @@ data class ModSyncInfo( * You will get an error from the mod loader. * * */ - val syncOnlyForCurrentEnv: Boolean = true, + val syncOnlyModsForCurrentEnv: Boolean = true, /** * Indicates whether optional mods for the current [Environment] should be synced. * * Some mods might be optional to install on either server or client side or both. * - * This setting only takes effect if [syncOnlyForCurrentEnv] is `true`. - * If [syncOnlyForCurrentEnv] is `false`, this property has no impact. + * This setting only takes effect if [syncOnlyModsForCurrentEnv] is `true`. + * If [syncOnlyModsForCurrentEnv] is `false`, this property has no impact. * - * if [syncAllOptionalForCurrentEnv] is `false`, then will only sync the + * if [syncOptionalModsForCurrentEnv] is `false`, then will only sync the * required mods for the current system [Environment]. * * @see Mod.syncOptionalForCurrentEnv * */ - val syncAllOptionalForCurrentEnv: Boolean = true, + val syncOptionalModsForCurrentEnv: Boolean = true, /** * Determines whether the script allows the player to use mods other than those synchronized by the script. * diff --git a/sync-script/src/main/kotlin/syncInfo/models/ModExtensions.kt b/sync-script/src/main/kotlin/syncInfo/models/ModExtensions.kt index c15b130..f451da6 100644 --- a/sync-script/src/main/kotlin/syncInfo/models/ModExtensions.kt +++ b/sync-script/src/main/kotlin/syncInfo/models/ModExtensions.kt @@ -17,7 +17,7 @@ fun Mod.getDisplayName(): String = name ?: getFileNameFromUrlOrError(downloadUrl private fun Mod.shouldSyncOptionalModForCurrentEnvironment() = syncOptionalForCurrentEnv - ?: SyncInfo.instance.modSyncInfo.syncAllOptionalForCurrentEnv + ?: SyncInfo.instance.modSyncInfo.syncOptionalModsForCurrentEnv /** * If this mod should be downloaded on the current [Environment]. diff --git a/sync-script/src/main/kotlin/syncService/ModsSyncService.kt b/sync-script/src/main/kotlin/syncService/ModsSyncService.kt index 304f38b..2e8d048 100644 --- a/sync-script/src/main/kotlin/syncService/ModsSyncService.kt +++ b/sync-script/src/main/kotlin/syncService/ModsSyncService.kt @@ -97,7 +97,7 @@ class ModsSyncService : } private fun getCurrentEnvironmentModsOrAll(mods: List): List { - if (!modSyncInfo.syncOnlyForCurrentEnv) { + if (!modSyncInfo.syncOnlyModsForCurrentEnv) { return mods } val currentEnvironmentMods =