Add Epic Mission text to galactic map.
This commit is contained in:
parent
bedf2fe74d
commit
4d745dc74e
|
@ -510,15 +510,10 @@ static void drawStarSystemDetail(void)
|
||||||
drawText(525, 230, 22, TA_LEFT, colors.white, selectedMission->description);
|
drawText(525, 230, 22, TA_LEFT, colors.white, selectedMission->description);
|
||||||
limitTextWidth(0);
|
limitTextWidth(0);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
drawText(525, 135, 18, TA_LEFT, colors.lightGrey, "Pilot: -");
|
|
||||||
drawText(525, 160, 18, TA_LEFT, colors.lightGrey, "Craft: -");
|
|
||||||
drawText(525, 185, 18, TA_LEFT, colors.lightGrey, "Squadron: -");
|
|
||||||
|
|
||||||
limitTextWidth(500);
|
if (selectedMission->epic)
|
||||||
drawText(525, 230, 22, TA_LEFT, colors.darkGrey, "You cannot play this mission yet. Complete the previous mission to unlock.");
|
{
|
||||||
limitTextWidth(0);
|
drawText(525, SCREEN_HEIGHT - 95, 18, TA_LEFT, colors.yellow, "Note: this is an Epic Mission.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedMission && selectedMission->available && selectedMission->challengeHead.next)
|
if (selectedMission && selectedMission->available && selectedMission->challengeHead.next)
|
||||||
|
|
|
@ -94,6 +94,11 @@ static void loadMissionMeta(char *filename, StarSystem *starSystem)
|
||||||
STRNCPY(mission->requires, cJSON_GetObjectItem(root, "requires")->valuestring, MAX_DESCRIPTION_LENGTH);
|
STRNCPY(mission->requires, cJSON_GetObjectItem(root, "requires")->valuestring, MAX_DESCRIPTION_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cJSON_GetObjectItem(root, "epic"))
|
||||||
|
{
|
||||||
|
mission->epic = 1;
|
||||||
|
}
|
||||||
|
|
||||||
node = cJSON_GetObjectItem(root, "player");
|
node = cJSON_GetObjectItem(root, "player");
|
||||||
|
|
||||||
if (node)
|
if (node)
|
||||||
|
|
|
@ -199,6 +199,7 @@ struct Mission {
|
||||||
char craft[MAX_NAME_LENGTH];
|
char craft[MAX_NAME_LENGTH];
|
||||||
int available;
|
int available;
|
||||||
int completed;
|
int completed;
|
||||||
|
int epic;
|
||||||
Challenge challengeHead;
|
Challenge challengeHead;
|
||||||
Mission *next;
|
Mission *next;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue