Freeciv21
Develop your civilization from humble roots to a global empire
freeciv::refuel_destination Class Reference

A path finding destination that accepts any tile where one can refuel or, for units with HP loss, not lose HP. More...

#include <path_finder.h>

+ Inheritance diagram for freeciv::refuel_destination:
+ Collaboration diagram for freeciv::refuel_destination:

Public Member Functions

 refuel_destination (const unit &unit)
 Constructor. More...
 
 ~refuel_destination ()
 Destructor. More...
 
- Public Member Functions inherited from freeciv::destination
virtual ~destination ()
 Destructor. More...
 

Protected Member Functions

bool reached (const detail::vertex &vertex) const override
 Checks if a vertex should be considered as being at the destination. More...
 
- Protected Member Functions inherited from freeciv::destination
virtual path_finder::storage_type::const_iterator find_best (const path_finder::storage_type &map, std::size_t num_waypoints) const
 Returns an iterator to the best vertex that is a destination vertex. More...
 

Private Attributes

unit m_unit
 

Detailed Description

A path finding destination that accepts any tile where one can refuel or, for units with HP loss, not lose HP.

This is any tile for units without fuel or HP loss.

Definition at line 230 of file path_finder.h.

Constructor & Destructor Documentation

◆ refuel_destination()

freeciv::refuel_destination::refuel_destination ( const unit unit)
inlineexplicit

Constructor.

Definition at line 235 of file path_finder.h.

◆ ~refuel_destination()

freeciv::refuel_destination::~refuel_destination ( )
inline

Destructor.

Definition at line 240 of file path_finder.h.

Member Function Documentation

◆ reached()

bool freeciv::refuel_destination::reached ( const detail::vertex vertex) const
overrideprotectedvirtual

Checks if a vertex should be considered as being at the destination.

Implements freeciv::destination.

Definition at line 877 of file path_finder.cpp.

Member Data Documentation

◆ m_unit

unit freeciv::refuel_destination::m_unit
private

Definition at line 246 of file path_finder.h.

Referenced by reached().