The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
lua_unit_attacks.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2009 - 2025
3 by Guillaume Melquiond <guillaume.melquiond@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
18#include <string>
19
20#include "units/attack_type.hpp"
21
22struct lua_State;
23
24void push_unit_attacks_table(lua_State* L, int idx);
25
26namespace lua_units {
27 std::string register_attacks_metatables(lua_State* L);
28}
29
30void luaW_pushweapon(lua_State* L, const attack_ptr& weapon);
31void luaW_pushweapon(lua_State* L, const const_attack_ptr& weapon);
32const_attack_ptr luaW_toweapon(lua_State* L, int idx);
33attack_type& luaW_checkweapon(lua_State* L, int idx);
34int intf_create_attack(lua_State* L);
attack_type & luaW_checkweapon(lua_State *L, int idx)
int intf_create_attack(lua_State *L)
const_attack_ptr luaW_toweapon(lua_State *L, int idx)
void luaW_pushweapon(lua_State *L, const attack_ptr &weapon)
void push_unit_attacks_table(lua_State *L, int idx)
std::string register_attacks_metatables(lua_State *L)
std::shared_ptr< const attack_type > const_attack_ptr
Definition ptr.hpp:34
std::shared_ptr< attack_type > attack_ptr
Definition ptr.hpp:33