The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
lua_race.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2014 - 2025
3 by Chris Beck <render787@gmail.com>
4 Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY.
12
13 See the COPYING file for more details.
14*/
15
16#pragma once
17
18class unit_race;
19struct lua_State;
20
21#include <string>
22
23/**
24 * This namespace contains bindings for lua to hold a pointer to a race,
25 * and to access and modify it.
26 */
27namespace lua_race {
28 std::string register_metatable(lua_State *);
29} //end namespace lua_team
30
31// Create a lua reference to the race.
32void luaW_pushrace(lua_State *, const unit_race &);
33void luaW_pushracetable(lua_State *);
34const unit_race& luaW_checkrace(lua_State*, int);
void luaW_pushrace(lua_State *, const unit_race &)
Definition lua_race.cpp:123
void luaW_pushracetable(lua_State *)
Definition lua_race.cpp:131
const unit_race & luaW_checkrace(lua_State *, int)
Definition lua_race.cpp:144
This namespace contains bindings for lua to hold a pointer to a race, and to access and modify it.
Definition lua_race.cpp:103
std::string register_metatable(lua_State *L)
Definition lua_race.cpp:105