25 #include "../../cl_shared.h"
26 #include "../../ui/ui_dataids.h"
31 #define MAX_STATS_BUFFER 2048
41 char* pos = statsBuffer;
49 _(
"Max. allowed eXtraterrestial Viral Infection: %i%%\n"
50 "Current eXtraterrestial Viral Infection: %i%%"),
61 const int argCount =
cgi->Cmd_Argc();
77 if (!employee->isHired())
79 cost += employee->salary();
84 cgi->UI_ExecuteConfunc(
"%s %s \"%s\" %d",
87 ngettext(
"Salary",
"Salaries", count),
99 cgi->UI_ExecuteConfunc(
"%s %s \"%s\" %d",
102 ngettext(
"Aircraft",
"Aircraft", count),
107 while ((base =
B_GetNext(base)) !=
nullptr) {
109 cgi->UI_ExecuteConfunc(
"%s base_%d \"%s: %s\" %d",
120 cgi->UI_ExecuteConfunc(
"%s %s \"%s\" %d",
176 cgi->Com_Printf(
"Did not find stats entry in xml!\n");
209 {
nullptr,
nullptr,
nullptr}
215 cgi->Cmd_TableAddList(statisticsCallbacks);
220 cgi->Cmd_TableRemoveList(statisticsCallbacks);
#define SAVE_STATS_MONEYINTERCEPTIONS
int CP_GetAverageXVIRate(void)
Return the average XVI rate.
#define SAVE_STATS_MISSIONSWON
#define E_Foreach(employeeType, var)
#define SAVE_STATS_UFOSDETECTED
#define SAVE_STATS_RESCUEDCIVILIANS
#define SAVE_STATS_MISSIONS
#define SAVE_STATS_RESEARCHEDTECHNOLOGIES
#define SAVE_STATS_AIRCRAFTHAD
bool STATS_LoadXML(xmlNode_t *parent)
Load callback for savegames in XML Format.
#define SAVE_STATS_MONEYRESEARCH
static void STAT_GetExpenses_f(void)
Console command for UI to gather expenses.
A base with all it's data.
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
#define ngettext(x, y, cnt)
#define SAVE_STATS_ALIENBASESBUILT
#define SAVE_STATS_MISSIONSLOST
base_t * B_GetNext(base_t *lastBase)
Iterates through founded bases.
#define SAVE_STATS_MONEYBASES
const cgame_import_t * cgi
bool CP_IsXVIVisible(void)
Returns true if the XVI effect should be visible to the player.
static void STATS_Update_f(void)
Shows the current stats from stats_t stats.
XML tag constants for savegame.
int maxAllowedXVIRateUntilLost
#define SAVE_STATS_SOLDIERSNEW
int researchedTechnologies
#define SAVE_STATS_INTERCEPTIONS
static const cmdList_t statisticsCallbacks[]
void Q_strcat(char *dest, size_t destsize, const char *format,...)
Safely (without overflowing the destination buffer) concatenates two strings.
#define SAVE_STATS_BASESATTACKED
bool STATS_SaveXML(xmlNode_t *parent)
Save callback for savegames in XML Format.
#define SAVE_STATS_KILLEDALIENS
#define SAVE_STATS_INSTALLATIONSBUILT
Header file for single player campaign control.
int CP_GetSalaryUpKeepBase(const salary_t *salary, const base_t *base)
xmlNode_t *IMPORT * XML_AddNode(xmlNode_t *parent, const char *name)
void STATS_InitStartup(void)
#define AIR_Foreach(var)
iterates trough all aircraft
#define SAVE_STATS_MONEYWEAPONS
#define SAVE_STATS_UFOSSTORED
int negativeCreditsUntilLost
#define SAVE_STATS_SOLDIERSLOST
const char *IMPORT * Cmd_Argv(int n)
#define SAVE_STATS_BASESBUILT
#define SAVE_STATS_CAPTUREDALIENS
xmlNode_t *IMPORT * XML_GetNode(xmlNode_t *parent, const char *name)
void STATS_ShutDown(void)