The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Functions | Variables
lua_unit_type.cpp File Reference
#include "scripting/lua_unit_type.hpp"
#include "scripting/lua_common.hpp"
#include "scripting/push_check.hpp"
#include "units/types.hpp"
#include <string>
#include <string.h>
#include "lua/lua.h"
#include "lua/lauxlib.h"
Include dependency graph for lua_unit_type.cpp:

Go to the source code of this file.

Namespaces

 lua_unit_type
 This namespace contains bindings for lua to hold a reference to a unit type and access its stats.
 

Functions

static int impl_unit_type_get (lua_State *L)
 Gets some data on a unit type (__index metamethod). More...
 
std::string lua_unit_type::register_metatable (lua_State *L)
 
void luaW_pushunittype (lua_State *L, const std::string &id)
 Create a lua object containing a reference to a unittype, and a metatable to access the properties. More...
 

Variables

static const char * UnitType = "unit type"
 Implementation for a lua reference to a unit_type. More...
 

Function Documentation

static int impl_unit_type_get ( lua_State L)
static
void luaW_pushunittype ( lua_State ,
const std::string  
)

Create a lua object containing a reference to a unittype, and a metatable to access the properties.

Definition at line 102 of file lua_unit_type.cpp.

References lua_createtable(), lua_pushstring(), lua_setfield(), luaL_setmetatable(), and UnitType.

Referenced by game_lua_kernel::initialize().

Variable Documentation

const char* UnitType = "unit type"
static

Implementation for a lua reference to a unit_type.

Definition at line 32 of file lua_unit_type.cpp.

Referenced by luaW_pushunittype(), and lua_unit_type::register_metatable().