Skip to content

Commit

Permalink
feat(squad): Enable Auto Squad on dota2 (#5101)
Browse files Browse the repository at this point in the history
* feat(squad) Allow dota2 to use ActiveOrganizationAuto

* linelength
  • Loading branch information
mbergen authored Nov 18, 2024
1 parent abcb9bc commit 371aeca
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/squad/wikis/dota2/squad_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 371aeca

Please sign in to comment.