From 371aeca7e207ee9091c52bf5c7de44dd67c4254d Mon Sep 17 00:00:00 2001 From: mbergen Date: Mon, 18 Nov 2024 10:11:47 +0100 Subject: [PATCH] feat(squad): Enable Auto Squad on dota2 (#5101) * feat(squad) Allow dota2 to use ActiveOrganizationAuto * linelength --- components/squad/wikis/dota2/squad_custom.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/components/squad/wikis/dota2/squad_custom.lua b/components/squad/wikis/dota2/squad_custom.lua index d870e547d5f..acdfecb29c9 100644 --- a/components/squad/wikis/dota2/squad_custom.lua +++ b/components/squad/wikis/dota2/squad_custom.lua @@ -59,6 +59,22 @@ function CustomSquad.run(frame) } end +---@param playerList table[] +---@param squadStatus integer +---@param squadType SquadType +---@param customTitle string? +---@return Widget +function CustomSquad.runAuto(playerList, squadStatus, squadType, customTitle) + return SquadUtils.defaultRunAuto( + playerList, + squadStatus, + squadType, + Squad, + SquadUtils.defaultRow(SquadRow), + customTitle + ) +end + function CustomSquad._playerRow(person, squadStatus, squadType) local squadPerson = SquadUtils.readSquadPersonArgs(Table.merge(person, {status = squadStatus, type = squadType})) squadPerson.extradata.activeteam = person.activeteam