GE Lua Documentation

Press F to search!

toggleShuffledPairs

Definition


-- @/lua/ge/map.lua:44
-- for debugging issues in the deterministic build of the navgraph
local function toggleShuffledPairs(mode)
  if mode then
    if mode == 'shuffledPairs' then
      _pairs = shuffledPairs
    elseif mode == 'pairs' then
      _pairs = pairs
    end
  else
    _pairs = _pairs == pairs and shuffledPairs or pairs
  end
  if _pairs == pairs then
    log('W', 'map.lua', 'Using pairs')
  elseif _pairs == shuffledPairs then
    log('W', 'map.lua', 'Using shuffledPairs')
  end
end

Callers

@/lua/ge/map.lua
    print('============== Load Map ===============')
    toggleShuffledPairs('shuffledPairs')