The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Namespaces | Functions
lua_team.hpp File Reference
#include <string>
Include dependency graph for lua_team.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  lua_team
 This namespace contains bindings for lua to hold a pointer to a team, and to access and modify it.
 

Functions

std::string lua_team::register_metatable (lua_State *L)
 
void luaW_pushteam (lua_State *, team &)
 Create a full userdata containing a pointer to the team.
 
team * luaW_toteam (lua_State *, int)
 Test if the top stack element is a team, and if so, return it.
 
team & luaW_checkteam (lua_State *, int)
 Test if the top stack element is a team, and if not, error.
 
team & luaW_checkteam (lua_State *L, int idx, class game_board &board)
 Get a team either from a direct userdata or from a side number.
 

Function Documentation

◆ luaW_checkteam() [1/2]

team & luaW_checkteam ( lua_State *  L,
int  idx 
)

◆ luaW_checkteam() [2/2]

team & luaW_checkteam ( lua_State *  L,
int  idx,
class game_board &  board 
)

Get a team either from a direct userdata or from a side number.

Definition at line 547 of file lua_team.cpp.

References game_board::get_team(), display_context::has_team(), and Team.

◆ luaW_pushteam()

void luaW_pushteam ( lua_State *  L,
team &  tm 
)

Create a full userdata containing a pointer to the team.

Definition at line 535 of file lua_team.cpp.

References t, and Team.

Referenced by game_lua_kernel::intf_get_side(), game_lua_kernel::intf_get_sides(), luaW_pushfaivariant(), and game_lua_kernel::run_filter().

◆ luaW_toteam()

team * luaW_toteam ( lua_State *  L,
int  idx 
)