GE Lua Documentation

Press F to search!

resetTimer

Definition


-- @/lua/ge/extensions/core/trafficSignals.lua:1250

local function resetTimer() -- resets the timer & queue, and activates the sequences
  timer = 0
  queue:clear()

  for _, sequence in ipairs(sequences) do
    sequence:setActive(not sequence.startDisabled)
  end
  for _, instance in pairs(instances) do
    if not instance._invalid then
      instance:setActive(not instance.startDisabled)
    end
  end
end

Callers

@/lua/ge/extensions/core/trafficSignals.lua
local function setTimer(val) -- directly sets the timer, which can instantly update the signal states
  if not val then resetTimer() end
  timer = val

    resetTimer()
    buildMapNodeSignals()