Skip to content

Commit

Permalink
Merge pull request #326 from R3voA3/blacklist
Browse files Browse the repository at this point in the history
added mission.sqm backup blacklist
  • Loading branch information
R3voA3 authored Aug 25, 2024
2 parents 8f226f5 + e62f79e commit d83e01c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions addons/main/attributesEditor/backupMissionSQM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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', '']";
};
4 changes: 4 additions & 0 deletions addons/main/functions/misc/fn_createBackupMissionSQM.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
24 changes: 23 additions & 1 deletion addons/main/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7162,6 +7162,28 @@
<Italian>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!</Italian>
<Polish>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!</Polish>
</Key>
<Key ID="STR_ENH_MAIN_BACKUPMISSIONSQMBLACKLIST_DISPLAYNAME">
<English>Blacklist</English>
<Russian>Черный список</Russian>
<German>Blacklist</German>
<French>Liste noire</French>
<Spanish>Lista negra</Spanish>
<Chinesesimp>黑名单</Chinesesimp>
<Chinese>黑名單</Chinese>
<Italian>Lista nera</Italian>
<Polish>Czarna lista</Polish>
</Key>
<Key ID="STR_ENH_MAIN_BACKUPMISSIONSQMBLACKLIST_TOOLTIP">
<English>If the 'missionName' is found in this list no backups will be created.</English>
<Russian>Если имя 'missionName' найдено в этом списке, резервные копии создаваться не будут.</Russian>
<German>Wenn der 'missionName' in dieser Liste gefunden wird, werden keine Sicherungen erstellt.</German>
<French>Si le 'missionName' se trouve dans cette liste, aucune sauvegarde ne sera créée.</French>
<Spanish>Si el 'missionName' se encuentra en esta lista no se creará ninguna copia de seguridad.</Spanish>
<Chinesesimp>如果在此列表中找到 “任务名称”,则不会创建备份。</Chinesesimp>
<Chinese>如果在此清單中找到「missionName」,則不會建立備份。</Chinese>
<Italian>Se 'missionName' viene trovato in questo elenco, non verranno creati backup.</Italian>
<Polish>Jeśli „missionName” znajduje się na tej liście, żadne kopie zapasowe nie zostaną utworzone.</Polish>
</Key>
<Key ID="STR_ENH_MAIN_BACKUPMISSIONSQMPATH_DISPLAYNAME">
<English>Path for mission backups</English>
<Russian>Путь для резервных копий миссий</Russian>
Expand Down Expand Up @@ -10319,4 +10341,4 @@
<Italian>Condizione calcolata ripetutamente, deve restituire un'espressione booleana. Quando è vera, l'indicatore viene visualizzato.</Italian>
</Key>
</Package>
</Project>
</Project>

0 comments on commit d83e01c

Please sign in to comment.