Allow challenges to be ended via the script.
This commit is contained in:
parent
885d566e6b
commit
16591691b5
|
@ -165,6 +165,10 @@ static void executeNextLine(ScriptRunner *runner)
|
||||||
addHudMessage(colors.red, _("Mission Failed!"));
|
addHudMessage(colors.red, _("Mission Failed!"));
|
||||||
failMission();
|
failMission();
|
||||||
}
|
}
|
||||||
|
else if (strcmp(command, "END_CHALLENGE") == 0)
|
||||||
|
{
|
||||||
|
game.currentMission->challengeData.scriptedEnd = 1;
|
||||||
|
}
|
||||||
else if (strcmp(command, "RETREAT_ALLIES") == 0)
|
else if (strcmp(command, "RETREAT_ALLIES") == 0)
|
||||||
{
|
{
|
||||||
battle.isEpic = 0;
|
battle.isEpic = 0;
|
||||||
|
|
|
@ -37,3 +37,4 @@ extern char *getTranslatedString(char *string);
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
extern Game game;
|
||||||
|
|
|
@ -254,6 +254,7 @@ typedef struct {
|
||||||
int noBoost;
|
int noBoost;
|
||||||
int noECM;
|
int noECM;
|
||||||
int noGuns;
|
int noGuns;
|
||||||
|
int scriptedEnd;
|
||||||
Challenge *challenges[MAX_CHALLENGES];
|
Challenge *challenges[MAX_CHALLENGES];
|
||||||
} ChallengeData;
|
} ChallengeData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue