22 #include <yaml-cpp/yaml.h> 41 std::vector<MovingTarget*> _followers;
48 virtual void load(
const YAML::Node& node);
50 virtual YAML::Node
save()
const;
54 virtual std::string
getType()
const = 0;
70 void setName(
const std::string &newName);
virtual YAML::Node save() const
Saves the target to YAML.
Definition: Target.cpp:66
std::vector< Craft * > getCraftFollowers() const
Gets the target's craft followers.
Definition: Target.cpp:219
void setName(const std::string &newName)
Sets the target's name.
Definition: Target.cpp:180
virtual std::string getType() const =0
Gets the target's type.
double getDistance(const Target *target) const
Gets the distance to another target.
Definition: Target.cpp:239
std::vector< MovingTarget * > * getFollowers()
Gets the target's followers.
Definition: Target.cpp:209
Contains strings used throughout the game for localization.
Definition: Language.h:39
void setLatitude(double lat)
Sets the target's latitude.
Definition: Target.cpp:129
double getLatitude() const
Gets the target's latitude.
Definition: Target.cpp:120
YAML::Node saveId() const
Saves the target's ID to YAML.
Definition: Target.cpp:82
int getId() const
Gets the target's ID.
Definition: Target.cpp:149
double getLongitude() const
Gets the target's longitude.
Definition: Target.cpp:96
virtual std::string getDefaultName(Language *lang) const
Gets the target's default name.
Definition: Target.cpp:190
virtual std::string getMarkerName() const
Gets the target's marker name.
Definition: Target.cpp:199
virtual std::string getName(Language *lang) const
Gets the target's name.
Definition: Target.cpp:169
void setId(int id)
Sets the target's ID.
Definition: Target.cpp:158
void setLongitude(double lon)
Sets the target's longitude.
Definition: Target.cpp:105
virtual void load(const YAML::Node &node)
Loads the target from YAML.
Definition: Target.cpp:51
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:35
Target()
Creates a target.
Definition: Target.cpp:31
Definition: BaseInfoState.cpp:40
virtual ~Target()
Cleans up the target.
Definition: Target.cpp:38
virtual int getMarker() const =0
Gets the target's marker sprite.