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

Represents a specific type of Alien Deployment. More...

#include <AlienDeployment.h>

Public Member Functions

 AlienDeployment (const std::string &type)
 Creates a blank Alien Deployment ruleset. More...
 
 ~AlienDeployment ()
 Cleans up the Alien Deployment ruleset.
 
void load (const YAML::Node &node, Mod *mod)
 Loads Alien Deployment data from YAML. More...
 
std::string getType () const
 Gets the Alien Deployment's type. More...
 
std::vector< DeploymentData > * getDeploymentData ()
 Gets a pointer to the data. More...
 
void getDimensions (int *width, int *length, int *height) const
 Gets dimensions. More...
 
int getCivilians () const
 Gets civilians. More...
 
std::vector< std::string > getTerrains () const
 Gets the terrain for battlescape generation. More...
 
int getShade () const
 Gets the shade level for battlescape generation. More...
 
std::string getNextStage () const
 Gets the next stage of the mission. More...
 
std::string getRace () const
 Gets the race to use in the next stage. More...
 
std::string getScript () const
 Gets the script to use for this deployment. More...
 
bool isFinalDestination () const
 Checks if this is the destination for the final mission (mars stage 1, t'leth stage 1). More...
 
std::string getWinCutscene () const
 Gets the cutscene to play when this mission is won. More...
 
std::string getLoseCutscene () const
 Gets the cutscene to play when this mission is lost. More...
 
std::string getAbortCutscene () const
 Gets the cutscene to play when this mission is aborted. More...
 
std::string getAlertMessage () const
 Gets the alert message for this mission type. More...
 
std::string getAlertBackground () const
 Gets the alert background for this mission type. More...
 
BriefingData getBriefingData () const
 Gets the briefing data for this mission type. More...
 
std::string getMarkerName () const
 Gets the marker name for this mission. More...
 
int getMarkerIcon () const
 Gets the marker icon for this mission. More...
 
int getDurationMin () const
 Gets the minimum duration for this mission. More...
 
int getDurationMax () const
 Gets the maximum duration for this mission. More...
 
std::vector< std::string > & getMusic ()
 Gets the list of music to pick from. More...
 
int getMinDepth () const
 Gets the minimum depth. More...
 
int getMaxDepth () const
 Gets the maximum depth. More...
 
int getMinSiteDepth () const
 Gets the minimum site depth.
 
int getMaxSiteDepth () const
 Gets the maximum site depth.
 
int getObjectiveType () const
 Gets the target type for this mission. More...
 
int getObjectivesRequired () const
 Gets a fixed number of objectives requires (if any). More...
 
std::string getObjectivePopup () const
 Gets the string to pop up when the mission objectives are complete. More...
 
bool getObjectiveCompleteInfo (std::string &text, int &score) const
 Fills out the objective complete info. More...
 
bool getObjectiveFailedInfo (std::string &text, int &score) const
 Fills out the objective failed info. More...
 
int getDespawnPenalty () const
 Gets the score penalty XCom receives for ignoring this site. More...
 
int getPoints () const
 Gets the (half hourly) score penalty XCom receives for this site existing. More...
 
int getTurnLimit () const
 Gets the turn limit for this deployment. More...
 
ChronoTrigger getChronoTrigger () const
 Gets the action that triggers when the timer runs out. More...
 
int getCheatTurn () const
 Gets which turn the aliens start cheating on. More...
 
bool isAlienBase () const
 Gets whether or not this is an alien base (purely for new battle mode)
 

Detailed Description

Represents a specific type of Alien Deployment.

Contains constant info about a Alien Deployment like the number of aliens for each alien type and what items they carry (itemset depends on alien technology advancement level 0, 1 or 2).

Constructor & Destructor Documentation

◆ AlienDeployment()

OpenXcom::AlienDeployment::AlienDeployment ( const std::string &  type)

Creates a blank Alien Deployment ruleset.

Creates a blank ruleset for a certain type of deployment data.

Parameters
typeString defining the type.

Member Function Documentation

◆ getAbortCutscene()

std::string OpenXcom::AlienDeployment::getAbortCutscene ( ) const

Gets the cutscene to play when this mission is aborted.

Gets the cutscene to play when the mission is aborted.

Returns
the cutscene to play when the mission is aborted.

◆ getAlertBackground()

std::string OpenXcom::AlienDeployment::getAlertBackground ( ) const

Gets the alert background for this mission type.

Gets the alert background displayed when this mission spawns.

Returns
Sprite ID for the background.

◆ getAlertMessage()

std::string OpenXcom::AlienDeployment::getAlertMessage ( ) const

Gets the alert message for this mission type.

Gets the alert message displayed when this mission spawns.

Returns
String ID for the message.

◆ getBriefingData()

BriefingData OpenXcom::AlienDeployment::getBriefingData ( ) const

Gets the briefing data for this mission type.

Returns
data for the briefing window to use.

◆ getCheatTurn()

int OpenXcom::AlienDeployment::getCheatTurn ( ) const

Gets which turn the aliens start cheating on.

Gets the turn at which the players become exposed to the AI.

Returns
the turn to start cheating.

◆ getChronoTrigger()

ChronoTrigger OpenXcom::AlienDeployment::getChronoTrigger ( ) const

Gets the action that triggers when the timer runs out.

Gets the action type to perform when the timer expires.

Returns
the action type to perform.

◆ getCivilians()

int OpenXcom::AlienDeployment::getCivilians ( ) const

Gets civilians.

Gets the number of civilians.

Returns
The number of civilians.

◆ getDeploymentData()

std::vector< DeploymentData > * OpenXcom::AlienDeployment::getDeploymentData ( )

Gets a pointer to the data.

Returns
Pointer to the data.

◆ getDespawnPenalty()

int OpenXcom::AlienDeployment::getDespawnPenalty ( ) const

Gets the score penalty XCom receives for ignoring this site.

Gets the score penalty XCom receives for letting this mission despawn.

Returns
the score for letting this site despawn.

◆ getDimensions()

void OpenXcom::AlienDeployment::getDimensions ( int *  width,
int *  length,
int *  height 
) const

Gets dimensions.

Parameters
widthWidth.
lengthLength.
heightHeight.

◆ getDurationMax()

int OpenXcom::AlienDeployment::getDurationMax ( ) const

Gets the maximum duration for this mission.

Returns the maximum duration for this mission type.

Returns
Duration in hours.

◆ getDurationMin()

int OpenXcom::AlienDeployment::getDurationMin ( ) const

Gets the minimum duration for this mission.

Returns the minimum duration for this mission type.

Returns
Duration in hours.

◆ getLoseCutscene()

std::string OpenXcom::AlienDeployment::getLoseCutscene ( ) const

Gets the cutscene to play when this mission is lost.

Gets the cutscene to play when the mission is lost.

Returns
the cutscene to play when the mission is lost.

◆ getMarkerIcon()

int OpenXcom::AlienDeployment::getMarkerIcon ( ) const

Gets the marker icon for this mission.

Returns the globe marker icon for this mission.

Returns
Marker sprite, -1 if none.

◆ getMarkerName()

std::string OpenXcom::AlienDeployment::getMarkerName ( ) const

Gets the marker name for this mission.

Returns the globe marker name for this mission.

Returns
String ID for marker name.

◆ getMaxDepth()

int OpenXcom::AlienDeployment::getMaxDepth ( ) const

Gets the maximum depth.

Gets The maximum depth for this deployment.

Returns
The maximum depth.

◆ getMinDepth()

int OpenXcom::AlienDeployment::getMinDepth ( ) const

Gets the minimum depth.

Gets The minimum depth for this deployment.

Returns
The minimum depth.

◆ getMusic()

std::vector< std::string > & OpenXcom::AlienDeployment::getMusic ( )

Gets the list of music to pick from.

Gets The list of musics this deployment has to choose from.

Returns
The list of track names.

◆ getNextStage()

std::string OpenXcom::AlienDeployment::getNextStage ( ) const

Gets the next stage of the mission.

Returns
The next stage of the mission.

◆ getObjectiveCompleteInfo()

bool OpenXcom::AlienDeployment::getObjectiveCompleteInfo ( std::string &  text,
int &  score 
) const

Fills out the objective complete info.

Fills out the variables associated with mission success, and returns if those variables actually contain anything.

Parameters
&texta reference to the text we wish to alter.
&scorea reference to the score we wish to alter.
Returns
if there is anything worthwhile processing.

◆ getObjectiveFailedInfo()

bool OpenXcom::AlienDeployment::getObjectiveFailedInfo ( std::string &  text,
int &  score 
) const

Fills out the objective failed info.

Fills out the variables associated with mission failure, and returns if those variables actually contain anything.

Parameters
&texta reference to the text we wish to alter.
&scorea reference to the score we wish to alter.
Returns
if there is anything worthwhile processing.

◆ getObjectivePopup()

std::string OpenXcom::AlienDeployment::getObjectivePopup ( ) const

Gets the string to pop up when the mission objectives are complete.

Gets the string name for the popup to splash when the objective conditions are met.

Returns
the string to pop up.

◆ getObjectivesRequired()

int OpenXcom::AlienDeployment::getObjectivesRequired ( ) const

Gets a fixed number of objectives requires (if any).

Gets the number of objectives required by this mission.

Returns
the number of objectives required.

◆ getObjectiveType()

int OpenXcom::AlienDeployment::getObjectiveType ( ) const

Gets the target type for this mission.

Gets the target type for this mission (ie: alien control consoles and synonium devices).

Returns
the target type for this mission.

◆ getPoints()

int OpenXcom::AlienDeployment::getPoints ( ) const

Gets the (half hourly) score penalty XCom receives for this site existing.

Gets the score penalty against XCom for this site existing.

This penalty is applied half-hourly for sites and daily for bases.

Returns
the number of points the aliens get per half hour.

◆ getRace()

std::string OpenXcom::AlienDeployment::getRace ( ) const

Gets the race to use in the next stage.

Gets the race to use on the next stage of the mission.

Returns
The race for the next stage of the mission.

◆ getScript()

std::string OpenXcom::AlienDeployment::getScript ( ) const

Gets the script to use for this deployment.

Gets the script to use to generate a mission of this type.

Returns
The script to use to generate a mission of this type.

◆ getShade()

int OpenXcom::AlienDeployment::getShade ( ) const

Gets the shade level for battlescape generation.

Returns
The shade level.

◆ getTerrains()

std::vector< std::string > OpenXcom::AlienDeployment::getTerrains ( ) const

Gets the terrain for battlescape generation.

Returns
The terrain.

◆ getTurnLimit()

int OpenXcom::AlienDeployment::getTurnLimit ( ) const

Gets the turn limit for this deployment.

Gets the maximum number of turns we have before this mission ends.

Returns
the turn limit.

◆ getType()

std::string OpenXcom::AlienDeployment::getType ( ) const

Gets the Alien Deployment's type.

Returns the language string that names this deployment.

Each deployment type has a unique name.

Returns
Deployment name.

◆ getWinCutscene()

std::string OpenXcom::AlienDeployment::getWinCutscene ( ) const

Gets the cutscene to play when this mission is won.

Gets the cutscene to play when the mission is won.

Returns
the cutscene to play when the mission is won.

◆ isFinalDestination()

bool OpenXcom::AlienDeployment::isFinalDestination ( ) const

Checks if this is the destination for the final mission (mars stage 1, t'leth stage 1).

Gets if winning this mission completes the game.

Returns
if winning this mission completes the game.

◆ load()

void OpenXcom::AlienDeployment::load ( const YAML::Node &  node,
Mod mod 
)

Loads Alien Deployment data from YAML.

Loads the Deployment from a YAML file.

Parameters
nodeYAML node.
modMod for the deployment.

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