26 #include "../../../cl_shared.h"
27 #include "../../../ui/ui_dataids.h"
28 #include "../cp_campaign.h"
29 #include "../cp_geoscape.h"
30 #include "../cp_ufo.h"
31 #include "../cp_missions.h"
32 #include "../cp_time.h"
33 #include "../cp_xvi.h"
34 #include "../cp_alien_interest.h"
60 const date_t delay = {2, 0};
64 cgi->UI_PopupButton(
_(
"UFO-Carrier"),
_(
"The Carrier UFO is in range. Should we launch the payload?"),
65 "ui_pop;",
_(
"Wait"),
_(
"Don't attack the UFO-Carrier yet"),
66 "cp_attack_ufocarrier;ui_pop;",
_(
"Launch"),
_(
"Attack the UFO-Carrier now"),
67 nullptr,
nullptr,
nullptr);
77 switch (mission->
stage) {
97 if (!installationTemplate)
100 if (
cgi->Cmd_Argc() == 3) {
103 INS_Build(installationTemplate, pos,
_(installationTemplate->
name));
119 if (mission ==
nullptr)
136 if (ufo ==
nullptr) {
137 cgi->Com_Error(
ERR_DROP,
"Could not add UFO-Carrier to geoscape");
144 if (mission->
mapDef !=
nullptr) {
145 cgi->Com_Printf(
"spawned mapdef: %s\n", mission->
mapDef->
id);
#define MAX_UFOONGEOSCAPE
const installationTemplate_t * INS_GetInstallationTemplateByType(installationType_t type)
Returns the installation Template for a given installation type.
#define MIS_Foreach(var)
iterates through missions
void CL_EventAddMail(const char *eventMailId)
Adds the event mail to the message stack. This message is going to be added to the savegame...
bool INS_HasType(installationType_t type, installationStatus_t status)
Checks whether the given installation type is available.
void CP_EndCampaign(bool won)
Function to handle the campaign end.
void GEO_CenterPosition(const vec2_t pos)
Start to rotate or shift the globe to the given position.
const byte * GEO_GetColor(const vec2_t pos, mapType_t type, bool *coast)
Returns the color value from geoscape of a certain mask (terrain, culture or population) at a given p...
void CP_SpawnCrashSiteMission(aircraft_t *ufo)
Spawn a new crash site after a UFO has been destroyed.
struct mission_s * mission
Campaign mission headers.
void CP_AttackUFOCarrier_f(void)
Decide whether you hit and destroyed the carrier and spawns a new carrier crash site mission...
const aircraft_t * UFO_GetTemplate(ufoType_t ufoType)
Get the template data for the given ufo type.
static void CP_UFOCarrierMissionStart(mission_t *mission)
Start UFO-Carrier mission.
const cgame_import_t * cgi
static void CP_UFOCarrierMissionUpdate(mission_t *mission)
aircraft_t * UFO_CreateFromTemplate(const aircraft_t *ufoTemplate)
Creates a new ufo on the geoscape from the given aircraft template.
Engine-side time information in the game.
void CP_UFOCarrierNextStage(mission_t *mission)
Determine what action should be performed when a UFOCarriering mission stage ends.
date_t Date_Add(date_t a, const date_t &b)
Add two dates and return the result.
installation_t * INS_Build(const installationTemplate_t *installationTemplate, const vec2_t pos, const char *name)
Build a new installation.
static mission_t * CP_GetCarrierMission(void)
#define Vector2FromInt(x, y)
void CP_GetRandomPosOnGeoscape(vec2_t pos, bool noWater)
Determines a random position on geoscape.
#define MapIsWater(color)
void CP_SpawnUFOCarrier_f(void)
Spawns a UFO-Carrier mission.
An aircraft with all it's data.
const char *IMPORT * Cmd_Argv(int n)
mission_t * CP_CreateNewMission(interestCategory_t category, bool beginNow)
Create a new mission of given category.