Script call to complete the mission now also completes all objectives.
This commit is contained in:
parent
1fcaedda00
commit
c729d59c3a
|
@ -178,6 +178,16 @@ void updateCondition(char *name, int type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void completeAllObjectives(void)
|
||||||
|
{
|
||||||
|
Objective *o;
|
||||||
|
|
||||||
|
for (o = battle.objectiveHead.next ; o != NULL ; o = o->next)
|
||||||
|
{
|
||||||
|
o->status = OS_COMPLETE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void completeConditions(void)
|
void completeConditions(void)
|
||||||
{
|
{
|
||||||
Objective *o;
|
Objective *o;
|
||||||
|
|
|
@ -245,6 +245,7 @@ static void executeNextLine(ScriptRunner *runner)
|
||||||
else if (strcmp(command, "COMPLETE_MISSION") == 0)
|
else if (strcmp(command, "COMPLETE_MISSION") == 0)
|
||||||
{
|
{
|
||||||
addHudMessage(colors.green, _("Mission Complete!"));
|
addHudMessage(colors.green, _("Mission Complete!"));
|
||||||
|
completeAllObjectives();
|
||||||
completeMission();
|
completeMission();
|
||||||
}
|
}
|
||||||
else if (strcmp(command, "FAIL_MISSION") == 0)
|
else if (strcmp(command, "FAIL_MISSION") == 0)
|
||||||
|
|
|
@ -37,6 +37,7 @@ extern char *getTranslatedString(char *string);
|
||||||
extern void activateNextWaypoint(void);
|
extern void activateNextWaypoint(void);
|
||||||
extern void activateJumpgate(int activate);
|
extern void activateJumpgate(int activate);
|
||||||
extern void activateSpawner(char *name, int active);
|
extern void activateSpawner(char *name, int active);
|
||||||
|
extern void completeAllObjectives(void);
|
||||||
|
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
Loading…
Reference in New Issue