From e62f79ecb9b11d2ed4d83471d671e873a80fb216 Mon Sep 17 00:00:00 2001 From: R3voA3 Date: Sun, 25 Aug 2024 12:20:25 +0200 Subject: [PATCH] added mission.sqm backup blacklist --- CHANGELOG.md | 3 ++- .../attributesEditor/backupMissionSQM.hpp | 9 +++++++ .../misc/fn_createBackupMissionSQM.sqf | 4 ++++ addons/main/stringtable.xml | 24 ++++++++++++++++++- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aeeb3834..9a2fe060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added object event handler attributes - Added group event handler attributes - Added import from clipboard function to ESE #306 (Thanks to Pixelated-Grunt) +- Added blacklist for mission.sqm backup. ## CHANGED - 3den Enhanced is now build with HEMTT @@ -35,7 +36,7 @@ - Dynamic view distance was no longer working after preview ended - Major code overhaul of things running from various event handlers - Draw DLC icons and building positions were move to preferences -> interface. Code was optimized -- Minimap code was optimizedw +- Minimap code was optimized - Added description to menu strip items for easier documenation - Changed shortcut for Placement Tools from CTRL + L to CTRL + ALT + L (CBA compatibility) - Shortcuts in the shortcuts UI is now properly translated diff --git a/addons/main/attributesEditor/backupMissionSQM.hpp b/addons/main/attributesEditor/backupMissionSQM.hpp index dde1a5e2..c6c70629 100644 --- a/addons/main/attributesEditor/backupMissionSQM.hpp +++ b/addons/main/attributesEditor/backupMissionSQM.hpp @@ -15,4 +15,13 @@ class ENH_BackupMissionSQMPath control = "Edit"; expression = "profileNamespace setVariable ['ENH_EditorPreferences_BackupMissionSQMPath', _value]"; defaultValue = "profileNamespace getVariable ['ENH_EditorPreferences_BackupMissionSQMPath', '']"; +}; +class ENH_BackupMissionSQMBlacklist +{ + displayName = "$STR_ENH_MAIN_BACKUPMISSIONSQMBLACKLIST_DISPLAYNAME"; + tooltip = "$STR_ENH_MAIN_BACKUPMISSIONSQMBLACKLIST_TOOLTIP"; + property = "ENH_BackupMissionSQMBlacklist"; + control = "Edit"; + expression = "profileNamespace setVariable ['ENH_EditorPreferences_BackupMissionSQMBlacklist', _value]"; + defaultValue = "profileNamespace getVariable ['ENH_EditorPreferences_BackupMissionSQMBlacklist', '']"; }; \ No newline at end of file diff --git a/addons/main/functions/misc/fn_createBackupMissionSQM.sqf b/addons/main/functions/misc/fn_createBackupMissionSQM.sqf index 7806e655..1b162abd 100644 --- a/addons/main/functions/misc/fn_createBackupMissionSQM.sqf +++ b/addons/main/functions/misc/fn_createBackupMissionSQM.sqf @@ -20,6 +20,10 @@ if (!is3DEN) exitWith {false}; //Opt-in via preferences if !(profileNamespace getVariable ["ENH_EditorPreferences_BackupMissionSQM", false]) exitWith {}; +//Check if missionName is in presets +private _blacklist = profileNamespace getVariable ["ENH_EditorPreferences_BackupMissionSQMBlacklist", ""]; +if (toLower missionName in tolower _blacklist) exitWith {}; + //Pythia is needed if !(isClass (configfile >> "CfgPatches" >> "PY3_Pythia")) exitWith { diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index a972e606..61471c19 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -7162,6 +7162,28 @@ Se abilitato, un backup della missione.sqm verrà creato quando lo scenario viene salvato o autosalvato.\nIl backup viene salvato all'interno della cartella dello scenario.\nPer far funzionare questo meccanismo di backup è necessaria la modifica di Pythia.\nMa assicuratevi di fare un backup del vostro scenario prima di abilitare questa opzione per la prima volta! Jeśli opcja ta jest włączona, kopia zapasowa pliku mission.sqm zostanie utworzona podczas zapisywania lub automatycznego zapisywania scenariusza. Kopie zapasowe są zapisywane w folderze scenariusza. Aby ten mechanizm tworzenia kopii zapasowych działał, wymagana jest modyfikacja Pythia. Upewnij się, że utworzyłeś kopię zapasową scenariusza przed włączeniem tej opcji po raz pierwszy! + + Blacklist + Черный список + Blacklist + Liste noire + Lista negra + 黑名单 + 黑名單 + Lista nera + Czarna lista + + + If the 'missionName' is found in this list no backups will be created. + Если имя 'missionName' найдено в этом списке, резервные копии создаваться не будут. + Wenn der 'missionName' in dieser Liste gefunden wird, werden keine Sicherungen erstellt. + Si le 'missionName' se trouve dans cette liste, aucune sauvegarde ne sera créée. + Si el 'missionName' se encuentra en esta lista no se creará ninguna copia de seguridad. + 如果在此列表中找到 “任务名称”,则不会创建备份。 + 如果在此清單中找到「missionName」,則不會建立備份。 + Se 'missionName' viene trovato in questo elenco, non verranno creati backup. + Jeśli „missionName” znajduje się na tej liście, żadne kopie zapasowe nie zostaną utworzone. + Path for mission backups Путь для резервных копий миссий @@ -10319,4 +10341,4 @@ Condizione calcolata ripetutamente, deve restituire un'espressione booleana. Quando è vera, l'indicatore viene visualizzato. - + \ No newline at end of file