1 /* 2 Copyright (C) 2009 - 2018 by Guillaume Melquiond <guillaume.melquiond@gmail.com> 3 Part of the Battle for Wesnoth Project https://www.wesnoth.org/ 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY. 11 12 See the COPYING file for more details. 13 */ 14 15 #pragma once 16 17 #include <string> 18 19 #include "units/attack_type.hpp" 20 21 struct lua_State; 22 class lua_unit; 23 24 void push_unit_attacks_table(lua_State* L, int idx); 25 26 namespace lua_units { 27 std::string register_attacks_metatables(lua_State* L); 28 } 29 30 void luaW_pushweapon(lua_State* L, attack_ptr weapon); 31 void luaW_pushweapon(lua_State* L, const_attack_ptr weapon); 32 const_attack_ptr luaW_toweapon(lua_State* L, int idx); 33 attack_type& luaW_checkweapon(lua_State* L, int idx); 34