Allow campaign to be ended with script.
This commit is contained in:
parent
d1e9c4a734
commit
5d5c19a62d
|
@ -433,6 +433,17 @@ static void doTorelliFireStorm(void)
|
|||
}
|
||||
}
|
||||
|
||||
void endCampaign(void)
|
||||
{
|
||||
awardTrophy("CAMPAIGN_COMPLETE");
|
||||
|
||||
postBattle();
|
||||
|
||||
destroyBattle();
|
||||
|
||||
initCredits();
|
||||
}
|
||||
|
||||
void destroyBattle(void)
|
||||
{
|
||||
Entity *ent;
|
||||
|
|
|
@ -88,6 +88,8 @@ extern void doSpawners(void);
|
|||
extern void doTrophyAlerts(void);
|
||||
extern void drawTrophyAlert(void);
|
||||
extern void cancelScript(void);
|
||||
extern void awardTrophy(char *id);
|
||||
extern void initCredits(void);
|
||||
|
||||
extern App app;
|
||||
extern Battle battle;
|
||||
|
|
|
@ -303,6 +303,10 @@ static void executeNextLine(ScriptRunner *runner)
|
|||
{
|
||||
battle.destroyTorelli = 1;
|
||||
}
|
||||
else if (strcmp(command, "END_CAMPAIGN") == 0)
|
||||
{
|
||||
endCampaign();
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_LogMessage(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_WARN, "ERROR: Unrecognised script command '%s'\n", command);
|
||||
|
|
|
@ -42,6 +42,7 @@ extern void createChristabelLocation(void);
|
|||
extern void killEntity(char *name);
|
||||
extern void updateEntitySide(char *side, char *entity);
|
||||
extern void activateTrespasserSpawner(void);
|
||||
extern void endCampaign(void);
|
||||
|
||||
extern Battle battle;
|
||||
extern Colors colors;
|
||||
|
|
Loading…
Reference in New Issue