Skip to content

Commit

Permalink
Merge pull request #782 from rlcevg/barb_public_profile
Browse files Browse the repository at this point in the history
Make public BARb custom profiles
  • Loading branch information
AntlerForce authored Oct 19, 2024
2 parents beed8c8 + 5e55047 commit aab8ab8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions LuaMenu/configs/gameConfig/byar/aiCustomData.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
local customProfiles = {
['BARb stable'] = {
['BARb'] = {
{
key = 'hard_aggressive', -- must conform to directory name
name = 'Hard | Aggressive', -- human readable name displayed in a list
Expand All @@ -9,7 +9,7 @@ local customProfiles = {
}

local blacklistProfiles = {
-- ['BARb stable'] = {
-- ['BARb'] = {
-- dev = true,
-- hard = true,
-- },
Expand Down
2 changes: 1 addition & 1 deletion LuaMenu/widgets/chobby/components/ai_list_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function AiListWindow:MakeAiOptionsButton(displayName, tooltip, shortName, versi
self:AddAi(displayName, shortName, version, aioptions)
self:HideWindow()
end
WG.Chobby.AiOptionsWindow(displayName, path, successFunc)
WG.Chobby.AiOptionsWindow(displayName, shortName, path, successFunc)
end
},
}
Expand Down
8 changes: 4 additions & 4 deletions LuaMenu/widgets/chobby/components/aioptions_window.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AiOptionsWindow = ListWindow:extends{}

function AiOptionsWindow:init(displayName, optionsPath, successFunc)
function AiOptionsWindow:init(displayName, shortName, optionsPath, successFunc)
self:super('init', lobbyInterfaceHolder, displayName.." Options", false, "main_window", nil, {6, 7, 7, 4})
self.window:SetPos(nil, nil, 650, 700)
WG.Chobby.PriorityPopup(self.window, nil, nil, nil, true)
Expand All @@ -26,7 +26,7 @@ function AiOptionsWindow:init(displayName, optionsPath, successFunc)

-- AIOptions
local options = VFS.Include(optionsPath)
self:CustomizeProfiles(displayName, options)
self:CustomizeProfiles(shortName, options)
for i = #options, 1, -1 do
self:AddEntry(options[i], i)
end
Expand Down Expand Up @@ -225,10 +225,10 @@ function AiOptionsWindow:MakeString(data)
}
end

function AiOptionsWindow:CustomizeProfiles(displayName, options)
function AiOptionsWindow:CustomizeProfiles(shortName, options)
for _, data in ipairs(options) do
if data.type == "list" and data.key == "profile" then
WG.Chobby.Configuration.gameConfig.CustomAiProfiles(displayName, data.items) -- in place
WG.Chobby.Configuration.gameConfig.CustomAiProfiles(shortName, data.items) -- in place
return
end
end
Expand Down

0 comments on commit aab8ab8

Please sign in to comment.