Only award PANDORAN trophy at end of successful mission.
This commit is contained in:
parent
6ee216c006
commit
9ecdd106dc
|
@ -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)
|
void destroyEntities(void)
|
||||||
{
|
{
|
||||||
Entity *e;
|
Entity *e;
|
||||||
|
|
|
@ -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 Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore);
|
||||||
extern int isOnBattleScreen(int x, int y, int w, int h);
|
extern int isOnBattleScreen(int x, int y, int w, int h);
|
||||||
extern long lookup(char *name);
|
extern long lookup(char *name);
|
||||||
|
extern void awardTrophy(char *id);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -582,11 +582,6 @@ static void die(void)
|
||||||
{
|
{
|
||||||
battle.stats[STAT_EPIC_KILL_STREAK]++;
|
battle.stats[STAT_EPIC_KILL_STREAK]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->side == SIDE_PANDORAN)
|
|
||||||
{
|
|
||||||
awardTrophy("PANDORAN");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->flags & EF_DROPS_ITEMS)
|
if (self->flags & EF_DROPS_ITEMS)
|
||||||
|
|
|
@ -49,7 +49,6 @@ extern char *getTranslatedString(char *string);
|
||||||
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
extern int getJSONValue(cJSON *node, char *name, int defValue);
|
||||||
extern char **toTypeArray(char *types, int *numTypes);
|
extern char **toTypeArray(char *types, int *numTypes);
|
||||||
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
extern char *getJSONValueStr(cJSON *node, char *name, char *defValue);
|
||||||
extern void awardTrophy(char *id);
|
|
||||||
extern void addRandomItem(int x, int y);
|
extern void addRandomItem(int x, int y);
|
||||||
extern void checkSuspicionLevel(void);
|
extern void checkSuspicionLevel(void);
|
||||||
extern void checkZackariaSuspicionLevel(void);
|
extern void checkZackariaSuspicionLevel(void);
|
||||||
|
|
|
@ -461,6 +461,8 @@ void awardPostMissionTrophies(void)
|
||||||
{
|
{
|
||||||
awardCraftTrophy();
|
awardCraftTrophy();
|
||||||
|
|
||||||
|
awardPandoranCraftTrophy();
|
||||||
|
|
||||||
if (game.currentMission->epic)
|
if (game.currentMission->epic)
|
||||||
{
|
{
|
||||||
awardTrophy("EPIC");
|
awardTrophy("EPIC");
|
||||||
|
|
|
@ -40,6 +40,7 @@ extern Widget *getWidget(const char *name, const char *group);
|
||||||
extern void drawWidgets(char *groupName);
|
extern void drawWidgets(char *groupName);
|
||||||
extern char *timeToDate(long millis);
|
extern char *timeToDate(long millis);
|
||||||
extern void textSize(char *text, int size, int *w, int *h);
|
extern void textSize(char *text, int size, int *w, int *h);
|
||||||
|
extern void awardPandoranCraftTrophy(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
Loading…
Reference in New Issue