38 static const char *
Team =
"side";
83 if (strcmp(m,
"recruit") == 0) {
84 std::set<std::string>
const &recruits = t.
recruits();
131 if (strcmp(m,
"carryover_bonus") == 0) {
136 if (strcmp(m,
"recruit") == 0) {
139 for (
int i = 1;; ++
i) {
148 std::string err_msg =
"unknown modifiable property of side: ";
159 static luaL_Reg const callbacks[] = {
169 return "Adding getside metatable...\n";
const t_string & faction_name() const
#define modify_bool_attrib(name, accessor)
LUA_API void lua_rawgeti(lua_State *L, int idx, int n)
LUALIB_API void * luaL_checkudata(lua_State *L, int ud, const char *tname)
LUA_API void lua_createtable(lua_State *L, int narray, int nrec)
const std::string & flag() const
const std::string & color() const
#define return_tstring_attrib(name, accessor)
void set_carryover_add(bool value)
void luaW_pushteam(lua_State *L, team &tm)
void set_objectives(const t_string &new_objectives, bool silently=false)
const std::set< std::string > & recruits() const
This namespace contains bindings for lua to hold a pointer to a team, and to access and modify it...
double carryover_bonus() const
const t_string & objectives() const
#define return_string_attrib(name, accessor)
void set_recall_cost(int cost)
bool objectives_changed() const
DEFEAT_CONDITION defeat_condition() const
void set_persistent(bool value)
LUALIB_API void luaL_setmetatable(lua_State *L, const char *tname)
void set_defeat_condition_string(const std::string &value)
sets the defeat condition if
void add_recruit(const std::string &)
void set_hidden(bool value)
void set_carryover_percentage(int value)
LUA_API void * lua_newuserdata(lua_State *L, size_t size)
static const char * Team
Implementation for a lua reference to a team, used by the wesnoth in-game sides table.
void set_scroll_to_leader(bool value)
SHARE_VISION share_vision() const
std::string register_metatable(lua_State *L)
This class stores all the data for a single 'side' (in game nomenclature).
#define modify_tstring_attrib(name, accessor)
void set_carryover_bonus(double value)
const std::string & flag_icon() const
#define modify_string_attrib(name, accessor)
#define return_int_attrib(name, accessor)
int village_support() const
const t_string & user_team_name() const
int carryover_percentage() const
GLsizei const GLfloat * value
void set_lost(bool value=true)
void write(config &cfg) const
const std::string & team_name() const
void set_village_support(int support)
LUALIB_API lua_Number luaL_checknumber(lua_State *L, int narg)
const std::string & save_id() const
void set_village_gold(int income)
#define return_cfg_attrib(name, accessor)
LUALIB_API int luaL_newmetatable(lua_State *L, const char *tname)
bool get_scroll_to_leader() const
void set_gold(int amount)
const std::string & faction() const
static int impl_side_set(lua_State *L)
Sets some data on a side (__newindex metamethod).
LUALIB_API int luaL_argerror(lua_State *L, int narg, const char *extramsg)
#define lua_tostring(L, i)
LUA_API void lua_rawseti(lua_State *L, int idx, int n)
void set_objectives_changed(bool c=true) const
GLdouble GLdouble GLdouble r
void change_controller_by_wml(const std::string &new_controller)
CONTROLLER controller() const
#define return_bool_attrib(name, accessor)
#define lua_istable(L, n)
#define return_float_attrib(name, accessor)
static int impl_side_get(lua_State *L)
Gets some data on a side (__index metamethod).
void change_team(const std::string &name, const t_string &user_name)
bool carryover_add() const
void set_base_income(int amount)
void set_recruits(const std::set< std::string > &recruits)
LUALIB_API void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup)
GLsizei const GLcharARB ** string
LUA_API const char * lua_pushstring(lua_State *L, const char *s)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
#define modify_int_attrib(name, accessor)
void set_color(const std::string &color)
#define return_cstring_attrib(name, accessor)
#define luaL_checkstring(L, n)