UFO: Alien Invasion
|
#include "../../cl_shared.h"
#include "../../cl_inventory.h"
#include "../../ui/ui_dataids.h"
#include "cp_campaign.h"
#include "cp_market.h"
#include "cp_market_callbacks.h"
#include "cp_popup.h"
Go to the source code of this file.
Functions | |
static void | BS_MarketAircraftDescription (const aircraft_t *aircraftTemplate) |
Prints general information about aircraft for Buy/Sell menu. More... | |
static void | BS_MarketInfoClick_f (void) |
Opens the UFOpedia for the current selected item/aircraft/ugv. More... | |
static void | BS_SetAutosell_f (void) |
Sets/unsets or flips the autosell property of an item on the market. More... | |
static void | BS_Buy_f (void) |
Buy/Sell item/aircraft/ugv on the market. More... | |
static void | BS_ShowInfo_f (void) |
Show information about item/aircaft/ugv in the market. More... | |
static void | BS_FillMarket_f (void) |
Fill market item list. More... | |
void | BS_InitCallbacks (void) |
Function registers the callbacks of the maket UI and do initializations. More... | |
void | BS_ShutdownCallbacks (void) |
Function unregisters the callbacks of the maket UI. More... | |
Variables | |
static const cmdList_t | marketCallbacks [] |
Buy/Sell item/aircraft/ugv on the market.
Definition at line 113 of file cp_market_callbacks.cpp.
References _, AIR_AircraftAllowed(), AIR_AircraftGetFromIDX(), AIR_GetAircraftSilent(), AIR_GetHangarCapacityType(), AIR_RemoveEmployees(), B_COMMAND, B_GetBuildingStatus(), B_GetCurrentSelectedBase(), B_GetFoundedBaseByIDX(), B_ItemInBase(), B_POWER, BS_BuyAircraft(), BS_BuyItem(), BS_BuyUGV(), BS_GetAircraftBuyingPrice(), BS_GetItemBuyingPrice(), BS_GetItemOnMarket(), BS_IsOnMarket(), BS_SellAircraft(), BS_SellItem(), BS_SellUGV(), CAP_GetFreeCapacity(), CAP_ITEMS, ccs, cgi, cgame_import_s::Cmd_Argv(), cgame_import_s::Com_GetUGVByIDSilent(), count, CP_Popup(), ccs_s::credits, E_CountUnhiredRobotsByType(), E_GetEmployeeByTypeFromChrUCN(), ccs_s::eMarket, EMPL_ROBOT, ERR_DROP, ugv_s::id, objDef_s::id, objDef_s::idx, INVSH_GetItemByID(), market_s::numItems, ugv_s::price, Q_strstart(), objDef_s::size, UGV_SIZE, and ugv_s::weapon.
Fill market item list.
Definition at line 355 of file cp_market_callbacks.cpp.
References _, AIR_ForeachFromBase, AIR_IsAircraftInBase(), ccs_s::aircraftTemplates, market_s::autosell, B_GetCurrentSelectedBase(), B_GetFoundedBaseByIDX(), B_ItemInBase(), BS_AircraftIsOnMarket(), BS_GetAircraftBuyingPrice(), BS_GetAircraftOnMarket(), BS_GetAircraftSellingPrice(), BS_GetItemBuyingPrice(), BS_GetItemOnMarket(), BS_GetItemSellingPrice(), BS_IsOnMarket(), CAP_AIRCRAFT_BIG, CAP_AIRCRAFT_SMALL, CAP_GetFreeCapacity(), CAP_GetMax, CAP_ITEMS, ccs, cgi, cgame_import_s::Cmd_Argv(), cgame_import_s::csi, E_CountUnhiredRobotsByType(), E_Foreach, ccs_s::eMarket, EMPL_ROBOT, FILTER_AIRCRAFT, FILTER_CRAFTITEM, FILTER_DUMMY, FILTER_S_ARMOUR, FILTER_S_HEAVY, FILTER_S_IMPLANT, FILTER_S_MISC, FILTER_S_PRIMARY, FILTER_S_SECONDARY, FILTER_UGVITEM, i, aircraft_s::id, ugv_s::id, objDef_s::id, INVSH_GetItemByID(), MAX_FILTERTYPES, technology_s::name, objDef_s::name, ccs_s::numAircraftTemplates, csi_s::numODs, csi_s::numUGV, csi_s::ods, ugv_s::price, RS_GetTechByProvided(), RS_GetTechForItem(), RS_IsResearched_ptr(), aircraft_s::tech, type, csi_s::ugvs, va(), and ugv_s::weapon.
Function registers the callbacks of the maket UI and do initializations.
Definition at line 480 of file cp_market_callbacks.cpp.
References cgi.
Referenced by CP_AddCampaignCallbackCommands().
|
static |
Prints general information about aircraft for Buy/Sell menu.
[in] | aircraftTemplate | Aircraft type. |
Definition at line 38 of file cp_market_callbacks.cpp.
References _, cgi, cgame_import_s::Cvar_Set(), aircraft_s::id, aircraft_s::name, aircraft_s::tech, aircraft_s::tpl, and UP_AircraftDescription().
Referenced by BS_ShowInfo_f().
Opens the UFOpedia for the current selected item/aircraft/ugv.
Definition at line 57 of file cp_market_callbacks.cpp.
References cgi, cgame_import_s::Cvar_GetString(), technology_s::id, RS_GetTechByProvided(), and UP_OpenWith().
Sets/unsets or flips the autosell property of an item on the market.
Definition at line 69 of file cp_market_callbacks.cpp.
References AIR_GetAircraftSilent(), market_s::autosell, ccs, cgi, cgame_import_s::Cmd_Argv(), ccs_s::eMarket, objDef_s::id, objDef_s::idx, INVSH_GetItemByID(), objDef_s::isVirtual, objDef_s::notOnMarket, RS_GetTechForItem(), and RS_IsResearched_ptr().
Show information about item/aircaft/ugv in the market.
Definition at line 282 of file cp_market_callbacks.cpp.
References AIR_AircraftGetFromIDX(), AIR_GetAircraftSilent(), BS_IsOnMarket(), BS_MarketAircraftDescription(), cgi, cgame_import_s::Cmd_Argv(), cgame_import_s::Com_GetUGVByIDSilent(), objDef_s::craftitem, E_GetEmployeeByTypeFromChrUCN(), EMPL_ROBOT, Employee::getUGV(), INVSH_GetItemByID(), MAX_ACITEMS, Q_strstart(), aircraft_s::tpl, craftitem_s::type, UP_AircraftItemDescription(), and UP_UGVDescription().
Function unregisters the callbacks of the maket UI.
Definition at line 488 of file cp_market_callbacks.cpp.
References cgi.
Referenced by CP_RemoveCampaignCallbackCommands().
|
static |
Definition at line 466 of file cp_market_callbacks.cpp.