add unlock loot option

This commit is contained in:
WantedDV 2024-02-10 15:01:00 -03:30
parent b7e877e4b8
commit cbf0abc300

View File

@ -24,12 +24,13 @@ game:addlocalizedstring("LUA_MENU_STATS", "Stats")
game:addlocalizedstring("LUA_MENU_STATS_DESC", "Edit player stats settings.") 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", "Unlock All Items")
game:addlocalizedstring("LUA_MENU_UNLOCKALL_ITEMS_DESC", game:addlocalizedstring("LUA_MENU_UNLOCKALL_ITEMS_DESC", "Unlock items that are level-locked by the player's stats.")
"Whether items should be locked based on the player's stats or always unlocked.")
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", "Unlock All Classes")
game:addlocalizedstring("LUA_MENU_UNLOCKALL_CLASSES_DESC", game:addlocalizedstring("LUA_MENU_UNLOCKALL_CLASSES_DESC", "Unlock extra class slots.")
"Whether classes should be locked based on the player's stats or always unlocked.")
game:addlocalizedstring("LUA_MENU_PRESTIGE", "Prestige") game:addlocalizedstring("LUA_MENU_PRESTIGE", "Prestige")
game:addlocalizedstring("LUA_MENU_PRESTIGE_DESC", "Edit prestige level.") 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") ToggleEnable("cg_unlockall_items")
end) 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, local classesbutton = menu:AddButtonVariant(GenericButtonSettings.Variants.Select,
"@LUA_MENU_UNLOCKALL_CLASSES", "@LUA_MENU_UNLOCKALL_CLASSES_DESC", function() "@LUA_MENU_UNLOCKALL_CLASSES", "@LUA_MENU_UNLOCKALL_CLASSES_DESC", function()
return IsEnabled("cg_unlockall_classes") return IsEnabled("cg_unlockall_classes")