| 1777 | |
| 1778 | |
| 1779 | int LuaCallOuts::GetTeamCount(lua_State* L) { |
| 1780 | const TeamColor teamID = ParseTeam(L, 1); |
| 1781 | if (teamID == NoTeam) { |
| 1782 | return luaL_pushnil(L); |
| 1783 | } |
| 1784 | World* world = World::getWorld(); |
| 1785 | if (world == NULL) { |
| 1786 | return luaL_pushnil(L); |
| 1787 | } |
| 1788 | if ((teamID < 0) || (teamID >= NumTeams)) { |
| 1789 | return luaL_pushnil(L); // not safe for world->getTeam() |
| 1790 | } |
| 1791 | const Team& team = world->getTeam(teamID); |
| 1792 | lua_pushinteger(L, team.size); |
| 1793 | return 1; |
| 1794 | } |
| 1795 | |
| 1796 | |
| 1797 | int LuaCallOuts::GetTeamScore(lua_State* L) { |
nothing calls this directly
no test coverage detected