Skip to content

Commit

Permalink
Fix Command/Build reticule init for LDS_EXPAND_LIMBO missions
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Nov 14, 2023
1 parent b55a092 commit d89e187
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion data/base/script/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d89e187

Please sign in to comment.