Only award PANDORAN trophy at end of successful mission.

This commit is contained in:
Steve 2016-05-24 11:46:20 +01:00
parent 6ee216c006
commit 9ecdd106dc
6 changed files with 17 additions and 6 deletions

View File

@ -681,6 +681,19 @@ void updateEntitySide(char *sideStr, char *name)
}
}
void awardPandoranCraftTrophy(void)
{
Entity *e;
for (e = deadHead.next ; e != NULL ; e = e->next)
{
if (e->killedBy == player && e->side == SIDE_PANDORAN)
{
awardTrophy("PANDORAN");
}
}
}
void destroyEntities(void)
{
Entity *e;

View File

@ -37,6 +37,7 @@ extern void updateCapitalShipComponentProperties(Entity *parent, long flags);
extern Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
extern int isOnBattleScreen(int x, int y, int w, int h);
extern long lookup(char *name);
extern void awardTrophy(char *id);
extern App app;
extern Battle battle;

View File

@ -582,11 +582,6 @@ static void die(void)
{
battle.stats[STAT_EPIC_KILL_STREAK]++;
}
if (self->side == SIDE_PANDORAN)
{
awardTrophy("PANDORAN");
}
}
if (self->flags & EF_DROPS_ITEMS)

View File

@ -49,7 +49,6 @@ extern char *getTranslatedString(char *string);
extern int getJSONValue(cJSON *node, char *name, int defValue);
extern char **toTypeArray(char *types, int *numTypes);
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
extern void awardTrophy(char *id);
extern void addRandomItem(int x, int y);
extern void checkSuspicionLevel(void);
extern void checkZackariaSuspicionLevel(void);

View File

@ -460,6 +460,8 @@ void awardChallengeTrophies(void)
void awardPostMissionTrophies(void)
{
awardCraftTrophy();
awardPandoranCraftTrophy();
if (game.currentMission->epic)
{

View File

@ -40,6 +40,7 @@ extern Widget *getWidget(const char *name, const char *group);
extern void drawWidgets(char *groupName);
extern char *timeToDate(long millis);
extern void textSize(char *text, int size, int *w, int *h);
extern void awardPandoranCraftTrophy(void);
extern App app;
extern Battle battle;