Skip to content

Commit

Permalink
A few campaign script bug fixes.
Browse files Browse the repository at this point in the history
- Cam3-4: Add the "Reinforcements are available" audio message.

- Cam2-6: Get more structures into base cleanups and remove useless labels.

- Libcampaign: Enclose "Return to LZ" in _() for translation and make sure that
away missions that use both retlz and annihilate victory conditions do not show
the "Return to LZ" message without truly destroying all enemy objects on map.
  • Loading branch information
KJeff01 committed Jan 23, 2018
1 parent 6cca64d commit 1a05e38
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 27 deletions.
1 change: 1 addition & 0 deletions data/base/script/campaign/cam3-4.js
Expand Up @@ -91,6 +91,7 @@ function enableAllFactories()

function enableReinforcements()
{
playSound("pcv440.ogg"); // Reinforcements are available.
camSetStandardWinLossConditions(CAM_VICTORY_OFFWORLD, "GAMMA_OUT", {
area: "RTLZ",
reinforcements: 60, // 1 min
Expand Down
4 changes: 2 additions & 2 deletions data/base/script/campaign/libcampaign.js
Expand Up @@ -2684,7 +2684,7 @@ function __camVictoryOffworld()
__camTriggerLastAttack();
}

if (!destroyAll || forceLZ)
if (!destroyAll || (forceLZ && destroyAll && !enemyLen))
{
if (__camRTLZTicker === 0 && camDef(__camVictoryData.message))
{
Expand All @@ -2698,7 +2698,7 @@ function __camVictoryOffworld()
{
var pos = camMakePos(lz);
playSound("pcv427.ogg", pos.x, pos.y, 0);
console("Return to LZ");
console(_("Return to LZ"));
}
++__camRTLZTicker;
}
Expand Down
30 changes: 5 additions & 25 deletions data/base/wrf/cam2/sub2-6/labels.json
Expand Up @@ -72,18 +72,18 @@
},
"area_2": {
"label": "uplinkBaseCleanup",
"pos1": [448, 448],
"pos2": [2368, 1728]
"pos1": [128, 128],
"pos2": [3456, 1792]
},
"area_3": {
"label": "mainBaseCleanup",
"pos1": [1984, 3648],
"pos2": [4032, 5440]
"pos2": [4096, 5504]
},
"area_4": {
"label": "mediumBaseCleanup",
"pos1": [5952, 576],
"pos2": [7744, 3136]
"pos1": [5952, 128],
"pos2": [7936, 3200]
},
"area_5": {
"label": "uplinkBaseGroup",
Expand All @@ -106,26 +106,6 @@
"pos2": [7360, 7872]
},
"area_9": {
"label": "regionGroup2",
"pos1": [576, 3136],
"pos2": [1216, 4032]
},
"area_10": {
"label": "regionGroup3",
"pos1": [576, 1728],
"pos2": [1600, 4032]
},
"area_11": {
"label": "regionGroup4",
"pos1": [704, 704],
"pos2": [2112, 1728]
},
"area_12": {
"label": "regionGroup5",
"pos1": [4032, 2368],
"pos2": [4800, 3136]
},
"area_13": {
"label": "groupTrigger",
"subscriber": 0,
"pos1": [960, 5184],
Expand Down

0 comments on commit 1a05e38

Please sign in to comment.