GE Lua Documentation

Press F to search!

loadDiscovers

Definition


-- @/lua/ge/extensions/gameplay/discover.lua:16
M.loadDiscovers = function()
  if discoversById then return end
  discoversById = {}
  local discoverFiles = FS:findFiles("lua/ge/extensions/gameplay/discover/", "*.lua", 0, false, false)
  for _, file in ipairs(discoverFiles) do
    local dir, fn, ext = path.splitWithoutExt(file)
    local discover = require(dir..fn)
    if discover.pageInfo then
      pageInfosById[fn] = discover.pageInfo
    end
    if discover.experiences then
      for _, experience in ipairs(discover.experiences) do
        discoversById[experience.id] = experience
      end
    end
  end
end

Callers

@/lua/ge/extensions/gameplay/discover.lua
local function getDiscoverPages()
  M.loadDiscovers()
  local pages = {}
local function startDiscover(discoverId)
  M.loadDiscovers()
  if lastDiscover then