Added ALL_OBJECTIVES_COMPLETE script command.
This commit is contained in:
parent
239845a279
commit
e79d331599
|
@ -106,7 +106,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 3",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 1",
|
||||
"MSG_BOX Carlyle;This is Carlyle. Enemy corvette has been destroyed. All other fighters scratched.",
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 4",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 1",
|
||||
"MSG_BOX Carlyle;This is Carlyle. Enemy targets have been eliminated. Cleopatra still in one piece.",
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 1",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 1",
|
||||
"MSG_BOX de Winter;Griffin, this is de Winter. All targets destroyed.",
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 4",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Carr;Alexandria, packaged delivered.",
|
||||
|
|
|
@ -144,7 +144,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 5",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Carr;This is Carr, reporting operation successful. Bagged us two squadron commanders.",
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 3",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Carr;This is Carr. Reporting threat eliminated, operation successful.",
|
||||
|
|
|
@ -259,7 +259,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 4",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Williams;Control, this is Williams. Enemy capital ships have been destroyed, along with all other forces.",
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 1",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Strickland; Looks like that was the last of 'em.",
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 4",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 1",
|
||||
"MSG_BOX de Winter;Control, this is de Winter. All enemy forces have been destroyed.",
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"function" : "OBJECTIVES_COMPLETE 5",
|
||||
"function" : "ALL_OBJECTIVES_COMPLETE",
|
||||
"lines" : [
|
||||
"WAIT 2",
|
||||
"MSG_BOX Taylor;Leviathan, this is Taylor. All targets have been eliminated.",
|
||||
|
|
|
@ -135,6 +135,8 @@ static void doBattle(void)
|
|||
battle.planet.x -= ssx * 0.05;
|
||||
battle.planet.y -= ssy * 0.05;
|
||||
|
||||
doObjectives();
|
||||
|
||||
doHud();
|
||||
|
||||
doStars(ssx, ssy);
|
||||
|
@ -149,8 +151,6 @@ static void doBattle(void)
|
|||
|
||||
doPlayer();
|
||||
|
||||
doObjectives();
|
||||
|
||||
if (player != NULL)
|
||||
{
|
||||
doLocations();
|
||||
|
|
|
@ -101,13 +101,20 @@ void updateObjective(char *name, int type)
|
|||
|
||||
if (o->currentValue == o->targetValue)
|
||||
{
|
||||
completed++;
|
||||
|
||||
o->status = OS_COMPLETE;
|
||||
|
||||
addHudMessage(colors.green, "%s - Objective Complete!", o->description);
|
||||
|
||||
runScriptFunction(o->description);
|
||||
|
||||
runScriptFunction("OBJECTIVES_COMPLETE %d", ++completed);
|
||||
runScriptFunction("OBJECTIVES_COMPLETE %d", completed);
|
||||
|
||||
if (completed == battle.numObjectivesTotal)
|
||||
{
|
||||
runScriptFunction("ALL_OBJECTIVES_COMPLETE");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue