#include "scripting/lua_race.hpp"
#include "units/race.hpp"
#include "scripting/lua_common.hpp"
#include "units/types.hpp"
#include <string>
#include <string.h>
#include "lua/lua.h"
#include "lua/lauxlib.h"
Go to the source code of this file.
Namespaces | |
lua_race | |
This namespace contains bindings for lua to hold a pointer to a race, and to access and modify it. | |
Functions | |
static int | impl_race_get (lua_State *L) |
Gets some data on a race (__index metamethod). More... | |
std::string | lua_race::register_metatable (lua_State *L) |
void | luaW_pushrace (lua_State *L, const unit_race &race) |
void | luaW_pushracetable (lua_State *L) |
Variables | |
static const char * | Race = "race" |
Implementation for a lua reference to a race, used by the wesnoth in-game races table. More... | |
static const char * | Gen = "name generator" |
Gets some data on a race (__index metamethod).
Definition at line 42 of file lua_race.cpp.
References unit_race::additional_traits(), unit_race::description(), unit_race::FEMALE, unit_type_data::find_race(), Gen, unit_race::generator(), unit_race::get_cfg(), lua_newtable, lua_newuserdata(), lua_pushlstring(), lua_pushstring(), lua_rawget(), lua_rawset(), lua_setmetatable(), lua_tostring, luaL_argerror(), luaL_checkstring, luaL_getmetatable, luaW_pushconfig(), unit_race::MALE, unit_race::name(), unit_race::num_traits(), unit_race::plural_name(), font::race, return_bool_attrib, return_cfgref_attrib, return_int_attrib, return_string_attrib, return_tstring_attrib, unit_type_data::traits(), unit_race::undead_variation(), unit_types, and unit_race::uses_global_traits().
Referenced by lua_race::register_metatable().
Definition at line 113 of file lua_race.cpp.
References unit_race::id(), lua_createtable(), lua_pushstring(), lua_setfield(), luaL_setmetatable(), and Race.
Referenced by luaW_pushracetable().
Definition at line 121 of file lua_race.cpp.
References lua_createtable(), lua_setfield(), luaW_pushrace(), font::race, unit_type_data::races(), and unit_types.
Referenced by game_lua_kernel::initialize().
|
static |
Definition at line 34 of file lua_race.cpp.
Referenced by impl_race_get().
|
static |
Implementation for a lua reference to a race, used by the wesnoth in-game races table.
Definition at line 33 of file lua_race.cpp.
Referenced by luaW_pushrace(), and lua_race::register_metatable().