The Battle for Wesnoth  1.19.5+dev
aspect_advancements.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 - 2024
3  by Felix Bauer <fehlxb+wesnoth@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 #include <vector>
20 
21 #include "units/map.hpp"
22 
23 struct lua_State;
24 
25 namespace ai {
26 
28 {
29 public:
31  unit_advancements_aspect(lua_State* L, int n);
32  unit_advancements_aspect(const std::string& val);
33  const std::vector<std::string> get_advancements(const unit_map::const_iterator& unit) const;
34  virtual ~unit_advancements_aspect();
35  const std::string get_value() const;
36 
37 private:
38  std::string val_;
39  lua_State * L_;
40  int ref_;
41 };
42 }
const std::vector< std::string > get_advancements(const unit_map::const_iterator &unit) const
const std::string get_value() const
This class represents a single unit of a specific type.
Definition: unit.hpp:133
A small explanation about what's going on here: Each action has access to two game_info objects First...
Definition: actions.cpp:59
static map_location::direction n