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...
 
YAML::Node saveId () const
 Saves the mission site's ID to YAML. More...
 
const RuleAlienMissiongetRules () const
 Gets the mission site's ruleset. More...
 
const AlienDeploymentgetDeployment () const
 Gets the mission site's deployment. More...
 
int getId () const
 Gets the mission site's ID. More...
 
void setId (int id)
 Sets the mission site's ID. More...
 
std::wstring getDefaultName (Language *lang) const
 Gets the mission site's default name. More...
 
int getMarker () const
 Gets the mission site's marker. 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...
 
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...
 
virtual std::wstring getName (Language *lang) const
 Gets the target's name. More...
 
void setName (const std::wstring &newName)
 Sets the target's name. More...
 
std::vector< Target * > * getFollowers ()
 Gets the target's 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.

◆ getDefaultName()

std::wstring OpenXcom::MissionSite::getDefaultName ( Language lang) const
virtual

Gets the mission site's default name.

Returns the mission site's unique default name.

Parameters
langLanguage to get strings from.
Returns
Full name.

Implements OpenXcom::Target.

◆ 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.

◆ getId()

int OpenXcom::MissionSite::getId ( ) const

Gets the mission site's ID.

Returns the mission site's unique ID.

Returns
Unique ID.

◆ getMarker()

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

Gets the mission site's marker.

Returns the globe marker for the mission site.

Returns
Marker sprite, -1 if none.

Implements 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.

◆ 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.

◆ saveId()

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

Saves the mission site's ID to YAML.

Saves the mission site's unique identifiers 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.

◆ setId()

void OpenXcom::MissionSite::setId ( int  id)

Sets the mission site's ID.

Changes the mission site's unique ID.

Parameters
idUnique ID.

◆ 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: