UFO: Alien Invasion
Loading...
Searching...
No Matches
cp_mission_supply.cpp File Reference

Campaign mission. More...

#include "../../../DateTime.h"
#include "../../../cl_shared.h"
#include "../cp_campaign.h"
#include "../cp_alienbase.h"
#include "../cp_ufo.h"
#include "../cp_missions.h"
#include "../cp_time.h"
#include "../cp_xvi.h"
#include "../cp_alien_interest.h"
#include "cp_mission_supply.h"
Include dependency graph for cp_mission_supply.cpp:

Go to the source code of this file.

Functions

void CP_SupplyMissionIsSuccess (mission_t *mission)
 Supply mission is over and is a success (from an alien point of view): change interest values.
void CP_SupplyMissionIsFailure (mission_t *mission)
 Supply mission is over and is a failure (from an alien point of view): change interest values.
static void CP_SupplyMissionLeave (mission_t *mission)
 Supply mission ends: UFO leave earth.
static void CP_SupplySetStayAtBase (mission_t *mission)
 UFO arrived on new base destination: Supply base.
static void CP_SupplyGoToBase (mission_t *mission)
 Go to base position.
static void CP_SupplyMissionCreate (mission_t *mission)
 Supply mission begins: UFO arrive on earth.
void CP_SupplyMissionNextStage (mission_t *mission)
 Determine what action should be performed when a Supply mission stage ends.

Detailed Description

Campaign mission.

Definition in file cp_mission_supply.cpp.

Function Documentation

◆ CP_SupplyGoToBase()

void CP_SupplyGoToBase ( mission_t * mission)
static

◆ CP_SupplyMissionCreate()

void CP_SupplyMissionCreate ( mission_t * mission)
static

◆ CP_SupplyMissionIsFailure()

void CP_SupplyMissionIsFailure ( mission_t * mission)

Supply mission is over and is a failure (from an alien point of view): change interest values.

Note
Supply mission

Definition at line 58 of file cp_mission_supply.cpp.

References CP_MissionRemove(), INT_ChangeIndividualInterest(), INTERESTCATEGORY_BASE_ATTACK, INTERESTCATEGORY_INTERCEPT, and INTERESTCATEGORY_SUPPLY.

Referenced by CP_MissionIsOver().

◆ CP_SupplyMissionIsSuccess()

void CP_SupplyMissionIsSuccess ( mission_t * mission)

Supply mission is over and is a success (from an alien point of view): change interest values.

Note
Supply mission

Definition at line 41 of file cp_mission_supply.cpp.

References mission_t::missionData_t::alienBase, CP_MissionRemove(), CP_SpreadXVIAtPos(), mission_t::data, INT_ChangeIndividualInterest(), INTERESTCATEGORY_SUPPLY, and alienBase_t::pos.

Referenced by CP_MissionIsOver(), and CP_SupplyMissionNextStage().

◆ CP_SupplyMissionLeave()

void CP_SupplyMissionLeave ( mission_t * mission)
static

Supply mission ends: UFO leave earth.

Note
Supply mission – Stage 3

Definition at line 71 of file cp_mission_supply.cpp.

References mission_t::missionData_t::alienBase, CP_MissionDisableTimeLimit(), mission_t::data, aircraft_t::landed, mission_t::stage, STAGE_RETURN_TO_ORBIT, mission_t::ufo, and UFO_SetRandomDest().

Referenced by CP_SupplyMissionNextStage().

◆ CP_SupplyMissionNextStage()

void CP_SupplyMissionNextStage ( mission_t * mission)

Determine what action should be performed when a Supply mission stage ends.

Parameters
[in]missionPointer to the mission which stage ended.

Definition at line 179 of file cp_mission_supply.cpp.

References cgi, CP_MissionRemove(), CP_SupplyGoToBase(), CP_SupplyMissionCreate(), CP_SupplyMissionIsSuccess(), CP_SupplyMissionLeave(), CP_SupplySetStayAtBase(), mission_t::stage, STAGE_COME_FROM_ORBIT, STAGE_MISSION_GOTO, STAGE_NOT_ACTIVE, STAGE_RETURN_TO_ORBIT, and STAGE_SUPPLY.

Referenced by CP_MissionStageEnd().

◆ CP_SupplySetStayAtBase()

void CP_SupplySetStayAtBase ( mission_t * mission)
static

UFO arrived on new base destination: Supply base.

Parameters
[in,out]missionPointer to the mission
Note
Supply mission – Stage 2

< Max time needed to supply base

Definition at line 90 of file cp_mission_supply.cpp.

References AB_CheckSupplyMissionPossible(), AB_SupplyBase(), mission_t::missionData_t::alienBase, ccs, cgi, CP_MissionRemove(), CP_UFORemoveFromGeoscape(), mission_t::data, Date_Random(), DEBUG_CLIENT, aircraft_t::detected, mission_t::finalDate, mission_t::stage, STAGE_SUPPLY, and mission_t::ufo.

Referenced by CP_SupplyMissionNextStage().