35 namespace ai {
class lua_ai_action_handler; }
36 namespace ai {
class lua_ai_context; }
37 namespace ai {
struct target; }
47 virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list);
52 virtual void on_create(std::shared_ptr<ai::lua_ai_context>);
57 virtual std::string
get_id()
const;
58 virtual std::string
get_name()
const;
74 virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list);
90 virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list);
107 virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list);
143 virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list);
144 void on_create(std::shared_ptr<ai::lua_ai_context>);
160 if (goal_factories==
nullptr) {
163 return *goal_factories;
174 get_list().emplace(name,ptr_to_this);
189 goal_ptr a = std::make_shared<GOAL>(context, cfg);
virtual goal_ptr get_new_instance(readonly_context &context, const config &cfg)=0
std::shared_ptr< goal_factory > factory_ptr
std::map< std::string, factory_ptr > factory_map
static factory_map & get_list()
bool is_duplicate(const std::string &name)
goal_factory(const std::string &name)
std::pair< const std::string, factory_ptr > factory_map_pair
bool redeploy(const config &cfg)
virtual config to_config() const
virtual std::string get_engine() const
virtual std::string get_name() const
virtual std::string get_id() const
goal(readonly_context &context, const config &cfg)
virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list)
lua_goal(readonly_context &context, const config &cfg)
std::shared_ptr< lua_ai_action_handler > handler_
virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list)
std::shared_ptr< terrain_filter > filter_ptr_
protect_goal(readonly_context &context, const config &cfg, bool protect_unit)
virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list)
protect_location_goal(readonly_context &context, const config &cfg)
protect_unit_goal(readonly_context &context, const config &cfg)
register_goal_factory(const std::string &name)
virtual goal_ptr get_new_instance(readonly_context &context, const config &cfg)
std::shared_ptr< terrain_filter > filter_ptr_
target_location_goal(readonly_context &context, const config &cfg)
virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list)
virtual void add_targets(std::back_insert_iterator< std::vector< target >> target_list)
target_unit_goal(readonly_context &context, const config &cfg)
A config object defines a single node in a WML file, with access to child nodes.
A component of the AI framework.
Definitions for the interface to Wesnoth Markup Language (WML).
Game information for the AI.
A small explanation about what's going on here: Each action has access to two game_info objects First...
std::shared_ptr< goal > goal_ptr