From 6d94889d3ada8945c88739c8939f9eb69468b322 Mon Sep 17 00:00:00 2001 From: KJeff01 Date: Mon, 13 Nov 2023 17:59:05 -0600 Subject: [PATCH] Fix Command/Build reticule init for LDS_EXPAND_LIMBO missions --- data/base/script/rules.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/base/script/rules.js b/data/base/script/rules.js index 87ad296f251..7d0f77d59b0 100644 --- a/data/base/script/rules.js +++ b/data/base/script/rules.js @@ -7,6 +7,7 @@ include("script/weather.js"); var mainReticule = false; var lastHitTime = 0; +const TICK_TIME = 100; const CREATE_LIKE_EVENT = 0; const DESTROY_LIKE_EVENT = 1; const TRANSFER_LIKE_EVENT = 2; @@ -226,7 +227,6 @@ function reticuleUpdate(obj, eventType) if (mainReticule && update_reticule) { //Wait a tick for the counts to update - const TICK_TIME = 100; queue("setMainReticule", TICK_TIME); } } @@ -360,6 +360,12 @@ function eventStartLevel() weatherCycle(); setTimer("weatherCycle", 45000); } + if (getMissionType() === LDS_EXPAND_LIMBO) + { + //eventGameInit is too early to notice units placed from eventStartLevel. + //Fire off a reticule button update again after all of the eventStartLevel events happen. + queue("setMainReticule", TICK_TIME); + } } function eventDroidBuilt(droid, structure)