|
UFO: Alien Invasion
|
Menu related console command callbacks. More...
#include "../../cl_shared.h"#include "../../ui/ui_dataids.h"#include "cp_campaign.h"#include "cp_geoscape.h"#include "cp_aircraft_callbacks.h"#include "cp_aircraft.h"#include "cp_team.h"#include "cp_mapfightequip.h"#include "cp_popup.h"#include "cp_missions.h"
Go to the source code of this file.
Functions | |
| static void | AIM_AircraftReturnToBase_f (void) |
| Script function for AIR_AircraftReturnToBase. | |
| static void | AIM_SelectAircraft_f (void) |
| Select an aircraft from a base, by ID. | |
| static void | AIM_AircraftStart_f (void) |
| Starts an aircraft or stops the current mission and lets the aircraft idle around. | |
| static int | AIR_GetSlotItems (aircraftItemType_t type, const aircraft_t *aircraft) |
| Returns the amount of assigned items for a given slot of a given aircraft. | |
| void | AIR_AircraftSelect (aircraft_t *aircraft) |
| Sets aircraftCurrent and updates related cvars and menutexts. | |
| static void | AIR_AircraftFillList_f (void) |
| Update aircraft selection list with the current base aircraft names. | |
| static void | AIR_ChangeAircraftName_f (void) |
| Creates console command to change the name of an aircraft. Copies the value of the cvar mn_aircraftname over as the name of the current selected aircraft. | |
| static void | AIR_GeoSelectAircraft_f (void) |
| Select aircraft on Geoscape. | |
| static void | AIR_StopAircraft_f (void) |
| Stop aircraft on Geoscape. | |
| static void | AIR_ShowChangeHomebaseAircraft_f (void) |
| Show change homebase popup. | |
| static void | AIR_SendAircraftToMission_f (void) |
| Send aircraft to land on a mission. | |
| static void | AIR_ShowAircraft_f (void) |
| Show aircraft in Base sections. | |
| void | AIR_InitCallbacks (void) |
| void | AIR_ShutdownCallbacks (void) |
Variables | |
| static const cmdList_t | aircraftCallbacks [] |
Menu related console command callbacks.
Definition in file cp_aircraft_callbacks.cpp.
Script function for AIR_AircraftReturnToBase.
Definition at line 43 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftGetFromIDX(), AIR_AircraftReturnToBase(), AIR_AircraftSelect(), base_t::aircraftCurrent, B_GetCurrentSelectedBase(), cgi, and index.
Starts an aircraft or stops the current mission and lets the aircraft idle around.
Definition at line 89 of file cp_aircraft_callbacks.cpp.
References _, AII_ReloadAircraftWeapons(), AIR_GetPilot(), AIR_IDLE, AIR_IsAircraftInBase(), base_t::aircraftCurrent, B_COMMAND, B_GetBuildingStatus(), B_GetCurrentSelectedBase(), cgi, CP_Popup(), DEBUG_CLIENT, GEO_SelectAircraft(), MS_AddNewMessage(), and aircraft_t::status.
Select an aircraft from a base, by ID.
Definition at line 68 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftSelect(), AIR_GetAircraftFromBaseByIDXSafe(), base_t::aircraftCurrent, B_GetCurrentSelectedBase(), cgi, and i.
Update aircraft selection list with the current base aircraft names.
Definition at line 229 of file cp_aircraft_callbacks.cpp.
References _, AIR_AircraftStatusToName(), AIR_ForeachFromBase, AIR_GetTeamSize(), AIR_IsAircraftInBase(), AIR_STATS_DAMAGE, B_GetCurrentSelectedBase(), cgi, Com_sprintf(), and MAX_VAR.
| void AIR_AircraftSelect | ( | aircraft_t * | aircraft | ) |
Sets aircraftCurrent and updates related cvars and menutexts.
| [in] | aircraft | Pointer to given aircraft that should be selected in the menu. |
Definition at line 171 of file cp_aircraft_callbacks.cpp.
References _, AC_ITEM_ELECTRONICS, AC_ITEM_SHIELD, AC_ITEM_WEAPON, AIR_AircraftMenuStatsValues(), AIR_BaseHasAircraft(), AIR_ForeachFromBase, AIR_GetOperationRange(), AIR_GetSlotItems(), AIR_IsAircraftInBase(), AIR_STATS_DAMAGE, AIR_STATS_FUELSIZE, AIR_STATS_SPEED, base_t::aircraftCurrent, cgi, Com_sprintf(), CP_UpdateActorAircraftVar(), aircraft_t::damage, EMPL_SOLDIER, ERR_DROP, aircraft_t::fuel, aircraft_t::homebase, aircraft_t::id, aircraft_t::maxElectronics, aircraft_t::maxWeapons, aircraft_t::name, Q_strcat(), aircraft_t::stats, aircraft_t::tech, and TEXT_AIRCRAFT_INFO.
Referenced by AIM_AircraftReturnToBase_f(), AIM_SelectAircraft_f(), and CL_PopupInterceptRClick_f().
Creates console command to change the name of an aircraft. Copies the value of the cvar mn_aircraftname over as the name of the current selected aircraft.
Definition at line 253 of file cp_aircraft_callbacks.cpp.
References _, base_t::aircraftCurrent, B_GetCurrentSelectedBase(), cgi, Com_IsValidName(), aircraft_t::defaultName, i, aircraft_t::name, Q_strncpyz(), and Q_strnull().
Select aircraft on Geoscape.
Definition at line 289 of file cp_aircraft_callbacks.cpp.
References _, AIR_AircraftGetFromIDX(), AIR_AircraftHasEnoughFuel(), AIR_GetTeamSize(), cgi, GEO_IsAircraftSelected, GEO_SelectAircraft(), aircraft_t::homebase, aircraft_t::idx, index, MIS_Foreach, MIS_GetName(), aircraft_t::pos, STAGE_NOT_ACTIVE, and va().
|
static |
Returns the amount of assigned items for a given slot of a given aircraft.
| [in] | type | This is the slot type to get the amount of assigned items for |
| [in] | aircraft | The aircraft to count the items for (may not be nullptr) |
Definition at line 134 of file cp_aircraft_callbacks.cpp.
References AC_ITEM_ELECTRONICS, AC_ITEM_SHIELD, AC_ITEM_WEAPON, cgi, aircraft_t::electronics, i, aircraftSlot_t::item, MAX_AIRCRAFTSLOT, aircraft_t::shield, type, and aircraft_t::weapons.
Referenced by AIR_AircraftSelect().
Definition at line 426 of file cp_aircraft_callbacks.cpp.
References aircraftCallbacks, and cgi.
Referenced by AIR_InitStartup().
Send aircraft to land on a mission.
Definition at line 371 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftGetFromIDX(), AIR_SendAircraftToMission(), cgi, and MIS_GetByIdx().
Show aircraft in Base sections.
Definition at line 393 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftAllowed(), AIR_AircraftStatusToName(), AIR_ForeachFromBase, AIR_IsAircraftInBase(), B_GetFoundedBaseByIDX(), and cgi.
Show change homebase popup.
Definition at line 354 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftGetFromIDX(), cgi, CL_DisplayHomebasePopup(), and index.
Definition at line 431 of file cp_aircraft_callbacks.cpp.
References aircraftCallbacks, and cgi.
Referenced by AIR_Shutdown().
Stop aircraft on Geoscape.
Definition at line 335 of file cp_aircraft_callbacks.cpp.
References AIR_AircraftGetFromIDX(), AIR_IDLE, cgi, index, and aircraft_t::status.
|
static |
Definition at line 412 of file cp_aircraft_callbacks.cpp.
Referenced by AIR_InitCallbacks(), and AIR_ShutdownCallbacks().