diff --git a/data/cdata/ui_scripts/patches/__init__.lua b/data/cdata/ui_scripts/patches/__init__.lua index e69de29b..da3e488b 100644 --- a/data/cdata/ui_scripts/patches/__init__.lua +++ b/data/cdata/ui_scripts/patches/__init__.lua @@ -0,0 +1 @@ +require("unlockall") diff --git a/data/cdata/ui_scripts/patches/unlockall.lua b/data/cdata/ui_scripts/patches/unlockall.lua new file mode 100644 index 00000000..3a39fd9b --- /dev/null +++ b/data/cdata/ui_scripts/patches/unlockall.lua @@ -0,0 +1,33 @@ +if (Engine.InFrontend()) then + local levelselectmenu = LUI.sp_menus.LevelSelectMenu + levelselectmenu.DisplayUnlockAllFooterPrompt = function(f79_arg0, f79_arg1) + if not Engine.GetDvarBool("profileMenuOption_hasUnlockedAll_SP") then + f79_arg0:AddHelp({ + name = "add_button_helper_text", + button_ref = "button_alt2", + helper_text = Engine.Localize("@LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE"), + side = "right", + clickable = true + }, levelselectmenu.UnlockAllPopup) + else + f79_arg0:AddHelp({ + name = "add_button_helper_text", + button_ref = "button_alt2", + helper_text = Engine.Localize("@LUA_MENU_CANCEL_UNLOCK_CAPS"), + side = "right", + clickable = true + }, levelselectmenu.SetUnlockAll) + end + end + + levelselectmenu.UnlockAllPopup = function(f70_arg0, f70_arg1) + LUI.FlowManager.RequestAddMenu(nil, "request_yesno_popup_generic", true, f70_arg1.controller, nil, { + popup_title = Engine.Localize("@LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE"), + yes_action = levelselectmenu.SetUnlockAll, + message_text = Engine.Localize("@MENU_COMPLETED_CHEAT") .. ". " .. + Engine.Localize("@LUA_MENU_CAMPAIGN_UNLOCKED_ALL_DESC") + }) + end +end + +CoD.AllowUnlockAllInShip = true diff --git a/data/zonetool/localizedstrings/arabic.json b/data/zonetool/localizedstrings/arabic.json index 63c934ff..bee5affd 100644 --- a/data/zonetool/localizedstrings/arabic.json +++ b/data/zonetool/localizedstrings/arabic.json @@ -16,5 +16,8 @@ "LOCALE_14": "الإسبانية (أمريكا اللاتينية)", "LOCALE_15": "الكورية", "LOCALE_16": "اللغة الإنجليزية (آمنة)", - "LOCALE_17": "(جزئي) الروسية" + "LOCALE_17": "(جزئي) الروسية", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": ".ﻡﺎﻬﻤﻟﺍ ﻊﻴﻤﺟ ﺢﺘﻓ", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "ﺢﺘﻔﻟﺍ ءﺎﻐﻟﺇ" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/english.json b/data/zonetool/localizedstrings/english.json index 5a3b8b81..c0d4592e 100644 --- a/data/zonetool/localizedstrings/english.json +++ b/data/zonetool/localizedstrings/english.json @@ -24,6 +24,9 @@ "UPDATER_POPUP_RESTART_POPUP_TEXT": "Update requires restart", "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Checking for updates...", + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Unlock All Missions and Intel", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Cancel Unlock All Missions", + "MENU_MODS_DESC": "Load installed mods.", "LUA_MENU_MOD_DESC_DEFAULT": "Load &&1.", "LUA_MENU_MOD_DESC": "&&1\nAuthor: &&2\nVersion: &&3", diff --git a/data/zonetool/localizedstrings/french.json b/data/zonetool/localizedstrings/french.json index a5e30500..36e937b0 100644 --- a/data/zonetool/localizedstrings/french.json +++ b/data/zonetool/localizedstrings/french.json @@ -17,13 +17,16 @@ "LOCALE_15": "Coréen", "LOCALE_16": "Anglais (sécuritaire)", "LOCALE_17": "Russe (partiel)", - + "UPDATER_POPUP_NO_UPDATES_AVAILABLE": "Aucune mise à jour disponible", "UPDATER_POPUP_AVAILABLE_UPDATE_TEXT": "Une mise à jour est disponible,\npoursuivre l'installation ?", "UPDATER_POPUP_SUCCESSFUL": "Mise à jour réussie", "UPDATER_POPUP_RESTART_POPUP_TEXT": "La mise à jour nécessite un redémarrage", "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Vérification des mises à jour...", + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Débloquer toutes les missions", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Annuler déblocage", + "MENU_MODS": "MODS", "MENU_MODS_DESC": "Charger les mods installés.", "LUA_MENU_MOD_DESC_DEFAULT": "Charger &&1.", diff --git a/data/zonetool/localizedstrings/german.json b/data/zonetool/localizedstrings/german.json index b1b858c2..c0235f4a 100644 --- a/data/zonetool/localizedstrings/german.json +++ b/data/zonetool/localizedstrings/german.json @@ -16,5 +16,8 @@ "LOCALE_14": "Spanisch (Lateinamerika)", "LOCALE_15": "Koreanisch", "LOCALE_16": "Englisch (Sicher)", - "LOCALE_17": "Russisch (Untertitelt)" + "LOCALE_17": "Russisch (Untertitelt)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Alle Missionen freischalten", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Freischalten abbrechen" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/italian.json b/data/zonetool/localizedstrings/italian.json index 5fbb5f09..13524d5f 100644 --- a/data/zonetool/localizedstrings/italian.json +++ b/data/zonetool/localizedstrings/italian.json @@ -18,6 +18,9 @@ "LOCALE_16": "Inglese (sicuro)", "LOCALE_17": "Russo (parziale)", + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Sblocca tutte le missioni", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Annulla sblocco", + "MENU_MODS_DESC": "Abilita mod installate.", "LUA_MENU_MOD_DESC_DEFAULT": "Abilita &&1.", "LUA_MENU_MOD_DESC": "&&1\nAutore: &&2\nVersione: &&3", diff --git a/data/zonetool/localizedstrings/japanese_full.json b/data/zonetool/localizedstrings/japanese_full.json index dd16e435..6ffa51e4 100644 --- a/data/zonetool/localizedstrings/japanese_full.json +++ b/data/zonetool/localizedstrings/japanese_full.json @@ -16,5 +16,8 @@ "LOCALE_14": "スペイン語(南米)", "LOCALE_15": "韓国語", "LOCALE_16": "英語(検閲)", - "LOCALE_17": "ロシア語(一部)" + "LOCALE_17": "ロシア語(一部)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "全ミッションをアンロック", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "アンロックをキャンセル" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/japenese_partial.json b/data/zonetool/localizedstrings/japenese_partial.json index dd16e435..6ffa51e4 100644 --- a/data/zonetool/localizedstrings/japenese_partial.json +++ b/data/zonetool/localizedstrings/japenese_partial.json @@ -16,5 +16,8 @@ "LOCALE_14": "スペイン語(南米)", "LOCALE_15": "韓国語", "LOCALE_16": "英語(検閲)", - "LOCALE_17": "ロシア語(一部)" + "LOCALE_17": "ロシア語(一部)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "全ミッションをアンロック", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "アンロックをキャンセル" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/korean.json b/data/zonetool/localizedstrings/korean.json index f8bd4a27..9b7fd9d2 100644 --- a/data/zonetool/localizedstrings/korean.json +++ b/data/zonetool/localizedstrings/korean.json @@ -16,5 +16,8 @@ "LOCALE_14": "스페인어(라틴아메리카)", "LOCALE_15": "한국어", "LOCALE_16": "영어(검열)", - "LOCALE_17": "러시아어(일부)" + "LOCALE_17": "러시아어(일부)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "모든 임무 잠금 해제", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "잠금 해제 취소" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/polish.json b/data/zonetool/localizedstrings/polish.json index 2d91cbda..abf226f7 100644 --- a/data/zonetool/localizedstrings/polish.json +++ b/data/zonetool/localizedstrings/polish.json @@ -16,5 +16,8 @@ "LOCALE_14": "Hiszpański (Iberoameryka)", "LOCALE_15": "Koreański", "LOCALE_16": "Angielski (cenzuralny)", - "LOCALE_17": "Rosyjski (częściowy)" + "LOCALE_17": "Rosyjski (częściowy)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Odblokuj wszystkie misje", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Anuluj odblokowanie" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/portuguese.json b/data/zonetool/localizedstrings/portuguese.json index d4c0c9ef..408bd359 100644 --- a/data/zonetool/localizedstrings/portuguese.json +++ b/data/zonetool/localizedstrings/portuguese.json @@ -16,5 +16,8 @@ "LOCALE_14": "Español (América Latina)", "LOCALE_15": "Coreano", "LOCALE_16": "Inglês (Censurado)", - "LOCALE_17": "Russo (Parcial)" + "LOCALE_17": "Russo (Parcial)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Desbloquear todas as missões", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Cancelar desbloqueio" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/russian.json b/data/zonetool/localizedstrings/russian.json index 5705a478..1477f81a 100644 --- a/data/zonetool/localizedstrings/russian.json +++ b/data/zonetool/localizedstrings/russian.json @@ -23,7 +23,10 @@ "UPDATER_POPUP_SUCCESSFUL": "Обновление завершено", "UPDATER_POPUP_RESTART_POPUP_TEXT": "Для применения изменений необходим перезапуск игры", "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Проверка наличия обновлений...", - + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Открыть все задания и чит-коды", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Вернуться к своему прогрессу прохождения", + "MENU_MODS": "МОДЫ", "MENU_MODS_DESC": "Запуск установленных модов.", "LUA_MENU_MOD_DESC_DEFAULT": "Запустить &&1.", diff --git a/data/zonetool/localizedstrings/russian_partial.json b/data/zonetool/localizedstrings/russian_partial.json index 5705a478..1477f81a 100644 --- a/data/zonetool/localizedstrings/russian_partial.json +++ b/data/zonetool/localizedstrings/russian_partial.json @@ -23,7 +23,10 @@ "UPDATER_POPUP_SUCCESSFUL": "Обновление завершено", "UPDATER_POPUP_RESTART_POPUP_TEXT": "Для применения изменений необходим перезапуск игры", "UPDATER_POPUP_CHECKING_FOR_UPDATES": "Проверка наличия обновлений...", - + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Открыть все задания и чит-коды", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Вернуться к своему прогрессу прохождения", + "MENU_MODS": "МОДЫ", "MENU_MODS_DESC": "Запуск установленных модов.", "LUA_MENU_MOD_DESC_DEFAULT": "Запустить &&1.", diff --git a/data/zonetool/localizedstrings/simplified_chinese.json b/data/zonetool/localizedstrings/simplified_chinese.json index b45621ca..be1c7430 100644 --- a/data/zonetool/localizedstrings/simplified_chinese.json +++ b/data/zonetool/localizedstrings/simplified_chinese.json @@ -16,5 +16,8 @@ "LOCALE_14": "西班牙语(拉丁美洲)", "LOCALE_15": "韩语", "LOCALE_16": "英语 (审查制度)", - "LOCALE_17": "俄语(拉丁美洲)" + "LOCALE_17": "俄语(拉丁美洲)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "解锁全部任务", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "取消解锁" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/spanish.json b/data/zonetool/localizedstrings/spanish.json index 790c2774..033d1070 100644 --- a/data/zonetool/localizedstrings/spanish.json +++ b/data/zonetool/localizedstrings/spanish.json @@ -16,5 +16,8 @@ "LOCALE_14": "Español (América Latina)", "LOCALE_15": "Coreano", "LOCALE_16": "Inglés (censura)", - "LOCALE_17": "Ruso (parcial)" + "LOCALE_17": "Ruso (parcial)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Desbloquear todas las misiones", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Cancelar desbloqueo" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/spanishna.json b/data/zonetool/localizedstrings/spanishna.json index 790c2774..033d1070 100644 --- a/data/zonetool/localizedstrings/spanishna.json +++ b/data/zonetool/localizedstrings/spanishna.json @@ -16,5 +16,8 @@ "LOCALE_14": "Español (América Latina)", "LOCALE_15": "Coreano", "LOCALE_16": "Inglés (censura)", - "LOCALE_17": "Ruso (parcial)" + "LOCALE_17": "Ruso (parcial)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "Desbloquear todas las misiones", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "Cancelar desbloqueo" } \ No newline at end of file diff --git a/data/zonetool/localizedstrings/traditional_chinese.json b/data/zonetool/localizedstrings/traditional_chinese.json index 9b31e4bc..b6406dd5 100644 --- a/data/zonetool/localizedstrings/traditional_chinese.json +++ b/data/zonetool/localizedstrings/traditional_chinese.json @@ -16,5 +16,8 @@ "LOCALE_14": "西班牙文(洛杉磯)", "LOCALE_15": "韓文", "LOCALE_16": "英文 (審查制度)", - "LOCALE_17": "俄文(部份)" + "LOCALE_17": "俄文(部份)", + + "LUA_MENU_CAMPAIGN_UNLOCKED_ALL_TITLE": "解鎖所有任務", + "LUA_MENU_CANCEL_UNLOCK_CAPS": "取消解鎖" } \ No newline at end of file