OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::MissionSite Class Reference

Represents an alien mission site on the world. More...

#include <MissionSite.h>

Inheritance diagram for OpenXcom::MissionSite:
OpenXcom::Target

Public Member Functions

 MissionSite (const RuleAlienMission *rules, const AlienDeployment *deployment)
 Creates a mission site. More...
 
 ~MissionSite ()
 Cleans up the mission site.
 
void load (const YAML::Node &node)
 Loads the mission site from YAML. More...
 
YAML::Node save () const
 Saves the mission site to YAML. More...
 
std::string getType () const
 Gets the waypoint's type. More...
 
const RuleAlienMissiongetRules () const
 Gets the mission site's ruleset. More...
 
const AlienDeploymentgetDeployment () const
 Gets the mission site's deployment. More...
 
std::string getMarkerName () const
 Gets the mission site's marker name. More...
 
int getMarker () const
 Gets the mission site's marker sprite. More...
 
size_t getSecondsRemaining () const
 Gets the seconds until this mission site expires. More...
 
void setSecondsRemaining (size_t seconds)
 Sets the seconds until this mission site expires. More...
 
std::string getAlienRace () const
 Gets the mission site's alien race. More...
 
void setAlienRace (const std::string &race)
 Sets the mission site's alien race. More...
 
void setInBattlescape (bool inbattle)
 Sets the mission site's battlescape status. More...
 
bool isInBattlescape () const
 Gets if the mission site is in battlescape. More...
 
int getTexture () const
 Gets the mission site's texture. More...
 
void setTexture (int texture)
 Sets the mission site's texture. More...
 
std::string getCity () const
 Gets the mission site's city. More...
 
void setCity (const std::string &city)
 Sets the mission site's city. More...
 
bool getDetected () const
 Gets the mission site's detection state. More...
 
void setDetected (bool detected)
 Sets the mission site's detection state. More...
 
- Public Member Functions inherited from OpenXcom::Target
virtual ~Target ()
 Cleans up the target. More...
 
YAML::Node saveId () const
 Saves the target's ID to YAML. More...
 
double getLongitude () const
 Gets the target's longitude. More...
 
void setLongitude (double lon)
 Sets the target's longitude. More...
 
double getLatitude () const
 Gets the target's latitude. More...
 
void setLatitude (double lat)
 Sets the target's latitude. More...
 
int getId () const
 Gets the target's ID. More...
 
void setId (int id)
 Sets the target's ID. More...
 
virtual std::string getName (Language *lang) const
 Gets the target's name. More...
 
void setName (const std::string &newName)
 Sets the target's name. More...
 
virtual std::string getDefaultName (Language *lang) const
 Gets the target's default name. More...
 
std::vector< MovingTarget * > * getFollowers ()
 Gets the target's followers. More...
 
std::vector< Craft * > getCraftFollowers () const
 Gets the target's craft followers. More...
 
double getDistance (const Target *target) const
 Gets the distance to another target. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OpenXcom::Target
 Target ()
 Creates a target. More...
 

Detailed Description

Represents an alien mission site on the world.

Constructor & Destructor Documentation

◆ MissionSite()

OpenXcom::MissionSite::MissionSite ( const RuleAlienMission rules,
const AlienDeployment deployment 
)

Creates a mission site.

Initializes a mission site.

Member Function Documentation

◆ getAlienRace()

std::string OpenXcom::MissionSite::getAlienRace ( ) const

Gets the mission site's alien race.

Returns the alien race currently residing in the mission site.

Returns
Alien race.

◆ getCity()

std::string OpenXcom::MissionSite::getCity ( ) const

Gets the mission site's city.

Gets the mission site's associated city, if any.

Returns
String ID for the city, "" if none.

◆ getDeployment()

const AlienDeployment * OpenXcom::MissionSite::getDeployment ( ) const

Gets the mission site's deployment.

Returns the ruleset for the mission's deployment.

Returns
Pointer to deployment rules.

◆ getDetected()

bool OpenXcom::MissionSite::getDetected ( ) const

Gets the mission site's detection state.

Gets the detection state for this mission site.

used for popups of sites spawned directly rather than by UFOs.

Returns
whether or not this site has been detected.

◆ getMarker()

int OpenXcom::MissionSite::getMarker ( ) const
virtual

Gets the mission site's marker sprite.

Returns the globe marker for the mission site.

Returns
Marker sprite, -1 if none.

Implements OpenXcom::Target.

◆ getMarkerName()

std::string OpenXcom::MissionSite::getMarkerName ( ) const
virtual

Gets the mission site's marker name.

Returns the name on the globe for the mission.

Returns
String ID.

Reimplemented from OpenXcom::Target.

◆ getRules()

const RuleAlienMission * OpenXcom::MissionSite::getRules ( ) const

Gets the mission site's ruleset.

Returns the ruleset for the mission's type.

Returns
Pointer to ruleset.

◆ getSecondsRemaining()

size_t OpenXcom::MissionSite::getSecondsRemaining ( ) const

Gets the seconds until this mission site expires.

Returns the number of seconds remaining before the mission site expires.

Returns
Amount of seconds.

◆ getTexture()

int OpenXcom::MissionSite::getTexture ( ) const

Gets the mission site's texture.

Gets the mission site's associated texture.

Returns
Texture ID.

◆ getType()

std::string OpenXcom::MissionSite::getType ( ) const
virtual

Gets the waypoint's type.

Returns the mission's unique type used for savegame purposes.

Returns
ID.

Implements OpenXcom::Target.

◆ isInBattlescape()

bool OpenXcom::MissionSite::isInBattlescape ( ) const

Gets if the mission site is in battlescape.

Gets the mission site's battlescape status.

Returns
Is the mission currently in battle?

◆ load()

void OpenXcom::MissionSite::load ( const YAML::Node &  node)
virtual

Loads the mission site from YAML.

Loads the mission site from a YAML file.

Parameters
nodeYAML node.

Reimplemented from OpenXcom::Target.

◆ save()

YAML::Node OpenXcom::MissionSite::save ( ) const
virtual

Saves the mission site to YAML.

Saves the mission site to a YAML file.

Returns
YAML node.

Reimplemented from OpenXcom::Target.

◆ setAlienRace()

void OpenXcom::MissionSite::setAlienRace ( const std::string &  race)

Sets the mission site's alien race.

Changes the alien race currently residing in the mission site.

Parameters
raceAlien race.

◆ setCity()

void OpenXcom::MissionSite::setCity ( const std::string &  city)

Sets the mission site's city.

Sets the mission site's associated city, if any.

Parameters
cityString ID for the city, "" if none.

◆ setDetected()

void OpenXcom::MissionSite::setDetected ( bool  detected)

Sets the mission site's detection state.

Parameters
detectedwhether we want this site to show on the geoscape or not.

◆ setInBattlescape()

void OpenXcom::MissionSite::setInBattlescape ( bool  inbattle)

Sets the mission site's battlescape status.

Parameters
inbattleTrue if it's in battle, False otherwise.

◆ setSecondsRemaining()

void OpenXcom::MissionSite::setSecondsRemaining ( size_t  seconds)

Sets the seconds until this mission site expires.

Changes the number of seconds before the mission site expires.

Parameters
secondsAmount of seconds.

◆ setTexture()

void OpenXcom::MissionSite::setTexture ( int  texture)

Sets the mission site's texture.

Sets the mission site's associated texture.

Parameters
textureTexture ID.

The documentation for this class was generated from the following files: