|
UFO: Alien Invasion
|
UFO recovery and storing callback functions. More...
#include "../../DateTime.h"#include "../../cl_shared.h"#include "../../ui/ui_dataids.h"#include "cp_campaign.h"#include "cp_ufo.h"#include "cp_uforecovery.h"#include "cp_uforecovery_callbacks.h"#include "cp_geoscape.h"#include "cp_time.h"
Go to the source code of this file.
Macros | |
| #define | HAPPINESS_UFO_SALE_GAIN 0.02 |
| #define | HAPPINESS_UFO_SALE_LOSS 0.005 |
Functions | |
| static void | UR_DialogInitStore_f (void) |
| Function to initialize list of storage locations for recovered UFO. | |
| static void | UR_DialogStartStore_f (void) |
| Function to start UFO recovery process. | |
| static void | UR_DialogInitSell_f (void) |
| Function to initialize list to sell recovered UFO to desired nation. | |
| static void | UR_DialogStartSell_f (void) |
| Function to start UFO selling process. | |
| const char * | US_StoredUFOStatus (const storedUFO_t *ufo) |
| Returns string representation of the stored UFO's status. | |
| static void | US_SelectStoredUfo_f (void) |
| Send Stored UFO data to the UI. | |
| static void | US_DestroyStoredUFO_f (void) |
| Destroys a stored UFO. | |
| static void | US_FillUFOTransfer_f (void) |
| Fills UFO Yard UI with transfer destinations. | |
| static void | US_FillUFOTransferUFOs_f (void) |
| Send Stored UFOs of the destination UFO Yard. | |
| static void | US_TransferUFO_f (void) |
| Callback to start the transfer of a stored UFO. | |
| void | UR_InitCallbacks (void) |
| void | UR_ShutdownCallbacks (void) |
Variables | |
| static const cmdList_t | ufoRecoveryCallbacks [] |
UFO recovery and storing callback functions.
Definition in file cp_uforecovery_callbacks.cpp.
| #define HAPPINESS_UFO_SALE_GAIN 0.02 |
Definition at line 37 of file cp_uforecovery_callbacks.cpp.
Referenced by UR_DialogStartSell_f().
| #define HAPPINESS_UFO_SALE_LOSS 0.005 |
Definition at line 38 of file cp_uforecovery_callbacks.cpp.
Referenced by UR_DialogStartSell_f().
Function to initialize list to sell recovered UFO to desired nation.
Definition at line 108 of file cp_uforecovery_callbacks.cpp.
References _, AIR_GetAircraft(), cgi, frand(), nationInfo_t::happiness, int(), NAT_Foreach, NAT_GetCurrentMonthInfo(), NAT_GetHappinessString(), aircraft_t::price, and nationInfo_t::xviInfection.
Function to initialize list of storage locations for recovered UFO.
Definition at line 45 of file cp_uforecovery_callbacks.cpp.
References cgi, capacities_t::cur, INS_Foreach, and capacities_t::max.
Function to start UFO selling process.
Definition at line 143 of file cp_uforecovery_callbacks.cpp.
References _, ccs, cgi, Com_sprintf(), cp_messageBuffer, CP_UpdateCredits(), HAPPINESS_UFO_SALE_GAIN, HAPPINESS_UFO_SALE_LOSS, MS_AddNewMessage(), nation_t::name, NAT_Foreach, NAT_GetNationByID(), and NAT_SetHappiness().
Function to start UFO recovery process.
Definition at line 65 of file cp_uforecovery_callbacks.cpp.
References _, AIR_GetAircraftSilent(), AIR_IsUFO, ccs, cgi, Com_sprintf(), cp_messageBuffer, capacities_t::cur, INS_GetByIDX(), lengthof, capacities_t::max, MS_AddNewMessage(), installation_t::name, RECOVERY_DELAY, UFO_GetName(), installation_t::ufoCapacity, and US_StoreUFO().
Definition at line 356 of file cp_uforecovery_callbacks.cpp.
References cgi, and ufoRecoveryCallbacks.
Referenced by UR_InitStartup().
Definition at line 361 of file cp_uforecovery_callbacks.cpp.
References cgi, and ufoRecoveryCallbacks.
Referenced by UR_Shutdown().
Destroys a stored UFO.
Definition at line 240 of file cp_uforecovery_callbacks.cpp.
References _, cgi, Com_sprintf(), DEBUG_CLIENT, installation_t::idx, storedUFO_t::idx, storedUFO_t::installation, US_GetStoredUFOByIDX(), and US_RemoveStoredUFO().
Fills UFO Yard UI with transfer destinations.
Definition at line 270 of file cp_uforecovery_callbacks.cpp.
References _, cgi, DEBUG_CLIENT, GEO_GetNation(), INS_ForeachOfType, storedUFO_t::installation, INSTALLATION_UFOYARD, nation_t::name, and US_GetStoredUFOByIDX().
Send Stored UFOs of the destination UFO Yard.
Definition at line 297 of file cp_uforecovery_callbacks.cpp.
References cgi, DEBUG_CLIENT, installation_t::idx, INS_GetByIDX(), and US_Foreach.
Send Stored UFO data to the UI.
Definition at line 213 of file cp_uforecovery_callbacks.cpp.
References storedUFO_t::arrive, ccs, cgi, storedUFO_t::condition, CP_SecondConvert(), Date_DateToSeconds(), storedUFO_t::idx, storedUFO_t::installation, aircraft_t::model, installation_t::name, Q_streq, UFO_GetName(), storedUFO_t::ufoTemplate, US_GetStoredUFOByIDX(), and US_StoredUFOStatus().
| const char * US_StoredUFOStatus | ( | const storedUFO_t * | ufo | ) |
Returns string representation of the stored UFO's status.
Definition at line 191 of file cp_uforecovery_callbacks.cpp.
References storedUFO_t::disassembly, storedUFO_t::status, SUFO_RECOVERED, SUFO_STORED, and SUFO_TRANSFERED.
Referenced by INS_FillUFOYardData_f(), and US_SelectStoredUfo_f().
Callback to start the transfer of a stored UFO.
Definition at line 321 of file cp_uforecovery_callbacks.cpp.
References cgi, INS_GetByIDX(), US_GetStoredUFOByIDX(), and US_TransferUFO().
|
static |
Definition at line 343 of file cp_uforecovery_callbacks.cpp.
Referenced by UR_InitCallbacks(), and UR_ShutdownCallbacks().