From cbf0abc3005d50b4c4194edb2713d8464176f4df Mon Sep 17 00:00:00 2001 From: WantedDV <122710241+WantedDV@users.noreply.github.com> Date: Sat, 10 Feb 2024 15:01:00 -0330 Subject: [PATCH] add unlock loot option --- ui_scripts/stats/__init__.lua | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ui_scripts/stats/__init__.lua b/ui_scripts/stats/__init__.lua index 16a2431..98b13d4 100644 --- a/ui_scripts/stats/__init__.lua +++ b/ui_scripts/stats/__init__.lua @@ -24,12 +24,13 @@ game:addlocalizedstring("LUA_MENU_STATS", "Stats") game:addlocalizedstring("LUA_MENU_STATS_DESC", "Edit player stats settings.") game:addlocalizedstring("LUA_MENU_UNLOCKALL_ITEMS", "Unlock All Items") -game:addlocalizedstring("LUA_MENU_UNLOCKALL_ITEMS_DESC", - "Whether items should be locked based on the player's stats or always unlocked.") +game:addlocalizedstring("LUA_MENU_UNLOCKALL_ITEMS_DESC", "Unlock items that are level-locked by the player's stats.") + +game:addlocalizedstring("LUA_MENU_UNLOCKALL_LOOT", "Unlock All Loot") +game:addlocalizedstring("LUA_MENU_UNLOCKALL_LOOT_DESC", "Unlock supply drop loot.") game:addlocalizedstring("LUA_MENU_UNLOCKALL_CLASSES", "Unlock All Classes") -game:addlocalizedstring("LUA_MENU_UNLOCKALL_CLASSES_DESC", - "Whether classes should be locked based on the player's stats or always unlocked.") +game:addlocalizedstring("LUA_MENU_UNLOCKALL_CLASSES_DESC", "Unlock extra class slots.") game:addlocalizedstring("LUA_MENU_PRESTIGE", "Prestige") game:addlocalizedstring("LUA_MENU_PRESTIGE_DESC", "Edit prestige level.") @@ -112,6 +113,15 @@ LUI.MenuBuilder.registerType("menu_stats", function(a1, a2) ToggleEnable("cg_unlockall_items") end) + local lootbutton = menu:AddButtonVariant(GenericButtonSettings.Variants.Select, + "@LUA_MENU_UNLOCKALL_LOOT", "@LUA_MENU_UNLOCKALL_LOOT_DESC", function() + return IsEnabled("cg_unlockall_loot") + end, function() + ToggleEnable("cg_unlockall_loot") + end, function() + ToggleEnable("cg_unlockall_loot") + end) + local classesbutton = menu:AddButtonVariant(GenericButtonSettings.Variants.Select, "@LUA_MENU_UNLOCKALL_CLASSES", "@LUA_MENU_UNLOCKALL_CLASSES_DESC", function() return IsEnabled("cg_unlockall_classes")