diff --git a/games/game_cyberpunk2077.py b/games/game_cyberpunk2077.py index 9354e5f..92019bf 100644 --- a/games/game_cyberpunk2077.py +++ b/games/game_cyberpunk2077.py @@ -390,6 +390,14 @@ class Cyberpunk2077Game(BasicGame): "Deploy redmod before game launch if necessary", True, ), + mobase.PluginSetting( + "clear_cache_after_game_update", + ( + 'Clears "overwrite/r6/cache/*" if the original game files changed' + " (after update)" + ), + True, + ), mobase.PluginSetting( "configure_RootBuilder", "Configures RootBuilder for Cyberpunk if installed and enabled", @@ -539,7 +547,7 @@ class Cyberpunk2077Game(BasicGame): data_path = Path(self.dataDirectory().absolutePath()) overwrite_path = Path(self._organizer.overwritePath()) cache_files = list(data_path.glob("r6/cache/*")) - if any( + if self._get_setting("clear_cache_after_game_update") and any( self._is_cache_file_updated(file.relative_to(data_path), data_path) for file in cache_files ):