This is a feature request.
It would make using the Lua API much less a pain in the ass if there are some
helper functions regarding team and clan query functions.
GetTeamNames()
Returns a table of team names of currently existing teams. This table (and the
other tables I propose) should use the “standard format”, which is goes
like this:
{[1]="Team", [2]="Another Team", [3]="Great Team" --[[ and so on]] }
This function will be useful for loops and stuff.
GetTeamClan(teamName)
- teamName: a name of a team
Returns the clan ID of the clan to which the team belongs to.
GetClanTeamNames(clanID)
- clanID: The ID of a clan
Returns a table containing the names of all (currently existing) teams
belonging to this clan.
I am not sure if the following functions are really needed, but they may become
handy in future (feel free to ignore them if you don’t think they are
neccessary):
GetTeamIdByName(teamName)
- teamName: a name of a team
Returns the internal ID of the given team
GetTeamNameById(teamID)
- teamID: an ID of a team
Returns the name of the given team.
Theoretically, most of this information can be obtained by an ugly workaround
which involves using trackers. Implementing this is not urgent. But it would
make for much cleaner and easier code if the team names can be queried directly.
Original issue reported on code.google.com by almikes@aol.com on 23 Nov 2014 at 8:07
Original issue reported on code.google.com by
almikes@aol.com
on 23 Nov 2014 at 8:07