26#include "../../cl_shared.h"
56 cgi->Com_Printf(
"CP_ChangeIndividualInterest: Unsupported value of category\n");
60 if (interestFactor > 0.0f) {
65 const float slowerIncreaseFraction = 0.5f;
145 if (!
cgi->Com_GetConstInt(categoryId, (
int*) &cat)) {
146 cgi->Com_Printf(
"Invalid interest category '%s'\n", categoryId);
166 return "Recon mission";
168 return "Terror mission";
170 return "Base attack";
173 return "Building Base or Subverting Government";
175 return "Supply base";
177 return "XVI propagation";
180 return "Interception";
184 return "Alien base discovered";
186 return "Rescue mission";
188 return "UFO-Carrier";
190 return "Unknown mission category";
201static void INT_AlienInterestList_f (
void)
204 cgi->Com_Printf(
"Individual interest:\n");
213static void INT_SetAlienInterest_f (
void)
215 if (
cgi->Cmd_Argc() < 2) {
227 {
"debug_interestlist", INT_AlienInterestList_f,
"Debug function to show alien interest values"},
228 {
"debug_interestset", INT_SetAlienInterest_f,
"Set overall interest level."},
230 {
nullptr,
nullptr,
nullptr}
bool INT_LoadXML(xmlNode_t *parent)
Load callback for savegames in XML Format.
void INT_InitStartup(void)
Init actions for alien interests-subsystem.
void INT_Shutdown(void)
Closing actions for alien interests-subsystem.
void INT_IncreaseAlienInterest(const campaign_t *campaign)
Increase alien overall interest.
void INT_ChangeIndividualInterest(float interestFactor, interestCategory_t category)
Change individual interest value.
static const cmdList_t debugInterestCmds[]
bool INT_SaveXML(xmlNode_t *parent)
Save callback for savegames in XML Format.
void INT_ResetAlienInterest(void)
Initialize alien interest values and mission cycle.
@ INTERESTCATEGORY_BASE_ATTACK
@ INTERESTCATEGORY_INTERCEPTBOMBING
@ INTERESTCATEGORY_ALIENBASE
@ INTERESTCATEGORY_BUILDING
@ INTERESTCATEGORY_SUBVERT
@ INTERESTCATEGORY_SUPPLY
@ INTERESTCATEGORY_UFOCARRIER
@ INTERESTCATEGORY_TERROR_ATTACK
@ INTERESTCATEGORY_INTERCEPT
@ INTERESTCATEGORY_RESCUE
@ INTERESTCATEGORY_HARVEST
Header file for single player campaign control.
#define HOURS_PER_ONE_INTEREST
The amount of time (in hours) it takes for the interest to increase by 1. Is later affected by diffic...
const cgame_import_t * cgi
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
XML tag constants for savegame.
static const constListEntry_t saveInterestConstants[]
#define SAVE_INTERESTS_VAL
#define SAVE_INTERESTS_LASTINCREASEDELAY
#define SAVE_INTERESTS_OVERALL
#define SAVE_INTERESTCAT_NAMESPACE
#define SAVE_INTERESTS_ID
#define SAVE_INTERESTS_LASTMISSIONSPAWNEDDELAY
#define SAVE_INTERESTS_INTEREST
int lastMissionSpawnedDelay
int lastInterestIncreaseDelay
int interest[INTERESTCATEGORY_MAX]
xmlNode_t *IMPORT * XML_GetNode(xmlNode_t *parent, const char *name)
const char *IMPORT * Cmd_Argv(int n)
xmlNode_t *IMPORT * XML_GetNextNode(xmlNode_t *current, xmlNode_t *parent, const char *name)
xmlNode_t *IMPORT * XML_AddNode(xmlNode_t *parent, const char *name)
const char *IMPORT * XML_GetString(xmlNode_t *parent, const char *name)
const char *IMPORT * Com_GetConstVariable(const char *space, int value)