Activate objectives by name, not number.
This commit is contained in:
parent
2a5b048253
commit
01894d5150
|
@ -62,7 +62,7 @@
|
|||
"function" : "Waypoint #3",
|
||||
"lines" : [
|
||||
"ACTIVATE_ENTITIES Pandoran",
|
||||
"ACTIVATE_OBJECTIVES 1",
|
||||
"ACTIVATE_OBJECTIVES Destroy Pandoran fighters",
|
||||
"MSG_BOX Alba Control;Patrol A-82, you have hostiles incoming. Identified as 3 Mitikas fighters; Jackals, possibly Pandoran. Engage, but exercise extreme caution."
|
||||
]
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"active" : 0
|
||||
},
|
||||
{
|
||||
"description" : "Destroy Intercepting Darts",
|
||||
"description" : "Destroy intercepting Darts",
|
||||
"targetName" : "Dart",
|
||||
"targetValue" : 7,
|
||||
"targetType" : "TT_DESTROY",
|
||||
|
@ -138,7 +138,7 @@
|
|||
"WAIT 1",
|
||||
"MSG_BOX Alexandria Orbital;Iron Patriots, we're again identifying a handful of crates drifting close to your current position. Please effect pick up.",
|
||||
"ACTIVATE_ENTITIES package",
|
||||
"ACTIVATE_OBJECTIVES 1",
|
||||
"ACTIVATE_OBJECTIVES Retrieve packages",
|
||||
"MSG_BOX Carr;Got it. Heading to the first one now"
|
||||
]
|
||||
},
|
||||
|
@ -150,7 +150,7 @@
|
|||
"MSG_BOX Carr;Know anything about the occupant, or affiliation?",
|
||||
"MSG_BOX Alexandria Orbital;Negative, Lieutenant. We'll know more once it's brought in.",
|
||||
"ACTIVATE_ENTITIES Stranded Dart;Tug",
|
||||
"ACTIVATE_OBJECTIVES 2;3"
|
||||
"ACTIVATE_OBJECTIVES Bring in Stranded Dart;Do not destroy Stranded Dart"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -162,7 +162,7 @@
|
|||
"ACTIVATE_ENTITIES Extraction Point",
|
||||
"WAIT 20",
|
||||
"ACTIVATE_ENTITIES Dart",
|
||||
"ACTIVATE_OBJECTIVES 4",
|
||||
"ACTIVATE_OBJECTIVES Destroy intercepting Darts",
|
||||
"MSG_BOX Wingmate;Dan, we've got hostile vessels inbound. More Darts.",
|
||||
"MSG_BOX Carr;Prepare to engage. Protect the asset!"
|
||||
]
|
||||
|
|
|
@ -139,7 +139,11 @@
|
|||
"MSG_BOX Alexandria Orbital;Patrol, we have a major situation developing. A skirmish is taking place between a number of starfighters: Darts, Nymphs, and Fireflies.",
|
||||
"MSG_BOX Carr;Pirates? Insurgents? Nation of Tzac?",
|
||||
"WAIT_MSG_BOX",
|
||||
"ACTIVATE_OBJECTIVES 1;2;3;4;5",
|
||||
"ACTIVATE_OBJECTIVES Disable Pirate Commander",
|
||||
"ACTIVATE_OBJECTIVES Disable Tzac Commander",
|
||||
"ACTIVATE_OBJECTIVES Destroy all other opponents",
|
||||
"ACTIVATE_OBJECTIVES Do not allow Pirate Commander to be killed",
|
||||
"ACTIVATE_OBJECTIVES Do not allow Tzac Commander to be killed",
|
||||
"ACTIVATE_ENTITY_GROUPS skirmishGroup",
|
||||
"MSG_BOX Alexandria Orbital;Too early to speculate. We want you to disable and bring in one craft from each side. The rest, you can eliminate.",
|
||||
"MSG_BOX Carr;On it."
|
||||
|
|
|
@ -179,25 +179,19 @@ void failIncompleteObjectives(void)
|
|||
void activateObjectives(char *objectives)
|
||||
{
|
||||
char *token;
|
||||
int i, num;
|
||||
Objective *o;
|
||||
|
||||
token = strtok(objectives, ";");
|
||||
|
||||
while (token)
|
||||
{
|
||||
i = 0;
|
||||
num = atoi(token);
|
||||
|
||||
for (o = battle.objectiveHead.next ; o != NULL ; o = o->next)
|
||||
{
|
||||
if (i == num)
|
||||
if (strcmp(token, o->description) == 0)
|
||||
{
|
||||
addHudMessage(colors.cyan, "New Objective : %s", o->description);
|
||||
o->active = 1;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
token = strtok(NULL, ";");
|
||||
|
|
|
@ -133,7 +133,7 @@ static void executeNextLine(ScriptRunner *runner)
|
|||
}
|
||||
else if (strcmp(command, "ACTIVATE_OBJECTIVES") == 0)
|
||||
{
|
||||
sscanf(line, "%*s %s", strParam[0]);
|
||||
sscanf(line, "%*s %[^\n]", strParam[0]);
|
||||
activateObjectives(strParam[0]);
|
||||
}
|
||||
else if (strcmp(command, "MSG_BOX") == 0)
|
||||
|
|
Loading…
Reference in New Issue