|
UFO: Alien Invasion
|
Geoscape event implementation. More...
#include "../../DateTime.h"#include "../../cl_shared.h"#include "../../../shared/parse.h"#include "../../../common/binaryexpressionparser.h"#include "cp_campaign.h"#include "cp_time.h"#include "cp_xvi.h"#include "cp_event_callbacks.h"#include "save/save_triggerevents.h"
Go to the source code of this file.
Macros | |
| #define | EVENTCONSTANTS_NAMESPACE "eventTrigger::" |
Functions | |
| eventMail_t * | CL_GetEventMail (const char *id) |
| Searches all event mails for a given id. | |
| void | CP_FreeDynamicEventMail (void) |
| Make sure, that the linked list is freed with every new game. | |
| void | CL_ParseEventMails (const char *name, const char **text) |
| void | CP_CheckCampaignEvents (campaign_t *campaign) |
| const campaignEvents_t * | CP_GetEventsByID (const char *name) |
| static int | CP_CheckTriggerEvent (const char *expression, const void *userdata) |
| void | CP_TriggerEvent (campaignTriggerEventType_t type, const void *userdata) |
| Triggers a campaign event with a special type. | |
| void | CP_ParseEventTrigger (const char *name, const char **text) |
| bool | CP_TriggerEventSaveXML (xmlNode_t *p) |
| bool | CP_TriggerEventLoadXML (xmlNode_t *p) |
| void | CL_ParseCampaignEvents (const char *name, const char **text) |
| void | CL_EventAddMail (const char *eventMailId) |
| Adds the event mail to the message stack. This message is going to be added to the savegame. | |
| void | CL_EventAddMail_f (void) |
Variables | |
| static linkedList_t * | eventMails = nullptr |
| static const value_t | eventMail_vals [] |
| Valid event mail parameters. | |
| static const value_t | event_vals [] |
| Valid event mail parameters. | |
| static const constListEntry_t | eventConstants [] |
Geoscape event implementation.
Definition in file cp_event.cpp.
| #define EVENTCONSTANTS_NAMESPACE "eventTrigger::" |
Definition at line 348 of file cp_event.cpp.
| void CL_EventAddMail | ( | const char * | eventMailId | ) |
Adds the event mail to the message stack. This message is going to be added to the savegame.
Definition at line 507 of file cp_event.cpp.
References _, eventMail_t::body, ccs, cgi, CL_GetEventMail(), Com_sprintf(), cp_campaignPool, CP_DateConvertLong(), eventMail_t::date, Date_GetMonthName(), dateLong_t::day, eventMail_t::from, m, MAX_VAR, dateLong_t::month, MS_AddNewMessage(), MSG_EVENT, eventMail_t::sent, eventMail_t::skipMessage, eventMail_t::subject, eventMail_t::to, UP_OpenEventMail(), va(), and dateLong_t::year.
Referenced by CL_EventAddMail_f(), CP_CampaignInit(), and CP_SpawnUFOCarrier_f().
Definition at line 553 of file cp_event.cpp.
References cgi, and CL_EventAddMail().
| eventMail_t * CL_GetEventMail | ( | const char * | id | ) |
Searches all event mails for a given id.
| [in] | id | The id from the script files |
Definition at line 45 of file cp_event.cpp.
References ccs, eventMails, i, eventMail_t::id, LIST_Foreach, and Q_streq.
Referenced by CL_EventAddMail(), MS_LoadXML(), and UP_OpenEventMail().
| void CL_ParseCampaignEvents | ( | const char * | name, |
| const char ** | text ) |
Definition at line 448 of file cp_event.cpp.
References ccs, cgi, cp_campaignPool, DEBUG_CLIENT, events, campaignEvent_t::interest, MAX_CAMPAIGNEVENTS, MAX_CAMPAIGNS, name, OBJZERO, Sys_Error(), campaignEvent_t::tech, and V_INT.
Referenced by CP_ParseScriptFirst().
| void CL_ParseEventMails | ( | const char * | name, |
| const char ** | text ) |
Definition at line 93 of file cp_event.cpp.
References ccs, cgi, cp_campaignPool, DEBUG_CLIENT, eventMail_vals, eventMail_t::id, MAX_EVENTMAILS, name, and OBJZERO.
Referenced by CP_ParseScriptFirst().
| void CP_CheckCampaignEvents | ( | campaign_t * | campaign | ) |
Definition at line 113 of file cp_event.cpp.
References ccs, campaign_t::events, events, i, and RS_MarkStoryLineEventResearched().
Referenced by CP_CampaignRun().
Definition at line 156 of file cp_event.cpp.
References aircraftSlot_t::ammoLeft, ccs, cgi, CP_GetAverageXVIRate(), nationInfo_t::happiness, i, INS_ForeachOfType, INS_GetType(), INS_HasType(), INSTALLATION_DEFENCE, INSTALLATION_NOT_USED, INSTALLATION_WORKING, MAX_VAR, NAT_Foreach, NAT_GetCurrentMonthInfo(), Q_streq, Q_strncpyz(), Q_strnull(), Q_strstart(), RS_GetTechByID(), RS_IsResearched_ptr(), type, and nationInfo_t::xviInfection.
Referenced by CP_TriggerEvent().
Make sure, that the linked list is freed with every new game.
Definition at line 67 of file cp_event.cpp.
References cgi, and eventMails.
Referenced by CP_ResetCampaignData().
| const campaignEvents_t * CP_GetEventsByID | ( | const char * | name | ) |
Will return the campaign related events
| name | The events id |
Definition at line 139 of file cp_event.cpp.
References ccs, events, i, name, Q_streq, RS_GetTechByID(), and Sys_Error().
Referenced by CP_ParseCampaign().
| void CP_ParseEventTrigger | ( | const char * | name, |
| const char ** | text ) |
Definition at line 359 of file cp_event.cpp.
References ccs, cgi, cp_campaignPool, DEBUG_CLIENT, event_vals, eventConstants, MAX_CAMPAIGN_TRIGGER_EVENTS, name, and OBJZERO.
Referenced by CP_ParseScriptFirst().
| void CP_TriggerEvent | ( | campaignTriggerEventType_t | type, |
| const void * | userdata ) |
Triggers a campaign event with a special type.
| [in] | type | the event type |
| [in] | userdata | Any userdata that is passed to the bep checker function |
Definition at line 310 of file cp_event.cpp.
References ccs, cgi, CP_CampaignTriggerFunctions(), CP_CheckTriggerEvent(), i, Q_strvalid, and type.
Referenced by AL_AddAliens(), CP_CampaignRun(), CP_SpawnAlienBaseMission(), TEST_F(), and UFO_DetectNewUFO().
| bool CP_TriggerEventLoadXML | ( | xmlNode_t * | p | ) |
Definition at line 419 of file cp_event.cpp.
References ccs, cgi, i, Q_streq, SAVE_TRIGGEREVENTS_NAME, SAVE_TRIGGEREVENTS_STATE, SAVE_TRIGGEREVENTS_TRIGGEREVENT, SAVE_TRIGGEREVENTS_TRIGGEREVENTS, and xmlNode_t.
Referenced by SAV_Init().
| bool CP_TriggerEventSaveXML | ( | xmlNode_t * | p | ) |
Definition at line 401 of file cp_event.cpp.
References ccs, cgi, i, SAVE_TRIGGEREVENTS_NAME, SAVE_TRIGGEREVENTS_STATE, SAVE_TRIGGEREVENTS_TRIGGEREVENT, SAVE_TRIGGEREVENTS_TRIGGEREVENTS, and xmlNode_t.
Referenced by SAV_Init().
|
static |
Valid event mail parameters.
Definition at line 338 of file cp_event.cpp.
Referenced by CP_ParseEventTrigger().
|
static |
Definition at line 349 of file cp_event.cpp.
Referenced by CP_ParseEventTrigger().
|
static |
Valid event mail parameters.
Definition at line 75 of file cp_event.cpp.
Referenced by CL_ParseEventMails().
|
static |
Definition at line 36 of file cp_event.cpp.
Referenced by CL_GetEventMail(), and CP_FreeDynamicEventMail().