@/lua/ge/extensions/gameplay/drag/display.lua
for _,light in pairs(group) do
if type(light) == "table" and light.obj and simObjectExists(light.obj) then
light.obj:setHidden(true)
for _,digit in ipairs(laneTypeData) do
if digit and simObjectExists(digit) then
digit:setHidden(true)
for i,v in ipairs(timeDisplayValue) do
if timeDigits[i] and simObjectExists(timeDigits[i]) then
timeDigits[i]:preApply()
for i,v in ipairs(speedDisplayValue) do
if speedDigits and speedDigits[i] and simObjectExists(speedDigits[i]) then
speedDigits[i]:preApply()
if hasTree then
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(false) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(false) end
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(false) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(false) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(false) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(false) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(false) end
end
if hasTree then
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(racer.isDesqualified) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(racer.isDesqualified) end
if countDownLights.redLight.obj and simObjectExists(countDownLights.redLight.obj) then countDownLights.redLight.obj:setHidden(not racer.isDesqualified) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(racer.isDesqualified) end
if countDownLights.redLight.obj and simObjectExists(countDownLights.redLight.obj) then countDownLights.redLight.obj:setHidden(not racer.isDesqualified) end
end
if countDownLights[stage[3]].isOn == stage[4] then
if hasTree and countDownLights[stage[3]].obj and simObjectExists(countDownLights[stage[3]].obj) then
countDownLights[stage[3]].obj:setHidden(stage[4])
if stage[5] and countDownLights[stage[5]].isOn == stage[6] then
if hasTree and countDownLights[stage[5]].obj and simObjectExists(countDownLights[stage[5]].obj) then
countDownLights[stage[5]].obj:setHidden(stage[6])
if countDownLights.greenLight.isOn == racer.isDesqualified then
if hasTree and countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then
countDownLights.greenLight.obj:setHidden(racer.isDesqualified)
local driverLight = dragData.strip.treeLights[driverLightBlinkState.lane].stageLights.driverLight
if driverLight and driverLight.obj and simObjectExists(driverLight.obj) then
local newTimer = driverLightBlinkState.timer + dtSim
if lane then
if dragData.strip.treeLights[lane].stageLights.winnerLight and dragData.strip.treeLights[lane].stageLights.winnerLight.obj and simObjectExists(dragData.strip.treeLights[lane].stageLights.winnerLight.obj) then
dragData.strip.treeLights[lane].stageLights.winnerLight.isOn = true
end
if dragData.strip.treeLights[lane].stageLights.driverLight and dragData.strip.treeLights[lane].stageLights.driverLight.obj and simObjectExists(dragData.strip.treeLights[lane].stageLights.driverLight.obj) and not driverLightBlinkState.isBlinking then
dragData.strip.treeLights[lane].stageLights.driverLight.isOn = true
-- Update global blue light object if it exists
if hasTree and blueLight.obj and simObjectExists(blueLight.obj) then
blueLight.obj:setHidden(false)
-- Update global blue light object if it exists
if hasTree and blueLight.obj and simObjectExists(blueLight.obj) then
blueLight.obj:setHidden(true)
local hasTree = hasTreeLights()
if hasTree and laneTree.stageLights.prestageLight.obj and simObjectExists(laneTree.stageLights.prestageLight.obj) then
laneTree.stageLights.prestageLight.obj:setHidden(false)
local hasTree = hasTreeLights()
if hasTree and laneTree.stageLights.prestageLight.obj and simObjectExists(laneTree.stageLights.prestageLight.obj) then
laneTree.stageLights.prestageLight.obj:setHidden(true)
if not dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.isOn then
if dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj and simObjectExists(dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj) then
dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj:setHidden(false)
if dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.isOn then
if dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj and simObjectExists(dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj) then
dragData.strip.treeLights[dragData.racers[vehId].lane].stageLights.stageLight.obj:setHidden(true)
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight1.obj and simObjectExists(countDownLights.amberLight1.obj) then countDownLights.amberLight1.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.amberLight2.obj and simObjectExists(countDownLights.amberLight2.obj) then countDownLights.amberLight2.obj:setHidden(true) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(true) end
if countDownLights.amberLight3.obj and simObjectExists(countDownLights.amberLight3.obj) then countDownLights.amberLight3.obj:setHidden(true) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(true) end
if countDownLights.redLight.obj and simObjectExists(countDownLights.redLight.obj) then countDownLights.redLight.obj:setHidden(false) end
if countDownLights.greenLight.obj and simObjectExists(countDownLights.greenLight.obj) then countDownLights.greenLight.obj:setHidden(true) end
if countDownLights.redLight.obj and simObjectExists(countDownLights.redLight.obj) then countDownLights.redLight.obj:setHidden(false) end
for _, light in pairs(group) do
if type(light) == "table" and light.obj and simObjectExists(light.obj) then
light.obj:setHidden(false)
for _, digit in ipairs(laneTypeData) do
if digit and simObjectExists(digit) then
digit:preApply()
for _, light in pairs(group) do
if type(light) == "table" and light.obj and simObjectExists(light.obj) then
light.obj:setHidden(true)
for _, digit in ipairs(laneTypeData) do
if digit and simObjectExists(digit) then
digit:setHidden(true)
for _, light in pairs(group) do
if type(light) == "table" and light.obj and simObjectExists(light.obj) then
light.obj:setHidden(false)
for _, digit in ipairs(laneTypeData) do
if digit and simObjectExists(digit) then
digit:setHidden(false)
for _, light in pairs(group) do
if type(light) == "table" and light.obj and simObjectExists(light.obj) then
light.obj:setHidden(true)
for _, digit in ipairs(laneTypeData) do
if digit and simObjectExists(digit) then
digit:setHidden(true)