Skip to content

Commit

Permalink
Add fail-safe gift truck for Gamma 3
Browse files Browse the repository at this point in the history
If the player beat Gamma 2 with no built factories and no trucks on the home map they would fail coming back.
  • Loading branch information
KJeff01 committed Jul 19, 2023
1 parent 47ed012 commit de8cef4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions data/base/script/campaign/cam3-b.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ function eventStartLevel()
}
});

//In the event they put all trucks into Gamma 2 and have no completed factories on map...
if (enumStruct(CAM_HUMAN_PLAYER, FACTORY).filter((obj) => (obj.status === BUILT)).length === 0 && enumDroid(CAM_HUMAN_PLAYER, DROID_CONSTRUCT).length === 0)
{
let failSafeTruck = addDroid(GAMMA, lz.x, lz.y, "Truck Python Tracks", "Body11ABT", "tracked01", "", "", "Spade1Mk1");
donateObject(failSafeTruck, CAM_HUMAN_PLAYER); //So the reticules update for the next tick.
}

if (difficulty >= HARD)
{
addDroid(GAMMA, 28, 5, "Truck Python Tracks", "Body11ABT", "tracked01", "", "", "Spade1Mk1");
Expand Down

0 comments on commit de8cef4

Please sign in to comment.