changed get_active_teams output
parent
0e82fe2f40
commit
e4025ac7a2
2
DOCS.md
2
DOCS.md
|
@ -241,7 +241,7 @@ Executioner can be passed to tell who removed the player. By default, this happe
|
|||
* `arena_lib.get_players_in_game()`: returns all the players playing in whatever arena of whatever minigame
|
||||
* `arena_lib.get_players_in_minigame(mod, <to_player>)`: returns a table containing as index either the names of all the players inside the specified minigame (`mod`) or, if `to_player` is `true`, the players themselves
|
||||
* `arena_lib.get_players_in_team(arena, team_ID, <to_player>)`: returns a table containing as index either the names of the players inside the specified team or, if `to_player` is `true`, the players themselves
|
||||
* `arena_lib.get_active_teams(arena)`: returns a table like `arena.teams`, but containing only non empty ones
|
||||
* `arena_lib.get_active_teams(arena)`: returns an ordered table having as values the ID of teams that are not empty
|
||||
* `arena_lib.get_player_in_edit_mode(arena_name)`: returns the name of the player who's editing `arena_name`, if there is any
|
||||
|
||||
### 1.10 Things you don't want to do with a light heart
|
||||
|
|
4
api.lua
4
api.lua
|
@ -1724,9 +1724,9 @@ function arena_lib.get_active_teams(arena)
|
|||
|
||||
local active_teams = {}
|
||||
|
||||
for ID, t_stats in pairs(arena.teams) do
|
||||
for ID, _ in pairs(arena.teams) do
|
||||
if arena.players_amount_per_team[ID] > 0 then
|
||||
active_teams[ID] = t_stats
|
||||
active_teams[#active_teams + 1] = ID
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue