From e2b9ece53296c41a4c6e7a16b4955bb463f17236 Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Tue, 18 Jul 2023 12:15:46 -0500 Subject: [PATCH] Add fail-safe gift truck for Gamma 3 If the player beat Gamma 2 with no built factories and no trucks on the home map they would fail coming back. --- data/base/script/campaign/cam3-b.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/base/script/campaign/cam3-b.js b/data/base/script/campaign/cam3-b.js index 09863418848..7b3f99b0818 100644 --- a/data/base/script/campaign/cam3-b.js +++ b/data/base/script/campaign/cam3-b.js @@ -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");