loadTrackBuilderJSON
Definition
-- @/lua/ge/extensions/scenario/quickRaceLoader.lua:320
-- This function loads the JSON of a track builder track.
local function loadTrackBuilderJSON(originalFilename)
local filename = 'trackEditor/'..originalFilename..'.json'
if FS:fileExists(filename) then
local read = jsonReadFile(filename)
if not read then
log('I',logTag,'No track found in file Documents/BeamNG/'..filename)
return nil
end
return read
else
log('I',logTag,'Could not find file Documents/BeamNG/'..filename)
return nil
end
end
Callers
@/lua/ge/extensions/scenario/quickRaceLoader.lua
for _, name in ipairs(editorTracks) do
local trackData = M.loadTrackBuilderJSON(name)