25 LOG_INFO(
"^4campaign initialization failed: ", s);
27 error(
"CAMPAIGN FAIL AHAHAHAHAHAHAHAHAH))");
33 string thismapname, wantedmapname;
39 if(wantedmapname != thismapname)
86 for(
int j = 0; j < argc; ++j)
89 if(arg ==
"")
continue;
120 if(
argv(0) !=
"default") {
123 if(
argv(1) !=
"default") {
147 while((l =
fgets(fh)))
154 if(
argv(1) == cvarname)
160 contents =
strcat(contents,
"set ", cvarname,
" ",
ftos(value),
"\n");
168 error(
"Cannot write to campaign file");
188 bprint(
"Campaign test run, advancing level.\n");
193 bprint(
"The current level has been WON.\n");
197 if(autocvar_timelimit != 0 && autocvar_fraglimit != 0 &&
time > autocvar_timelimit * 60)
200 bprint(
"Time's up! The current level has been LOST.\n");
206 bprint(
"The current level has been WON.\n");
210 else if(autocvar_timelimit != 0 &&
time > autocvar_timelimit * 60)
213 bprint(
"Time's up! The current level has been LOST.\n");
219 bprint(
"The current level has been LOST.\n");
251 LOG_DEBUG(
"^2test run: campaign looks GOOD");
275 error(
"Sorry, cheater. You are NOT WELCOME.");
float CampaignBailout(string s)
string campaign_shortdesc[CAMPAIGN_MAX_ENTRIES]
string campaign_index_var
float cvar_settemp(string tmp_cvar, string tmp_value)
void CampaignSetup(int n)
#define FOREACH_CLIENT(cond, body)
string campaign_timelimit[CAMPAIGN_MAX_ENTRIES]
float campaign_botskill[CAMPAIGN_MAX_ENTRIES]
#define IS_REAL_CLIENT(v)
int Campaign_GetLevelNum()
Gametype MapInfo_Type_FromString(string gtype, bool dowarn)
Gametype MapInfo_CurrentGametype()
bool autocvar__campaign_testrun
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
void CampaignPostIntermission()
int autocvar_g_campaign_skill
float campaign_bots[CAMPAIGN_MAX_ENTRIES]
string campaign_mutators[CAMPAIGN_MAX_ENTRIES]
int autocvar__campaign_index
string campaign_gametype[CAMPAIGN_MAX_ENTRIES]
string campaign_longdesc[CAMPAIGN_MAX_ENTRIES]
void CampaignSaveCvar(string cvarname, float value)
void CampaignLevelWarp(float n)
#define tokenizebyseparator
void CampaignPreIntermission()
float checkrules_equality
#define MAPINFO_SETTEMP_ACL_USER
string campaign_mapname[CAMPAIGN_MAX_ENTRIES]
float CampaignFile_Load(float offset, float entries)
string Campaign_GetMessage()
void CampaignFile_Unload()
void MapInfo_SwitchGameType(Gametype t)
void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, float recurse)
string campaign_fraglimit[CAMPAIGN_MAX_ENTRIES]
string autocvar__campaign_name