GE Lua Documentation

Press F to search!

getTrailById

Definition


-- @/lua/ge/extensions/gameplay/crawl/saveSystem.lua:557

-- Getter functions with lazy loading
M.getTrailById = function(trailId)
  if not trailId then
    log('E', logTag, 'No trail ID provided')
    return nil
  end

  return loadFromFile(trailId, "trail")
end

Callers

@/lua/ge/extensions/gameplay/crawl/general.lua
local function getBigMapTpPosRot(poi, veh)
  local trail = gameplay_crawl_saveSystem.getTrailById(poi.data.trailId)
  if trail and trail.startingPositionId then
    if elem.type == "crawl" then
      local trail = gameplay_crawl_saveSystem.getTrailById(elem.trailId)
  if data.type == "crawl" then
    local trail = gameplay_crawl_saveSystem.getTrailById(data.trailId)
    if trail then
@/gameplay/missionTypes/crawl/constructor.lua
    local gameplay_crawl_saveSystem = require('ge/extensions/gameplay/crawl/saveSystem')
    local trail = gameplay_crawl_saveSystem.getTrailById(self.fgVariables.trailFile)
@/lua/ge/extensions/editor/crawlEditor.lua
  for _, filePath in ipairs(trailFiles) do
    local trail = gameplay_crawl_saveSystem.getTrailById(filePath)
    if trail then
            if FS:fileExists(trailFile) then
              local trail = gameplay_crawl_saveSystem.getTrailById(trailFile)
              if trail then
@/lua/ge/extensions/gameplay/crawl/crawlFlowgraphBridge.lua

  local trail = gameplay_crawl_saveSystem.getTrailById(trailId)
  if not trail then
  if trailId then
    trail = gameplay_crawl_saveSystem.getTrailById(trailId)
  elseif bridgeState.activeTrail then
@/lua/ge/extensions/gameplay/crawl/flowgraphBridge.lua

  local trail = gameplay_crawl_saveSystem.getTrailById(trailId)
  if not trail then
  if trailId then
    trail = gameplay_crawl_saveSystem.getTrailById(trailId)
  elseif gameplay_crawl_general.activeTrail then
@/lua/ge/extensions/gameplay/crawl/saveSystem.lua
  for i, trailId in ipairs(data.trails or {}) do
    local trail = M.getTrailById(trailId)
    if trail then
  for _, filePath in ipairs(trailFiles) do
    local trail = M.getTrailById(filePath)
    if trail then