|
UFO: Alien Invasion
|
Menu related console command callbacks. More...
#include "../../DateTime.h"#include "../../cl_shared.h"#include "../../ui/ui_dataids.h"#include "cp_campaign.h"#include "cp_installation_callbacks.h"#include "cp_installation.h"#include "cp_geoscape.h"#include "cp_popup.h"#include "cp_ufo.h"#include "cp_uforecovery_callbacks.h"
Go to the source code of this file.
Functions | |
| static void | INS_SetInstallationTitle (installationType_t type) |
| Sets the title of the installation to a cvar to prepare the rename menu. | |
| void | INS_SelectInstallation (installation_t *installation) |
| Select an installation when clicking on it on geoscape. | |
| static void | INS_BuildInstallation_f (void) |
| Constructs a new installation. | |
| static void | INS_SelectInstallation_f (void) |
| Called when an installation is opened or a new installation is created on geoscape. For a new installation the installationID is -1. | |
| static void | INS_ChangeInstallationName_f (void) |
| Creates console command to change the name of a installation. Copies the value of the cvar mn_installation_title over as the name of the current selected installation. | |
| static void | INS_DestroyInstallation_f (void) |
| console function for destroying an installation | |
| static void | INS_UpdateInstallationLimit_f (void) |
| updates the installation limit cvar for menus | |
| static void | INS_FillUFOYardData_f (void) |
| Fills the UI with ufo yard data. | |
| static void | INS_FillTypes_f (void) |
| Fills create installation / installation type selection popup. | |
| static void | INS_SelectType_f (void) |
| Selects installation type to build. | |
| void | INS_InitCallbacks (void) |
| void | INS_ShutdownCallbacks (void) |
Variables | |
| static const cmdList_t | installationCallbacks [] |
Menu related console command callbacks.
Definition in file cp_installation_callbacks.cpp.
Constructs a new installation.
Definition at line 87 of file cp_installation_callbacks.cpp.
References _, B_GetInstallationLimit(), ccs, cgi, Com_sprintf(), installationTemplate_t::cost, cp_messageBuffer, CP_Popup(), CP_UpdateCredits(), GEO_GetNation(), GEO_IsRadarOverlayActivated(), GEO_SetOverlay(), INS_Build(), INS_GetCount(), INS_GetInstallationTemplateByID(), INSTALLATION_RADAR, MA_NEWINSTALLATION, MA_NONE, MSG_CONSTRUCTION, MSO_CheckAddNewMessage(), installation_t::name, nation_t::name, NT_INSTALLATION_BUILDSTART, installation_t::pos, and installationTemplate_t::type.
Creates console command to change the name of a installation. Copies the value of the cvar mn_installation_title over as the name of the current selected installation.
Definition at line 160 of file cp_installation_callbacks.cpp.
References cgi, INS_GetCurrentSelectedInstallation(), installation_t::name, and Q_strncpyz().
console function for destroying an installation
Definition at line 175 of file cp_installation_callbacks.cpp.
References _, cgi, Com_sprintf(), DEBUG_CLIENT, installation_t::idx, INS_DestroyInstallation(), INS_GetByIDX(), INS_GetCurrentSelectedInstallation(), and MAX_VAR.
Fills create installation / installation type selection popup.
Definition at line 253 of file cp_installation_callbacks.cpp.
References _, B_GetCount(), B_GetInstallationLimit(), installationTemplate_t::buildTime, ccs, cgi, installationTemplate_t::cost, i, installationTemplate_t::id, INS_GetCount(), INS_HasType(), INSTALLATION_NOT_USED, MAX_BASES, installationTemplate_t::name, ngettext, installationTemplate_t::once, RS_IsResearched_ptr(), installationTemplate_t::tech, installationTemplate_t::type, and va().
Fills the UI with ufo yard data.
Definition at line 214 of file cp_installation_callbacks.cpp.
References _, installation_t::buildStart, installationTemplate_t::buildTime, ccs, cgi, capacities_t::cur, DEBUG_CLIENT, GEO_GetNation(), installation_t::idx, INS_GetByIDX(), INS_GetCurrentSelectedInstallation(), INS_GetFirstUFOYard(), INSTALLATION_UFOYARD, INSTALLATION_UNDER_CONSTRUCTION, installation_t::installationStatus, installation_t::installationTemplate, capacities_t::max, installation_t::name, nation_t::name, ngettext, installation_t::pos, installationTemplate_t::type, UFO_GetName(), installation_t::ufoCapacity, US_Foreach, US_StoredUFOStatus(), and va().
Definition at line 332 of file cp_installation_callbacks.cpp.
References cgi, INS_GetCount(), and installationCallbacks.
Referenced by CP_AddCampaignCallbackCommands().
| void INS_SelectInstallation | ( | installation_t * | installation | ) |
Select an installation when clicking on it on geoscape.
| [in] | installation | The installation to select |
nullptr Definition at line 57 of file cp_installation_callbacks.cpp.
References B_SetCurrentSelectedBase(), installation_t::buildStart, installationTemplate_t::buildTime, ccs, cgi, DEBUG_CLIENT, installation_t::idx, INS_SetCurrentSelectedInstallation(), INSTALLATION_DEFENCE, INSTALLATION_UFOYARD, INSTALLATION_WORKING, installation_t::installationStatus, installation_t::installationTemplate, MA_NONE, ngettext, and installationTemplate_t::type.
Referenced by INS_SelectInstallation_f().
Called when an installation is opened or a new installation is created on geoscape. For a new installation the installationID is -1.
Definition at line 139 of file cp_installation_callbacks.cpp.
References cgi, INS_GetByIDX(), and INS_SelectInstallation().
Selects installation type to build.
Definition at line 276 of file cp_installation_callbacks.cpp.
References B_GetInstallationLimit(), installationTemplate_t::buildTime, ccs, cgi, installationTemplate_t::cost, GEO_IsRadarOverlayActivated(), GEO_ResetAction(), GEO_SetOverlay(), installationTemplate_t::id, INS_GetCount(), INS_GetInstallationTemplateByID(), INS_HasType(), INS_SetInstallationTitle(), INSTALLATION_NOT_USED, INSTALLATION_RADAR, MA_NEWINSTALLATION, installationTemplate_t::once, RS_IsResearched_ptr(), installationTemplate_t::tech, and installationTemplate_t::type.
|
static |
Sets the title of the installation to a cvar to prepare the rename menu.
Definition at line 41 of file cp_installation_callbacks.cpp.
References _, ccs, cgi, installationTemplate_t::description, INS_GetInstallationTemplateByType(), installationTemplate_t::name, Q_strvalid, TEXT_BUILDING_INFO, and type.
Referenced by INS_SelectType_f().
Definition at line 342 of file cp_installation_callbacks.cpp.
References cgi, and installationCallbacks.
Referenced by CP_RemoveCampaignCallbackCommands().
updates the installation limit cvar for menus
Definition at line 206 of file cp_installation_callbacks.cpp.
References B_GetInstallationLimit(), and cgi.
|
static |
Definition at line 321 of file cp_installation_callbacks.cpp.
Referenced by INS_InitCallbacks(), and INS_ShutdownCallbacks().